Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63139 )
Change subject: Revert "soc/intel/alderlake: Use Kconfigs for Descriptor Region" ......................................................................
Revert "soc/intel/alderlake: Use Kconfigs for Descriptor Region"
USe FMAP offsets directly with static asserts instead of defining a Kconfig variable.
This reverts commit be082fe9f401304c29a839c63a835e793b9f41ff.
Change-Id: Ie858341f0723a6b278ea53960f1e09b37bc82d83 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/intel/alderlake/bootblock/pmc_descriptor.c 1 file changed, 9 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/63139/1
diff --git a/src/soc/intel/alderlake/bootblock/pmc_descriptor.c b/src/soc/intel/alderlake/bootblock/pmc_descriptor.c index c585f70..4e80957 100644 --- a/src/soc/intel/alderlake/bootblock/pmc_descriptor.c +++ b/src/soc/intel/alderlake/bootblock/pmc_descriptor.c @@ -11,6 +11,8 @@ #include <soc/bootblock.h> #include <types.h>
+#define SI_DESC_REGION "SI_DESC" +#define SI_DESC_REGION_SZ 4096 #define PMC_DESC_7_BYTE3 0xc32
/* Flash Master 1 : HOST/BIOS */ @@ -42,19 +44,18 @@ /* It updates PMC Descriptor in the Descriptor Region */ void configure_pmc_descriptor(void) { - uint8_t si_desc_buf[CONFIG_SI_DESC_REGION_SZ]; + uint8_t si_desc_buf[SI_DESC_REGION_SZ]; struct region_device desc_rdev;
if (cpu_get_cpuid() != CPUID_ALDERLAKE_A0) return;
- if (fmap_locate_area_as_rdev_rw(CONFIG_SI_DESC_REGION, &desc_rdev) < 0) { - printk(BIOS_ERR, "Failed to locate %s in the FMAP\n", CONFIG_SI_DESC_REGION); + if (fmap_locate_area_as_rdev_rw(SI_DESC_REGION, &desc_rdev) < 0) { + printk(BIOS_ERR, "Failed to locate %s in the FMAP\n", SI_DESC_REGION); return; }
- if (rdev_readat(&desc_rdev, si_desc_buf, 0, CONFIG_SI_DESC_REGION_SZ) != - CONFIG_SI_DESC_REGION_SZ) { + if (rdev_readat(&desc_rdev, si_desc_buf, 0, SI_DESC_REGION_SZ) != SI_DESC_REGION_SZ) { printk(BIOS_ERR, "Failed to read Descriptor Region from SPI Flash\n"); return; } @@ -69,13 +70,13 @@
si_desc_buf[PMC_DESC_7_BYTE3] = 0x44;
- if (rdev_eraseat(&desc_rdev, 0, CONFIG_SI_DESC_REGION_SZ) != CONFIG_SI_DESC_REGION_SZ) { + if (rdev_eraseat(&desc_rdev, 0, SI_DESC_REGION_SZ) != SI_DESC_REGION_SZ) { printk(BIOS_ERR, "Failed to erase Descriptor Region area\n"); return; }
- if (rdev_writeat(&desc_rdev, si_desc_buf, 0, CONFIG_SI_DESC_REGION_SZ) - != CONFIG_SI_DESC_REGION_SZ) { + if (rdev_writeat(&desc_rdev, si_desc_buf, 0, SI_DESC_REGION_SZ) + != SI_DESC_REGION_SZ) { printk(BIOS_ERR, "Failed to update Descriptor Region\n"); return; }