diff options
-rw-r--r-- | host/lib/crossystem.c | 5 | ||||
-rw-r--r-- | utility/crossystem.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c index 0ed88e65..7d5903d6 100644 --- a/host/lib/crossystem.c +++ b/host/lib/crossystem.c @@ -579,6 +579,11 @@ int VbGetSystemPropertyInt(const char *name) value = vb2_get_nv_storage(VB2_NV_DISABLE_ALT_OS_REQUEST); } else if (!strcasecmp(name, "post_ec_sync_delay")) { value = vb2_get_nv_storage(VB2_NV_POST_EC_SYNC_DELAY); + } else if (!strcasecmp(name, "alt_os_enabled")) { + /* TODO(b/117195332): Change this to read from a field + * dedicated to storing Alt OS state. */ + value = !!(GetVdatInt(VDAT_INT_FLAGS) + & VBSD_ALT_OS_SHOW_PICKER); } return value; diff --git a/utility/crossystem.c b/utility/crossystem.c index d7443487..bef0108f 100644 --- a/utility/crossystem.c +++ b/utility/crossystem.c @@ -57,6 +57,7 @@ const Param sys_param_list[] = { {"enable_alt_os_request", CAN_WRITE, "Enable AltOS mode on next boot"}, {"post_ec_sync_delay", CAN_WRITE, "Short delay after EC software sync (persistent, writable, eve only)"}, + {"alt_os_enabled", 0, "Alt OS state (1 if enabled, 0 if disabled)"}, {"fmap_base", 0, "Main firmware flashmap physical address", "0x%08x"}, {"fw_prev_result", IS_STRING, "Firmware result of previous boot (vboot2)"}, {"fw_prev_tried", IS_STRING, "Firmware tried on previous boot (vboot2)"}, |