1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
8 static void psp_set_spl_fuse(void *unused
)
12 struct mbox_cmd_late_spl_buffer buffer
= {
14 .size
= sizeof(buffer
)
18 if (soc_read_c2p38(&c2p38
) != CB_SUCCESS
) {
19 printk(BIOS_ERR
, "PSP: Failed to get base address.\n");
23 if (c2p38
& CORE_2_PSP_MSG_38_FUSE_SPL
) {
24 printk(BIOS_DEBUG
, "PSP: SPL Fusing may be updated.\n");
26 printk(BIOS_DEBUG
, "PSP: SPL Fusing not currently required.\n");
30 if (c2p38
& CORE_2_PSP_MSG_38_SPL_FUSE_ERROR
) {
31 printk(BIOS_ERR
, "PSP: SPL Table does not meet fuse requirements.\n");
35 if (c2p38
& CORE_2_PSP_MSG_38_SPL_ENTRY_ERROR
) {
36 printk(BIOS_ERR
, "PSP: Critical SPL entry missing or current firmware does"
37 " not meet requirements.\n");
41 if (c2p38
& CORE_2_PSP_MSG_38_SPL_ENTRY_MISSING
) {
42 printk(BIOS_ERR
, "PSP: Table of critical SPL values is missing.\n");
46 if (!CONFIG(PERFORM_SPL_FUSING
))
49 printk(BIOS_DEBUG
, "PSP: SPL Fusing Update Requested.\n");
50 cmd_status
= send_psp_command(MBOX_BIOS_CMD_SET_SPL_FUSE
, &buffer
);
51 psp_print_cmd_status(cmd_status
, NULL
);
54 BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD
, BS_ON_ENTRY
, psp_set_spl_fuse
, NULL
);