Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35364 )
Change subject: drivers/intel/fsp2_0: Add NULL pointer debug messages to UPD ......................................................................
drivers/intel/fsp2_0: Add NULL pointer debug messages to UPD
Check for a NULL pointer before displaying UPD information in case the new area wasn't allocated.
Change-Id: I28febfb04c2e5e68c43a0db499686bbbcd80afef Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/drivers/intel/fsp2_0/upd_display.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/35364/1
diff --git a/src/drivers/intel/fsp2_0/upd_display.c b/src/drivers/intel/fsp2_0/upd_display.c index 363ee36..8f6f937 100644 --- a/src/drivers/intel/fsp2_0/upd_display.c +++ b/src/drivers/intel/fsp2_0/upd_display.c @@ -28,6 +28,11 @@ static void fspm_display_arch_params(const FSPM_ARCH_UPD *old, const FSPM_ARCH_UPD *new) { + if (!new) { + printk(BIOS_SPEW, "Skipping architectural UPD display for MemoryInit - no new value region\n"); + return; + } + /* Display the architectural parameters for MemoryInit */ printk(BIOS_SPEW, "Architectural UPD values for MemoryInit at: 0x%p\n", new); @@ -53,6 +58,11 @@ const FSPM_UPD *fspm_old_upd, const FSPM_UPD *fspm_new_upd) { + if (!fspm_new_upd) { + printk(BIOS_SPEW, "Skipping MemoryInit UPD values - no new value region\n"); + return; + } + printk(BIOS_SPEW, "UPD values for MemoryInit:\n"); hexdump(fspm_new_upd, sizeof(*fspm_new_upd)); } @@ -70,6 +80,11 @@ const FSPS_UPD *fsps_old_upd, const FSPS_UPD *fsps_new_upd) { + if (!fsps_new_upd) { + printk(BIOS_SPEW, "Skipping SiliconInit UPD values - no new value region\n"); + return; + } + printk(BIOS_SPEW, "UPD values for SiliconInit:\n"); hexdump(fsps_new_upd, sizeof(*fsps_new_upd)); }