Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/82042?usp=email )
Change subject: vc/google/chromeos: Move RAMOOPS region creation to BS_DEV_INIT_CHIPS ......................................................................
vc/google/chromeos: Move RAMOOPS region creation to BS_DEV_INIT_CHIPS
RAMOOPS memory region was being overwritten by coreboot bmp_load_logo() function. The CBMEM_ID_FSP_LOGO region created during bmp_load_logo() was overlapping with RAMOOPS space created earlier. This resulted in memory corruption of RAMOOPS buffer.
To prevent this, the RAMOOPS region allocation is moved to BS_DEV_INIT_CHIPS phase from earlier BS_WRITE_TABLES phase of boot.
BUG=b:332910298 TEST=build and boot coreboot image on google/rex HW. Check RAMOOPS CBMEM region creation using cbmem -l command
Signed-off-by: Anil Kumar anil.kumar.k@intel.com Change-Id: Ibae06362cd80eacb16f6cf0eed8c9aa1fbfb2535 Reviewed-on: https://review.coreboot.org/c/coreboot/+/82042 Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Eran Mitrani mitrani@google.com Reviewed-by: Jamie Ryu jamie.m.ryu@intel.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/vendorcode/google/chromeos/ramoops.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Subrata Banik: Looks good to me, approved build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Eran Mitrani: Looks good to me, approved Jamie Ryu: Looks good to me, but someone else must approve
diff --git a/src/vendorcode/google/chromeos/ramoops.c b/src/vendorcode/google/chromeos/ramoops.c index 1e3d7f0..88081db 100644 --- a/src/vendorcode/google/chromeos/ramoops.c +++ b/src/vendorcode/google/chromeos/ramoops.c @@ -27,7 +27,7 @@ chromeos_set_ramoops(ram_oops, size); }
-BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, ramoops_alloc, NULL); +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT_CHIPS, BS_ON_ENTRY, ramoops_alloc, NULL);
void lb_ramoops(struct lb_header *header) {