From 338e9dcd6bea50fce0c317ee497eb4acb620ce88 Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Fri, 14 Feb 2020 15:41:11 +0800 Subject: vboot: use vb2api_get_recovery_reason function Use vb2api_get_recovery_reason() API function rather than accessing vb2_shared_data internals. Of all the vanilla verified boot code in coreboot, this is the last remaining use of vboot's internal data structures in coreboot. There remains only one sole instance in Eltan's code. BUG=b:124141368, chromium:957880 TEST=make clean && make test-abuild BRANCH=none Change-Id: I845c9b14ffa830bc7de28e9a38188f7066871803 Signed-off-by: Joel Kitching Cq-Depend: chromium:2055662 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38886 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/security/vboot/bootmode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/security/vboot') diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c index 50b3cc3b6c..2363bf9588 100644 --- a/src/security/vboot/bootmode.c +++ b/src/security/vboot/bootmode.c @@ -13,8 +13,6 @@ * GNU General Public License for more details. */ -#define NEED_VB20_INTERNALS /* Peeking into vb2_shared_data */ - #include #include #include @@ -31,8 +29,7 @@ int vboot_check_recovery_request(void) { - /* TODO: Expose vb2api_recovery_reason() and vb2api_need_train_and_reboot(). */ - return vb2_get_sd(vboot_get_context())->recovery_reason; + return vb2api_get_recovery_reason(vboot_get_context()); } int vboot_recovery_mode_enabled(void) -- cgit v1.2.3