Jérémy Compostella has submitted this change. ( https://review.coreboot.org/c/coreboot/+/87091?usp=email )
Change subject: soc/intel/alderlake: Fix incompatible pointer-to-integer conversion ......................................................................
soc/intel/alderlake: Fix incompatible pointer-to-integer conversion
Call update_descriptor, but the builder detected an incompatible pointer to integer conversion error, so upload CL to fix.
BUG=b:404126972 TEST=boot to ChromeOS
Change-Id: I1f8f19c6bb4636729ffe7be836c21db9a68d63d0 Signed-off-by: John Su john_su@compal.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/87091 Reviewed-by: Dtrain Hsu dtrain_hsu@compal.corp-partner.google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Kapil Porwal kapilporwal@google.com Reviewed-by: Jayvik Desai jayvik@google.com Reviewed-by: Jérémy Compostella jeremy.compostella@intel.com --- M src/soc/intel/alderlake/bootblock/update_descriptor.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Kapil Porwal: Looks good to me, approved Jayvik Desai: Looks good to me, but someone else must approve Dtrain Hsu: Looks good to me, approved Jérémy Compostella: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/alderlake/bootblock/update_descriptor.c b/src/soc/intel/alderlake/bootblock/update_descriptor.c index 42c4ee2..ee94894 100644 --- a/src/soc/intel/alderlake/bootblock/update_descriptor.c +++ b/src/soc/intel/alderlake/bootblock/update_descriptor.c @@ -23,13 +23,13 @@ static bool is_descriptor_writeable(uint8_t *desc) { /* Check flash has valid signature */ - if (read32p(desc + FLASH_SIGN_OFFSET) != FLASH_VAL_SIGN) { + if (read32p((uintptr_t)(desc + FLASH_SIGN_OFFSET)) != FLASH_VAL_SIGN) { printk(BIOS_ERR, "Flash Descriptor is not valid\n"); return false; }
/* Check host has write access to the Descriptor Region */ - if (!((read32p(desc + FLMSTR1) >> FLMSTR_WR_SHIFT_V2) & BIT(0))) { + if (!((read32p((uintptr_t)(desc + FLMSTR1)) >> FLMSTR_WR_SHIFT_V2) & BIT(0))) { printk(BIOS_ERR, "Host doesn't have write access to Descriptor Region\n"); return false; }