diff --git a/src/soc/amd/common/block/psp/psp_gen2.c b/src/soc/amd/common/block/psp/psp_gen2.c index 92063d6cdb..e4adc8bf39 100644 --- a/src/soc/amd/common/block/psp/psp_gen2.c +++ b/src/soc/amd/common/block/psp/psp_gen2.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include "psp_def.h" @@ -12,7 +13,10 @@ #define PSP_MAILBOX_BUFFER_H_OFFSET 0x10578 /* 4 bytes */ #define CORE_2_PSP_MSG_38_OFFSET 0x10998 /* 4 byte */ -#define CORE_2_PSP_MSG_38_FUSE_SPL BIT(12) +#define CORE_2_PSP_MSG_38_FUSE_SPL BIT(12) +#define CORE_2_PSP_MSG_38_SPL_FUSE_ERROR BIT(13) +#define CORE_2_PSP_MSG_38_SPL_ENTRY_ERROR BIT(14) +#define CORE_2_PSP_MSG_38_SPL_ENTRY_MISSING BIT(15) union pspv2_mbox_command { u32 val; @@ -131,6 +135,22 @@ void psp_set_spl_fuse(void *unused) return; } + if (c2p38 & CORE_2_PSP_MSG_38_SPL_FUSE_ERROR) { + printk(BIOS_ERR, "PSP: SPL Table does not meet fuse requirements.\n"); + return; + } + + if (c2p38 & CORE_2_PSP_MSG_38_SPL_ENTRY_ERROR) { + printk(BIOS_ERR, "PSP: Critical SPL entry missing or current firmware does" + " not meet requirements.\n"); + return; + } + + if (c2p38 & CORE_2_PSP_MSG_38_SPL_ENTRY_MISSING) { + printk(BIOS_ERR, "PSP: Table of critical SPL values is missing.\n"); + return; + } + if (!CONFIG(SOC_AMD_COMMON_BLOCK_PSP_FUSE_SPL)) return;