summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorMatt Delco <delco@google.com>2019-03-05 16:54:23 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-20 19:51:15 -0700
commit90a95ea62ade991769540f4a0c0e6465f3b3926c (patch)
tree2d62b8912e7688c96aea4f9bdd1b4779377b729a /host
parent7a748886003bad0a8971ca17d23f6641bc05bf59 (diff)
downloadvboot-90a95ea62ade991769540f4a0c0e6465f3b3926c.tar.gz
firmware: allocate nvram bit for diagnostic mode
This change allocates a bit in the nvram that will be used in a later change to tell the firmware whether to detour to diagnostic mode during boot. BUG=b:124358784 BRANCH=None TEST=Local build and ran "make runtests". Verified with a later change that the nvram bit takes effect as expected. Change-Id: If2fd3f46da30fc7375d37b240e3e745819ae0632 Signed-off-by: Matt Delco <delco@google.com> Reviewed-on: https://chromium-review.googlesource.com/1504758 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/lib/crossystem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 7d5903d6..e64e0acc 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -470,6 +470,8 @@ int VbGetSystemPropertyInt(const char *name)
value = vb2_get_nv_storage(VB2_NV_KERNEL_SETTINGS_RESET);
} else if (!strcasecmp(name,"recovery_request")) {
value = vb2_get_nv_storage(VB2_NV_RECOVERY_REQUEST);
+ } else if (!strcasecmp(name,"diagnostic_request")) {
+ value = vb2_get_nv_storage(VB2_NV_DIAG_REQUEST);
} else if (!strcasecmp(name,"dbg_reset")) {
value = vb2_get_nv_storage(VB2_NV_DEBUG_RESET_MODE);
} else if (!strcasecmp(name,"disable_dev_request")) {
@@ -658,6 +660,8 @@ int VbSetSystemPropertyInt(const char *name, int value)
return vb2_set_nv_storage(VB2_NV_KERNEL_SETTINGS_RESET, 0);
} else if (!strcasecmp(name,"recovery_request")) {
return vb2_set_nv_storage(VB2_NV_RECOVERY_REQUEST, value);
+ } else if (!strcasecmp(name,"diagnostic_request")) {
+ return vb2_set_nv_storage(VB2_NV_DIAG_REQUEST, value);
} else if (!strcasecmp(name,"recovery_subcode")) {
return vb2_set_nv_storage(VB2_NV_RECOVERY_SUBCODE, value);
} else if (!strcasecmp(name,"dbg_reset")) {