From 90e835db2d2ef75ea7d0999090d1806cf7f85a4a Mon Sep 17 00:00:00 2001 From: Anil Kumar Date: Mon, 22 Apr 2024 17:37:04 -0700 Subject: 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 Change-Id: Ibae06362cd80eacb16f6cf0eed8c9aa1fbfb2535 Reviewed-on: https://review.coreboot.org/c/coreboot/+/82042 Reviewed-by: Subrata Banik Reviewed-by: Eran Mitrani Reviewed-by: Jamie Ryu Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/vendorcode/google/chromeos/ramoops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vendorcode') diff --git a/src/vendorcode/google/chromeos/ramoops.c b/src/vendorcode/google/chromeos/ramoops.c index 1e3d7f009f..88081db25e 100644 --- a/src/vendorcode/google/chromeos/ramoops.c +++ b/src/vendorcode/google/chromeos/ramoops.c @@ -27,7 +27,7 @@ static void ramoops_alloc(void *arg) 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) { -- cgit v1.2.3