From b465c99905c2e5b6e8f8c4cf0ffbcf2bf01e0a27 Mon Sep 17 00:00:00 2001 From: John Su Date: Wed, 2 Apr 2025 14:09:26 +0800 Subject: [PATCH] soc/intel/alderlake: Fix incompatible pointer-to-integer conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87091 Reviewed-by: Dtrain Hsu Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal Reviewed-by: Jayvik Desai Reviewed-by: Jérémy Compostella --- src/soc/intel/alderlake/bootblock/update_descriptor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/alderlake/bootblock/update_descriptor.c b/src/soc/intel/alderlake/bootblock/update_descriptor.c index 42c4ee21cc..ee948942d8 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; }