summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/cpu/noncar/memmap.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-04-21 21:21:11 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-05-21 11:22:59 +0000
commit7608ea0c9f6c8763bd80628adf2d977e60823275 (patch)
treed9dfab540638a69c1b2498075f88e8479af5c1fa /src/soc/amd/common/block/cpu/noncar/memmap.c
parentb192af12e3e483699f2e75790b2eb6e79b5b4f71 (diff)
downloadcoreboot-7608ea0c9f6c8763bd80628adf2d977e60823275.tar.xz
soc/amd/cezanne,common,picasso: use BERT region reserved by FSP driver
commit ce0e2a014009390c4527e064efb59260ef4d3a3b (drivers/intel/fsp2_0: use FSP to allocate APEI BERT memory region) adds a mechanism to reserve the BERT region inside the coreboot code, so we can get rid of the workaround to reserve it in the FSP and return the location in a HOB. mcfg->bert_size defaults to 0 which makes the FSP not generate the corresponding HOB, but that field is planned to be removed at least on Cezanne, so don't explicitly set it to 0. BUG=b:169934025 TEST=BERT table that gets generated in a follow-up patch for Picasso points to expected BERT region and Linux is able to access, decode and display it. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Iaca89b47793bf9982181560f026459a18e7db134 Reviewed-on: https://review.coreboot.org/c/coreboot/+/52584 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block/cpu/noncar/memmap.c')
-rw-r--r--src/soc/amd/common/block/cpu/noncar/memmap.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c
index 6ec437cb1d..c4a9643c11 100644
--- a/src/soc/amd/common/block/cpu/noncar/memmap.c
+++ b/src/soc/amd/common/block/cpu/noncar/memmap.c
@@ -62,19 +62,7 @@ void smm_region(uintptr_t *start, size_t *size)
void bert_reserved_region(void **start, size_t *size)
{
- struct range_entry bert;
- int status;
-
- *start = NULL;
- *size = 0;
-
- status = fsp_find_range_hob(&bert, AMD_FSP_BERT_HOB_GUID.b);
-
- if (status < 0) {
- printk(BIOS_ERR, "Error: unable to find BERT HOB\n");
- return;
- }
-
- *start = (void *)(uintptr_t)range_entry_base(&bert);
- *size = range_entry_size(&bert);
+ *start = cbmem_top();
+ *size = CONFIG_ACPI_BERT_SIZE;
+ printk(BIOS_INFO, "Reserved BERT region base: %p, size: 0x%lx\n", *start, *size);
}