Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36273 )
Change subject: lib/cbmem_top: Add a common cbmem_top implementation
......................................................................
Patch Set 13:
(1 comment)
https://review.coreboot.org/c/coreboot/+/36273/13/src/lib/cbmem_top.c
File src/lib/cbmem_top.c:
https://review.coreboot.org/c/coreboot/+/36273/13/src/lib/cbmem_top.c@22
PS13, Line 22: {
Sorry for nitpicking, but I think it's clearer if we do the following:
if (ENV_ROMSTAGE) {
utilize cbmem_top_romstage()
} else if (ENV_RAMSTAGE || ENV_POSTCAR) {
if (CONFIG(RAMSTAGE_CBMEM_TOP_ARG)
return _cbmem_top_ptr;
}
return NULL;
The combinations of the logic you have below means we'd be calling out to cbmem_top_romstage() in ramstage under certain conditions which I think is wrong. Being explicit means we aren't implicitly creating such situations. Thoughts? That or cbmem_top_romstage() is not the correct name for this function.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/36273
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie767542ee25483acc9a56785ce20a885e9a63098
Gerrit-Change-Number: 36273
Gerrit-PatchSet: 13
Gerrit-Owner: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Aaron Durbin
adurbin@chromium.org
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: David Guckian
david.guckian@intel.com
Gerrit-Reviewer: Huang Jin
huang.jin@intel.com
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Kyösti Mälkki
kyosti.malkki@gmail.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Philipp Deppenwiese
zaolin.daisuki@gmail.com
Gerrit-Reviewer: Philipp Hug
philipp@hug.cx
Gerrit-Reviewer: Vanny E
vanessa.f.eusebio@intel.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Reviewer: ron minnich
rminnich@gmail.com
Gerrit-Comment-Date: Tue, 29 Oct 2019 23:02:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment