Attention is currently required from: Jason Glenesk, Raul Rangel, Matt DeVillier, Fred Reitberger, Felix Held.
Jon Murphy has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/71887 )
Change subject: soc/amd/common/psp_verstage: Unused plat calls ......................................................................
soc/amd/common/psp_verstage: Unused plat calls
Remove unused references from platform calls to be more consistent in code layout. This is better from a style standpoint in that unused functions won't be declared for platforms. It still provides an addtional failure mechanism should a platform try to use an undefined function, linking will fail.
BUG=None TEST=Builds and boots to ChromeOS on affected platforms
Signed-off-by: Jon Murphy jpmurphy@google.com Change-Id: Icd4cad3dc5f94f07ed535c94d2877c2011aba41d --- M src/soc/amd/common/psp_verstage/include/psp_verstage.h M src/soc/amd/common/psp_verstage/psp_verstage.c M src/soc/amd/mendocino/psp_verstage/chipset.c M src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h M src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h 5 files changed, 43 insertions(+), 37 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/71887/1
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 dd3d2b3..c3240fa 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 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 506086d..3f720ac 100644 --- a/src/soc/amd/common/psp_verstage/psp_verstage.c +++ b/src/soc/amd/common/psp_verstage/psp_verstage.c @@ -138,25 +138,6 @@ 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/psp_verstage/chipset.c b/src/soc/amd/mendocino/psp_verstage/chipset.c index d4d399e..048adf5 100644 --- a/src/soc/amd/mendocino/psp_verstage/chipset.c +++ b/src/soc/amd/mendocino/psp_verstage/chipset.c @@ -2,11 +2,14 @@
/* TODO: Check if this is still correct */
+#include "2api.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. @@ -115,6 +118,25 @@ 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; diff --git a/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h index 1468e5b..d88bfe1 100644 --- a/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h +++ b/src/vendorcode/amd/fsp/cezanne/include/bl_uapp/bl_syscall_public.h @@ -343,15 +343,6 @@ -----------------------------------------------------------------------------*/ uint32_t svc_set_platform_boot_mode(enum chrome_platform_boot_mode boot_mode);
-/* Get the previous boot status. - * - * Parameters: - * - boot_status - Address where the boot status is read into - * - * Return value: BL_OK or error code - */ -uint32_t svc_get_prev_boot_status(uint32_t *boot_status); - /* C entry point for the Bootloader Userspace Application */ void Main(void);
diff --git a/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h b/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h index 20cebe6..0c168a9 100644 --- a/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h +++ b/src/vendorcode/amd/fsp/picasso/include/bl_uapp/bl_syscall_public.h @@ -410,15 +410,6 @@ return BL_ERR_UNSUPPORTED_PLATFORM; }
-/* Get the previous boot status. - * - * Parameters: - * - boot_status - Address where the boot status is read into - * - * Return value: BL_OK or error code - */ -uint32_t svc_get_prev_boot_status(uint32_t *boot_status); - /* C entry point for the Bootloader Userspace Application */ void Main(void);