From 8dcfa915f292b4e1546f159e32ac078b5628dbfd Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Tue, 15 Jul 2025 09:29:01 +0200 Subject: [PATCH] soc/amd/common/block/psp: Probe SPI flash early When SOC_AMD_COMMON_BLOCK_PSP_SMI is enabled probe for the SPI flash before actually servicing PSP SMI requests. This allows to check the SPI flash status register in the following SMIs if the flash is busy without needing to probe it first. Signed-off-by: Patrick Rudolph Change-Id: Iff01d0ea46f1bd2c32dbf4c4f65f9851fdf024e1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/88436 Reviewed-by: Andy Ebrahiem Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Alicja Michalska --- src/soc/amd/common/block/psp/psp_smm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/soc/amd/common/block/psp/psp_smm.c b/src/soc/amd/common/block/psp/psp_smm.c index 671942b0f8..7fade174d7 100644 --- a/src/soc/amd/common/block/psp/psp_smm.c +++ b/src/soc/amd/common/block/psp/psp_smm.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "psp_def.h" @@ -93,6 +94,9 @@ int psp_notify_smm(void) if (CONFIG(SOC_AMD_COMMON_BLOCK_PSP_SMI)) { configure_psp_smi(); enable_psp_smi(); + + /* Probe for SPI flash now as it's likely not busy */ + assert(boot_device_spi_flash()); } printk(BIOS_DEBUG, "PSP: Notify SMM info... ");