Jonathan Zhang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
drivers/mrc_cache: generate debug messages for MRC cache update
When MRC cached data update is performed, messages are written to event log, which is flash based. For system that does not have flash based event log, the messages are lost.
Added corresponding BIOS_DEBUG messages.
Signed-off-by: Jonathan Zhang jonzhang@fb.com Change-Id: I1ef4794151fea7213c8317ddc898b0e37da280b5 --- M src/drivers/mrc_cache/mrc_cache.c 1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/41981/1
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c index 4e6e91c..73f5701 100644 --- a/src/drivers/mrc_cache/mrc_cache.c +++ b/src/drivers/mrc_cache/mrc_cache.c @@ -397,6 +397,7 @@ return;
if (!mrc_cache_needs_update(&latest_rdev, to_be_updated)) { + printk(BIOS_DEBUG, "MRC: '%s' does not need update.\n", cr->name); log_event_cache_update(cr->elog_slot, ALREADY_UPTODATE); return; } @@ -405,10 +406,13 @@
if (region_file_update_data(&cache_file, cbmem_entry_start(to_be_updated), - cbmem_entry_size(to_be_updated)) < 0) + cbmem_entry_size(to_be_updated)) < 0){ + printk(BIOS_DEBUG, "MRC: failed to update '%s'.\n", cr->name); log_event_cache_update(cr->elog_slot, UPDATE_FAILURE); - else + } else { + printk(BIOS_DEBUG, "MRC: updated '%s'.\n", cr->name); log_event_cache_update(cr->elog_slot, UPDATE_SUCCESS); + } }
/* Read flash status register to determine if write protect is active */
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... PS1, Line 409: cbmem_entry_size(to_be_updated)) < 0){ space required before the open brace '{'
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 1: Code-Review+1
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... PS1, Line 409: cbmem_entry_size(to_be_updated)) < 0){
space required before the open brace '{'
Please take care of this.
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... File src/drivers/mrc_cache/mrc_cache.c:
https://review.coreboot.org/c/coreboot/+/41981/1/src/drivers/mrc_cache/mrc_c... PS1, Line 409: cbmem_entry_size(to_be_updated)) < 0){
Please take care of this.
Sure, of course!
Hello build bot (Jenkins), Aaron Durbin, Stefan Reinauer, Duncan Laurie, Arthur Heymans, Patrick Rudolph, Ron Minnich,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/41981
to look at the new patch set (#2).
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
drivers/mrc_cache: generate debug messages for MRC cache update
When MRC cached data update is performed, messages are written to event log, which is flash based. For system that does not have flash based event log, the messages are lost.
Added corresponding BIOS_DEBUG messages.
Signed-off-by: Jonathan Zhang jonzhang@fb.com Change-Id: I1ef4794151fea7213c8317ddc898b0e37da280b5 --- M src/drivers/mrc_cache/mrc_cache.c 1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/41981/2
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 2: Code-Review+2
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 2: Code-Review+1
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
drivers/mrc_cache: generate debug messages for MRC cache update
When MRC cached data update is performed, messages are written to event log, which is flash based. For system that does not have flash based event log, the messages are lost.
Added corresponding BIOS_DEBUG messages.
Signed-off-by: Jonathan Zhang jonzhang@fb.com Change-Id: I1ef4794151fea7213c8317ddc898b0e37da280b5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41981 Reviewed-by: Duncan Laurie dlaurie@chromium.org Reviewed-by: Michael Niewöhner Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/drivers/mrc_cache/mrc_cache.c 1 file changed, 6 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved Michael Niewöhner: Looks good to me, but someone else must approve
diff --git a/src/drivers/mrc_cache/mrc_cache.c b/src/drivers/mrc_cache/mrc_cache.c index 4e6e91c..3a005db 100644 --- a/src/drivers/mrc_cache/mrc_cache.c +++ b/src/drivers/mrc_cache/mrc_cache.c @@ -397,6 +397,7 @@ return;
if (!mrc_cache_needs_update(&latest_rdev, to_be_updated)) { + printk(BIOS_DEBUG, "MRC: '%s' does not need update.\n", cr->name); log_event_cache_update(cr->elog_slot, ALREADY_UPTODATE); return; } @@ -405,10 +406,13 @@
if (region_file_update_data(&cache_file, cbmem_entry_start(to_be_updated), - cbmem_entry_size(to_be_updated)) < 0) + cbmem_entry_size(to_be_updated)) < 0) { + printk(BIOS_DEBUG, "MRC: failed to update '%s'.\n", cr->name); log_event_cache_update(cr->elog_slot, UPDATE_FAILURE); - else + } else { + printk(BIOS_DEBUG, "MRC: updated '%s'.\n", cr->name); log_event_cache_update(cr->elog_slot, UPDATE_SUCCESS); + } }
/* Read flash status register to determine if write protect is active */
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41981 )
Change subject: drivers/mrc_cache: generate debug messages for MRC cache update ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/5245 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/5244 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/5243 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/5242
Please note: This test is under development and might not be accurate at all!