Attention is currently required from: Tim Wawrzynczak. Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63141 )
Change subject: soc/intel/alderlake/pmc_descriptor.c: Add static assert on FMAP ......................................................................
soc/intel/alderlake/pmc_descriptor.c: Add static assert on FMAP
Change-Id: I2d180353bfd69601ce03feb59101fb425859e779 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/alderlake/bootblock/pmc_descriptor.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/63141/1
diff --git a/src/soc/intel/alderlake/bootblock/pmc_descriptor.c b/src/soc/intel/alderlake/bootblock/pmc_descriptor.c index 4e80957..9bd7426 100644 --- a/src/soc/intel/alderlake/bootblock/pmc_descriptor.c +++ b/src/soc/intel/alderlake/bootblock/pmc_descriptor.c @@ -6,6 +6,7 @@ #include <commonlib/region.h> #include <console/console.h> #include <cpu/intel/cpu_ids.h> +#include <fmap_config.h> #include <fmap.h> #include <intelblocks/pmclib.h> #include <soc/bootblock.h> @@ -13,6 +14,10 @@
#define SI_DESC_REGION "SI_DESC" #define SI_DESC_REGION_SZ 4096 +/* Doing a static assert on the FMAP size will avoid some runtime problems + like finding the fmap. */ +_Static_assert(SI_DESC_REGION_SZ == FMAP_SECTION_SI_DESC_SIZE, "FMAP Section SI_DESC has a wrong size"); + #define PMC_DESC_7_BYTE3 0xc32
/* Flash Master 1 : HOST/BIOS */