summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2020-02-14 15:41:11 +0800
committerPatrick Georgi <pgeorgi@google.com>2020-02-19 12:08:03 +0000
commit338e9dcd6bea50fce0c317ee497eb4acb620ce88 (patch)
tree9aad955f07c738cd587d592eef50b8873f0a62ce /src/security
parent24d994afd227446087a24ae26bfe3df0df34767b (diff)
downloadcoreboot-338e9dcd6bea50fce0c317ee497eb4acb620ce88.tar.xz
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>
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/bootmode.c5
1 files changed, 1 insertions, 4 deletions
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 <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)