diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/psp_verstage/include/psp_verstage.h | 2 | ||||
-rw-r--r-- | src/soc/amd/common/psp_verstage/psp_verstage.c | 19 | ||||
-rw-r--r-- | src/soc/amd/mendocino/Kconfig | 1 | ||||
-rw-r--r-- | src/soc/amd/mendocino/psp_verstage/chipset.c | 22 |
4 files changed, 25 insertions, 19 deletions
diff --git a/src/soc/amd/common/psp_verstage/include/psp_verstage.h b/src/soc/amd/common/psp_verstage/include/psp_verstage.h index dd3d2b35ca..c3240fab56 100644 --- a/src/soc/amd/common/psp_verstage/include/psp_verstage.h +++ b/src/soc/amd/common/psp_verstage/include/psp_verstage.h @@ -68,6 +68,8 @@ void platform_report_mode(int developer_mode_enabled); void update_psp_fw_hash_table(const char *fname); +void report_prev_boot_status_to_vboot(void); + void report_hsp_secure_state(void); #endif /* PSP_VERSTAGE_H */ diff --git a/src/soc/amd/common/psp_verstage/psp_verstage.c b/src/soc/amd/common/psp_verstage/psp_verstage.c index 33d92180c5..88d429936d 100644 --- a/src/soc/amd/common/psp_verstage/psp_verstage.c +++ b/src/soc/amd/common/psp_verstage/psp_verstage.c @@ -137,25 +137,6 @@ static uint32_t update_boot_region(struct vb2_context *ctx) return 0; } -static void report_prev_boot_status_to_vboot(void) -{ - uint32_t boot_status = 0; - int ret; - struct vb2_context *ctx = vboot_get_context(); - - /* Already in recovery mode. No need to report previous boot status. */ - if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) - return; - - ret = svc_get_prev_boot_status(&boot_status); - if (ret != BL_OK || boot_status) { - printk(BIOS_ERR, "PSPFW failure in previous boot: %d:%#8x\n", ret, boot_status); - vbnv_init(); - vb2api_previous_boot_fail(ctx, VB2_RECOVERY_FW_VENDOR_BLOB, - boot_status ? (int)boot_status : ret); - } -} - /* * Save workbuf (and soon memory console and timestamps) to the bootloader to pass * back to coreboot. diff --git a/src/soc/amd/mendocino/Kconfig b/src/soc/amd/mendocino/Kconfig index 528633391c..7faa479363 100644 --- a/src/soc/amd/mendocino/Kconfig +++ b/src/soc/amd/mendocino/Kconfig @@ -24,6 +24,7 @@ config SOC_AMD_REMBRANDT_BASE select PARALLEL_MP_AP_WORK select PLATFORM_USES_FSP2_0 select PROVIDES_ROM_SHARING + select PSP_INCLUDES_HSP select PSP_SUPPORTS_EFS2_RELATIVE_ADDR if VBOOT_STARTS_BEFORE_BOOTBLOCK select PSP_VERSTAGE_CCP_DMA if VBOOT_STARTS_BEFORE_BOOTBLOCK select RESET_VECTOR_IN_RAM diff --git a/src/soc/amd/mendocino/psp_verstage/chipset.c b/src/soc/amd/mendocino/psp_verstage/chipset.c index c892b19e30..7572756b2d 100644 --- a/src/soc/amd/mendocino/psp_verstage/chipset.c +++ b/src/soc/amd/mendocino/psp_verstage/chipset.c @@ -2,12 +2,15 @@ /* TODO: Check if this is still correct */ +#include "2api.h" #include <arch/hlt.h> #include <bl_uapp/bl_errorcodes_public.h> #include <bl_uapp/bl_syscall_public.h> #include <cbfs.h> #include <console/console.h> #include <psp_verstage.h> +#include <security/vboot/misc.h> +#include <security/vboot/vbnv.h> /* * We can't pass pointer to hash table in the SPI. @@ -116,6 +119,25 @@ void platform_report_mode(int developer_mode_enabled) svc_set_platform_boot_mode(CHROME_BOOK_BOOT_MODE_NORMAL); } +void report_prev_boot_status_to_vboot(void) +{ + uint32_t boot_status = 0; + int ret; + struct vb2_context *ctx = vboot_get_context(); + + /* Already in recovery mode. No need to report previous boot status. */ + if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) + return; + + ret = svc_get_prev_boot_status(&boot_status); + if (ret != BL_OK || boot_status) { + printk(BIOS_ERR, "PSPFW failure in previous boot: %d:%#8x\n", ret, boot_status); + vbnv_init(); + vb2api_previous_boot_fail(ctx, VB2_RECOVERY_FW_VENDOR_BLOB, + boot_status ? (int)boot_status : ret); + } +} + void report_hsp_secure_state(void) { uint32_t hsp_secure_state; |