From 8c3a8df1021b8a2789c2a285557401837f9fc2b8 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 7 Jun 2021 22:09:04 +0200 Subject: [PATCH] soc/amd/common/block/cpu/noncar/memmap: move BERT region back into CBMEM The original reason the BERT table was moved out of CBMEM was because the OS was not able to access the region. This happened because the CBMEM region was marked as type 16 in the e820 table. The OS isn't aware of this type, so it prevents any drivers from accessing it. Depthcharge now correctly labels the CBMEM region as reserved in the e820 table so we can move the BERT table into CBMEM. TEST=BERT ACPI table generation still works on AMD/Mandolin with SeaBIOS as payload and BERT region inside CBMEM is inside a BIOS-e820 reserved range. BERT generation also works on Zork with depthcharge. Link: https://crrev.com/c/2939677 Signed-off-by: Raul E Rangel Signed-off-by: Felix Held Change-Id: Ie640e91c19ae5f9b275cc333284b4be34211fbf6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55279 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/soc/amd/common/block/cpu/noncar/memmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c index c4a9643c11..325e36b106 100644 --- a/src/soc/amd/common/block/cpu/noncar/memmap.c +++ b/src/soc/amd/common/block/cpu/noncar/memmap.c @@ -62,7 +62,7 @@ void smm_region(uintptr_t *start, size_t *size) void bert_reserved_region(void **start, size_t *size) { - *start = cbmem_top(); + *start = cbmem_add(CBMEM_ID_ACPI_BERT, CONFIG_ACPI_BERT_SIZE); *size = CONFIG_ACPI_BERT_SIZE; printk(BIOS_INFO, "Reserved BERT region base: %p, size: 0x%lx\n", *start, *size); }