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 <kitching@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38706
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Joel Kitching
2020-02-04 17:36:49 +08:00
committed by Martin Roth
parent b40c600914
commit ec12bd011b
4 changed files with 36 additions and 22 deletions

View File

@ -17,7 +17,7 @@ ifneq ($(filter y,$(CONFIG_VENDORCODE_ELTAN_VBOOT) $(CONFIG_VENDORCODE_ELTAN_MBO
CPPFLAGS_common += -I$(src)/security/vboot
bootblock-y += ../../../../security/vboot/vboot_logic.c
bootblock-y += ../../../../security/vboot/vboot_lib.c
bootblock-y += vboot_check.c
postcar-y += vboot_check.c
romstage-y += vboot_check.c