From 2cb2b185dac1fd836e0ca9d84b25bf705131ed09 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 26 Jul 2023 17:53:24 +0200 Subject: soc/amd/noncar/memmap.c: Support non-FSP use cases Without FSP we assume TSEG is right above CBMEM. Signed-off-by: Arthur Heymans Signed-off-by: Felix Held Change-Id: I8700803617c3fe4890e497c6d7b94f1d36e21cb4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76472 Reviewed-by: Eric Lai Reviewed-by: Martin L Roth Reviewed-by: Fred Reitberger Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/cpu/noncar/memmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/soc') diff --git a/src/soc/amd/common/block/cpu/noncar/memmap.c b/src/soc/amd/common/block/cpu/noncar/memmap.c index b0e4bcb2c6..e21cff8a3c 100644 --- a/src/soc/amd/common/block/cpu/noncar/memmap.c +++ b/src/soc/amd/common/block/cpu/noncar/memmap.c @@ -35,7 +35,12 @@ void smm_region(uintptr_t *start, size_t *size) { static int once; - fsp_get_smm_region(start, size); + if (CONFIG(PLATFORM_USES_FSP2_0)) { + fsp_get_smm_region(start, size); + } else { + *start = (uintptr_t)cbmem_top(); + *size = CONFIG_SMM_TSEG_SIZE; + } if (!once) { clear_tvalid(); -- cgit v1.2.3