diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-07-26 17:53:24 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-07-27 16:02:19 +0000 |
commit | 2cb2b185dac1fd836e0ca9d84b25bf705131ed09 (patch) | |
tree | c5039e03d0bff8ea64aa518c0169480c490996b8 | |
parent | f3cdd0110da9b13c38ede5ad0a9cdebef7ae0622 (diff) |
soc/amd/noncar/memmap.c: Support non-FSP use cases
Without FSP we assume TSEG is right above CBMEM.
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8700803617c3fe4890e497c6d7b94f1d36e21cb4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76472
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/memmap.c | 7 |
1 files changed, 6 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 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(); |