Joel Kitching has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38886 )
Change subject: vboot: use vb2api_get_recovery_reason function ......................................................................
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 kitching@google.com Cq-Depend: chromium:2055662 --- M src/security/vboot/bootmode.c 1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/38886/1
diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c index 50b3cc3..2363bf9 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 <assert.h> #include <bootmode.h> #include <bootstate.h> @@ -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)
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38886 )
Change subject: vboot: use vb2api_get_recovery_reason function ......................................................................
Patch Set 1: Code-Review+2
Joel Kitching has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38886 )
Change subject: vboot: use vb2api_get_recovery_reason function ......................................................................
Patch Set 2:
Ready for commit
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38886 )
Change subject: vboot: use vb2api_get_recovery_reason function ......................................................................
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 kitching@google.com Cq-Depend: chromium:2055662 Reviewed-on: https://review.coreboot.org/c/coreboot/+/38886 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/security/vboot/bootmode.c 1 file changed, 1 insertion(+), 4 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/security/vboot/bootmode.c b/src/security/vboot/bootmode.c index 50b3cc3..2363bf9 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 <assert.h> #include <bootmode.h> #include <bootstate.h> @@ -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)
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38886 )
Change subject: vboot: use vb2api_get_recovery_reason function ......................................................................
Patch Set 4:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/706 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/705 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/704
Please note: This test is under development and might not be accurate at all!