Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50401 )
Change subject: soc/amd/picasso: move bert_reserved_region to common/block/cpu/noncar ......................................................................
soc/amd/picasso: move bert_reserved_region to common/block/cpu/noncar
The same functionality will eventually be needed on Cezanne.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: Ib49124c2c774ad3352ea2f7d8d827388029be041 --- M src/soc/amd/common/block/cpu/noncar/memmap.c M src/soc/amd/picasso/Makefile.inc D src/soc/amd/picasso/memmap.c 3 files changed, 20 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/50401/1
diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c index 470b517..9791130 100644 --- a/src/soc/amd/common/block/cpu/noncar/memmap.c +++ b/src/soc/amd/common/block/cpu/noncar/memmap.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <amdblocks/memmap.h> +#include <arch/bert_storage.h> #include <console/console.h> #include <cbmem.h> #include <cpu/amd/msr.h> @@ -79,3 +80,22 @@ once = 1; } } + +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); +} diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index b7eed5b..dce1d69 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -24,7 +24,6 @@ romstage-y += romstage.c romstage-y += gpio.c romstage-y += reset.c -romstage-y += memmap.c romstage-y += uart.c romstage-y += psp.c romstage-y += mrc_cache.c @@ -47,7 +46,6 @@ ramstage-y += reset.c ramstage-y += acp.c ramstage-y += sata.c -ramstage-y += memmap.c ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smi.c ramstage-y += uart.c ramstage-y += finalize.c diff --git a/src/soc/amd/picasso/memmap.c b/src/soc/amd/picasso/memmap.c deleted file mode 100644 index 970d1373d..0000000 --- a/src/soc/amd/picasso/memmap.c +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <assert.h> -#include <stdint.h> -#include <console/console.h> -#include <arch/bert_storage.h> -#include <memrange.h> -#include <fsp/util.h> -#include <FspGuids.h> - -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); -}