soc/intel/alderlake/bootblock: Use read32p()

Change-Id: I3062e5b8a0524059b9695dfd32254c5c53598925
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70578
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Elyes Haouas 2022-12-11 10:22:34 +01:00 committed by Felix Held
parent 50f651baea
commit 347b471901
1 changed files with 2 additions and 2 deletions

View File

@ -23,13 +23,13 @@
static bool is_descriptor_writeable(uint8_t *desc) static bool is_descriptor_writeable(uint8_t *desc)
{ {
/* Check flash has valid signature */ /* Check flash has valid signature */
if (read32((void *)(desc + FLASH_SIGN_OFFSET)) != FLASH_VAL_SIGN) { if (read32p(desc + FLASH_SIGN_OFFSET) != FLASH_VAL_SIGN) {
printk(BIOS_ERR, "Flash Descriptor is not valid\n"); printk(BIOS_ERR, "Flash Descriptor is not valid\n");
return 0; return 0;
} }
/* Check host has write access to the Descriptor Region */ /* Check host has write access to the Descriptor Region */
if (!((read32((void *)(desc + FLMSTR1)) >> FLMSTR_WR_SHIFT_V2) & BIT(0))) { if (!((read32p(desc + FLMSTR1) >> FLMSTR_WR_SHIFT_V2) & BIT(0))) {
printk(BIOS_ERR, "Host doesn't have write access to Descriptor Region\n"); printk(BIOS_ERR, "Host doesn't have write access to Descriptor Region\n");
return 0; return 0;
} }