From fdb07582567414f9e93c5dc0c24b2dce63485b14 Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Fri, 15 Jul 2022 08:05:56 -0400 Subject: soc/amd/common/block/apob/apob_cache.c: Add assert for APOB DRAM size Add static check to ensure the reserved APOB DRAM space is the same size as the MRC_CACHE region specified in the fmap. Update sabrina APOB DRAM size to match the fmap. TEST: Timeless builds identical. Test build with a larger MRC_CACHE than APOB DRAM failed the assert as expected. Signed-off-by: Fred Reitberger Change-Id: Ia14f6ef94b9062df0612fe96098b1012085ccf9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/65878 Reviewed-by: Felix Held Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/apob/apob_cache.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/soc/amd/common/block') diff --git a/src/soc/amd/common/block/apob/apob_cache.c b/src/soc/amd/common/block/apob/apob_cache.c index f20337734d..32207bb590 100644 --- a/src/soc/amd/common/block/apob/apob_cache.c +++ b/src/soc/amd/common/block/apob/apob_cache.c @@ -23,6 +23,9 @@ #error Incorrect APOB configuration setting(s) #endif +_Static_assert(CONFIG_PSP_APOB_DRAM_SIZE == DEFAULT_MRC_CACHE_SIZE, + "APOB DRAM reserved space != to MRC CACHE size - check your config"); + #define APOB_SIGNATURE 0x424F5041 /* 'APOB' */ /* APOB_BASE_HEADER from AGESA */ -- cgit v1.2.3