From ec12bd011bda6c1364102b497fefbaf65c46880f Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Tue, 4 Feb 2020 17:36:49 +0800 Subject: security/vboot: relocate vb2ex_abort and vb2ex_printf Enabling an assertion in vb2_member_of() results in coreboot linking vb2ex_abort() and vb2ex_printf() in ramstage. Move these two functions from vboot_logic.c to vboot_lib.c, which is should be enabled in all stages if CONFIG_VBOOT_LIB is enabled. Note that CONFIG_VBOOT_LIB is implied by CONFIG_VBOOT. Relevant vboot_reference commit: CL:2037263. BUG=b:124141368, chromium:1005700 TEST=make clean && make test-abuild BRANCH=none Change-Id: Ica0103c5684b3d50ba7dc1b4c39559cb192efa81 Signed-off-by: Joel Kitching Reviewed-on: https://review.coreboot.org/c/coreboot/+/38706 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/security/vboot/vboot_logic.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/security/vboot/vboot_logic.c') diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index 1d17a17657..182128c547 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -17,8 +17,6 @@ #include #include #include -#include -#include #include #include #include @@ -37,20 +35,6 @@ /* exports */ -void vb2ex_printf(const char *func, const char *fmt, ...) -{ - va_list args; - - if (func) - printk(BIOS_INFO, "VB2:%s() ", func); - - va_start(args, fmt); - vprintk(BIOS_INFO, fmt, args); - va_end(args); - - return; -} - vb2_error_t vb2ex_read_resource(struct vb2_context *ctx, enum vb2_resource_index index, uint32_t offset, @@ -83,11 +67,6 @@ vb2_error_t vb2ex_read_resource(struct vb2_context *ctx, return VB2_SUCCESS; } -void vb2ex_abort(void) -{ - die("vboot has aborted execution; exit\n"); -} - /* No-op stubs that can be overridden by SoCs with hardware crypto support. */ __weak vb2_error_t vb2ex_hwcrypto_digest_init(enum vb2_hash_algorithm hash_alg, uint32_t data_size) -- cgit v1.2.3