Josie Nordrum has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib: add ENV_SMM check to setup_preram_cache ......................................................................
lib: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-Off-By: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b --- M src/lib/fmap.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/45274/1
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index e1e6a57..fc51122 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -46,6 +46,9 @@ if (CONFIG(NO_FMAP_CACHE)) return;
+ if (ENV_SMM) + return; + if (!ENV_ROMSTAGE_OR_BEFORE) { /* We get here if ramstage makes an FMAP access before calling cbmem_initialize(). We should avoid letting it come to that,
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45274/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/1//COMMIT_MSG@6 PS1, Line 6: : lib lib/fmap:
Josie Nordrum has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib: add ENV_SMM check to setup_preram_cache ......................................................................
lib: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-Off-By: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b --- M src/lib/fmap.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/45274/2
Josie Nordrum has uploaded a new patch set (#3). ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib: add ENV_SMM check to setup_preram_cache ......................................................................
lib: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-Off-By: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b --- M src/lib/fmap.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/45274/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45274/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/3//COMMIT_MSG@17 PS3, Line 17: Signed-Off-By Signed-off-by
Hello build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45274
to look at the new patch set (#4).
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
lib/fmap: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-off-By: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b --- M src/lib/fmap.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/45274/4
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/45274/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/1//COMMIT_MSG@6 PS1, Line 6: : lib
lib/fmap:
Done
https://review.coreboot.org/c/coreboot/+/45274/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/3//COMMIT_MSG@17 PS3, Line 17: Signed-Off-By
Signed-off-by
Done
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45274/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/4//COMMIT_MSG@17 PS4, Line 17: B "No Signed-off-by line in commit message" -> lowercase 'b'
Hello build bot (Jenkins), Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45274
to look at the new patch set (#5).
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
lib/fmap: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-off-by: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b --- M src/lib/fmap.c 1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/45274/5
Josie Nordrum has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45274/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45274/4//COMMIT_MSG@17 PS4, Line 17: B
"No Signed-off-by line in commit message" -> lowercase 'b'
Done
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 5: Code-Review+1
(1 comment)
Would it not be better if the SMM handler only used assets located in TSEG instead of things in flash (which may or may not be RO)?
https://review.coreboot.org/c/coreboot/+/45274/5/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/45274/5/src/lib/fmap.c@50 PS5, Line 50: ENV_SMM Would defining a new symbol ENV_STAGE_NO_FMAP_CACHE be a good idea?
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45274/5/src/lib/fmap.c File src/lib/fmap.c:
https://review.coreboot.org/c/coreboot/+/45274/5/src/lib/fmap.c@50 PS5, Line 50: ENV_SMM
Would defining a new symbol ENV_STAGE_NO_FMAP_CACHE be a good idea?
Potentially, but it would only be for this case. The ROMSTAGE_OR_BEFORE check wants to spit out a warning. Let's see if such a thing becomes a necessity?
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 5: Code-Review+2
Aaron Durbin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
lib/fmap: add ENV_SMM check to setup_preram_cache
Add check in setup_preram_cache to return if ENV_SMM is true. This avoids false warning that post-RAM FMAP is accessed too early caused by ENV_ROMSTAGE_OR_BEFORE evaluation in SMI handler.
BUG=b:167321319 BRANCH=None TEST=None
Signed-off-by: Josie Nordrum josienordrum@google.com Change-Id: I3a4c199c42ee556187d6c4277e8793a36e4d493b Reviewed-on: https://review.coreboot.org/c/coreboot/+/45274 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Aaron Durbin adurbin@chromium.org --- M src/lib/fmap.c 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Aaron Durbin: Looks good to me, approved Arthur Heymans: Looks good to me, but someone else must approve
diff --git a/src/lib/fmap.c b/src/lib/fmap.c index e1e6a57..377123a 100644 --- a/src/lib/fmap.c +++ b/src/lib/fmap.c @@ -46,6 +46,10 @@ if (CONFIG(NO_FMAP_CACHE)) return;
+ /* No need to use FMAP cache in SMM */ + if (ENV_SMM) + return; + if (!ENV_ROMSTAGE_OR_BEFORE) { /* We get here if ramstage makes an FMAP access before calling cbmem_initialize(). We should avoid letting it come to that,
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45274 )
Change subject: lib/fmap: add ENV_SMM check to setup_preram_cache ......................................................................
Patch Set 6:
Automatic boot test returned (PASS/FAIL/TOTAL): 8/1/9 "QEMU x86 q35/ich9" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/19281 "QEMU x86 q35/ich9" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19280 "QEMU x86 i440fx/piix4" (x86_64) using payload SeaBIOS : FAIL : https://lava.9esec.io/r/19279 "QEMU x86 i440fx/piix4" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19278 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/19277 "HP Z220 SFF Workstation" (x86_32) using payload LinuxBoot_BusyBox_kexec : SUCCESS : https://lava.9esec.io/r/19285 "HP Z220 SFF Workstation" (x86_32) using payload LinuxBoot_BusyBox_kexec : SUCCESS : https://lava.9esec.io/r/19284 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload TianoCore : SUCCESS : https://lava.9esec.io/r/19283 "HP Compaq 8200 Elite SFF PC" (x86_32) using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/19282
Please note: This test is under development and might not be accurate at all!