summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-06-07 22:09:04 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-06-23 14:36:19 +0000
commit8c3a8df1021b8a2789c2a285557401837f9fc2b8 (patch)
tree830fffc935ceb2f77464e19210f56484020f9898
parent3694cc737aa1a126b617db7d93a730e44b1b3c37 (diff)
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 <rrangel@chromium.org> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ie640e91c19ae5f9b275cc333284b4be34211fbf6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55279 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
-rw-r--r--src/soc/amd/common/block/cpu/noncar/memmap.c2
1 files changed, 1 insertions, 1 deletions
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);
}