Sean Rhodes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/61859 )
Change subject: drivers/smmstore/store.c: Fix static assertion for memory mapped SOCs ......................................................................
drivers/smmstore/store.c: Fix static assertion for memory mapped SOCs
This will assert for APL/GLK boards that do not align SMMStore intentionally so that they are aligned when memory mapped.
Both asserts are triggered for the below config, where SMMStore is aligned and sized correctly when memory mapped.
#define FMAP_SECTION_SMMSTORE_START 0x63f000 #define FMAP_SECTION_SMMSTORE_SIZE 0x40000
Signed-off-by: Sean Rhodes sean@starlabs.systems Change-Id: I902abd97c0d81ee7c13fa32e57279c8e55c36122 --- M src/drivers/smmstore/store.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/61859/1
diff --git a/src/drivers/smmstore/store.c b/src/drivers/smmstore/store.c index 6ba3f53..e77fbd0 100644 --- a/src/drivers/smmstore/store.c +++ b/src/drivers/smmstore/store.c @@ -11,9 +11,10 @@
#define SMMSTORE_REGION "SMMSTORE"
- +#if !CONFIG(BOOT_DEVICE_MEMORY_MAPPED) _Static_assert(IS_ALIGNED(FMAP_SECTION_SMMSTORE_START, SMM_BLOCK_SIZE), "SMMSTORE FMAP region not aligned to 64K"); +#endif
_Static_assert(SMM_BLOCK_SIZE <= FMAP_SECTION_SMMSTORE_SIZE, "SMMSTORE FMAP region must be at least 64K");