Attention is currently required from: Fred Reitberger, Jason Glenesk, Matt DeVillier.
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85237?usp=email )
Change subject: soc/amd/common/psp: add delay after boot done command in PSP SMI case ......................................................................
soc/amd/common/psp: add delay after boot done command in PSP SMI case
When the PSP SMI support is enabled, the PSP might send PSP SMI commands to the SMI handler to access the SPI flash. This seems to interfere with some Windows kernel driver, causing the OS to get stuck early in the boot process somewhere between when it sends the enter ACPI mode SMI and when it starts the boot animation. Adding a 5s delay after the boot done PSP mailbox command in this case makes sure that this will be done before the OS takes over which avoids the problem.
TEST=Now Windows 10 boots successfully every time when the PSP SMI support is enabled. Before that the first boot after power on failed due to PSP SMI flash access activity or possibly due to the PSP not being done with its flash write and RPMC activity. In subsequent boots no flash access PSP SMIs were sent from the PSP and the system booted successfully.
Change-Id: Icd4b76af829cfaa48e02da2ed224599b863af3b0 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/common/block/psp/psp.c 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/85237/1
diff --git a/src/soc/amd/common/block/psp/psp.c b/src/soc/amd/common/block/psp/psp.c index 9ad04e1..822887e 100644 --- a/src/soc/amd/common/block/psp/psp.c +++ b/src/soc/amd/common/block/psp/psp.c @@ -3,6 +3,7 @@ #include <device/mmio.h> #include <bootstate.h> #include <console/console.h> +#include <delay.h> #include <amdblocks/psp.h> #include <soc/iomap.h> #include "psp_def.h" @@ -121,6 +122,18 @@
/* buffer's status shouldn't change but report it if it does */ psp_print_cmd_status(cmd_status, &buffer.header); + + /* + * When SOC_AMD_COMMON_BLOCK_PSP_SMI is selected, the PSP might send some PSP SMI + * commands after the MBOX_BIOS_CMD_BOOT_DONE command has been sent to the PSP. Since + * coreboot is rather fast, this happens after coreboot handed over to the payload and + * OS. This caused symptoms like the Windows kernel getting stuck very early during + * boot shortly after the kernel has sent the SMI to enter ACPI mode. Adding a delay in + * this case, makes the problem go away. Not too happy about that, but I'm not sure yet + * how to handle that in a better way. + */ + if (CONFIG(SOC_AMD_COMMON_BLOCK_PSP_SMI)) + delay(5); }
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, psp_notify_boot_done, NULL);