summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorFred Reitberger <reitbergerfred@gmail.com>2022-07-15 08:05:56 -0400
committerFelix Held <felix-coreboot@felixheld.de>2022-08-01 20:44:09 +0000
commitfdb07582567414f9e93c5dc0c24b2dce63485b14 (patch)
tree69c012cd6a7980dcb9a7997fba02a733888e33de /src/soc/amd/common/block
parent0b4f49c792c21a9a806cc57a5563da4947abc0be (diff)
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 <reitbergerfred@gmail.com> Change-Id: Ia14f6ef94b9062df0612fe96098b1012085ccf9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/65878 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/apob/apob_cache.c3
1 files changed, 3 insertions, 0 deletions
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 */