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 <patrick.rudolph@amd.com>
Change-Id: Iff01d0ea46f1bd2c32dbf4c4f65f9851fdf024e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88436
Reviewed-by: Andy Ebrahiem <ahmet.ebrahiem@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
This commit is contained in:
Patrick Rudolph 2025-07-15 09:29:01 +02:00 committed by Matt DeVillier
commit 8dcfa915f2

View file

@ -8,6 +8,7 @@
#include <amdblocks/psp.h>
#include <amdblocks/smi.h>
#include <soc/iomap.h>
#include <spi_flash.h>
#include <string.h>
#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... ");