summaryrefslogtreecommitdiff
path: root/host/lib/crossystem.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2020-02-25 11:11:52 +0800
committerCommit Bot <commit-bot@chromium.org>2020-02-26 11:05:48 +0000
commit91300814d66aaa78f9b85295957d0a28dad7c4c7 (patch)
treeb86a7f660be9df6a05d71b1674ae3e4d0d8eb035 /host/lib/crossystem.c
parent3354deef704a272e7c0e0a68173313dbd0e0ab67 (diff)
downloadvboot-91300814d66aaa78f9b85295957d0a28dad7c4c7.tar.gz
crossystem: use wpsw_boot as fallback for wpsw_cur
In preparation for deprecating wpsw_boot, update wpsw_cur to use wpsw_boot as a fallback value. The source of wpsw_boot will still be deprecated on devices using new firmware, but in those cases, we are absolutely certain that wpsw_cur will work. BUG=b:124141368, chromium:950723 TEST=make clean && make runtests BRANCH=none Change-Id: I77ab9c6b827ef2c033ae46b7b01b12465101c0a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2071633 Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'host/lib/crossystem.c')
-rw-r--r--host/lib/crossystem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 33cf332f..50de4cb0 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -428,6 +428,9 @@ int VbGetSystemPropertyInt(const char *name)
value = GetVdatInt(VDAT_INT_DEVSW_BOOT);
} else if (!strcasecmp(name, "recoverysw_boot")) {
value = GetVdatInt(VDAT_INT_RECSW_BOOT);
+ } else if (!strcasecmp(name, "wpsw_cur")) {
+ /* Use "write-protect at boot" as a fallback value. */
+ value = GetVdatInt(VDAT_INT_HW_WPSW_BOOT);
} else if (!strcasecmp(name, "wpsw_boot")) {
value = GetVdatInt(VDAT_INT_HW_WPSW_BOOT);
} else if (!strcasecmp(name,"vdat_flags")) {