diff options
author | Randall Spangler <rspangler@chromium.org> | 2011-07-15 16:28:38 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2011-07-15 19:27:15 -0700 |
commit | a185b8d8f61ac165bc15c6b51d23b6e1be5b15cf (patch) | |
tree | 8f504b1a01703502f401391b0b6a34e49de533b4 /host | |
parent | 8409b374980721bd120de2511c37bd6e171de910 (diff) | |
download | vboot-a185b8d8f61ac165bc15c6b51d23b6e1be5b15cf.tar.gz |
Report mainfw_act based on VbSharedData780.B
Don't use FDT to report it on ARM.
This fixes ARM reporting the wrong thing for RO-normal.
BUG=none
TEST=none
Change-Id: Id3a1bd2a1d2502e1d9493ab362be5a58fa88d70e
Reviewed-on: http://gerrit.chromium.org/gerrit/4213
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'host')
-rw-r--r-- | host/arch/arm/lib/crossystem_arch.c | 2 | ||||
-rw-r--r-- | host/lib/crossystem.c | 21 |
2 files changed, 20 insertions, 3 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c index d74c2d10..c507ca85 100644 --- a/host/arch/arm/lib/crossystem_arch.c +++ b/host/arch/arm/lib/crossystem_arch.c @@ -321,8 +321,6 @@ const char* VbGetArchPropertyString(const char* name, char* dest, int size) { prop = "hardware-id"; else if (!strcasecmp(name, "fwid")) prop = "firmware-version"; - else if (!strcasecmp(name, "mainfw_act")) - prop = "active-firmware"; else if (!strcasecmp(name, "mainfw_type")) prop = "firmware-type"; else if (!strcasecmp(name, "ecfw_act")) diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c index eea48998..34c1de17 100644 --- a/host/lib/crossystem.c +++ b/host/lib/crossystem.c @@ -26,7 +26,8 @@ typedef enum VdatStringField { VDAT_STRING_TIMERS = 0, /* Timer values */ VDAT_STRING_LOAD_FIRMWARE_DEBUG, /* LoadFirmware() debug information */ - VDAT_STRING_LOAD_KERNEL_DEBUG /* LoadKernel() debug information */ + VDAT_STRING_LOAD_KERNEL_DEBUG, /* LoadKernel() debug information */ + VDAT_STRING_MAINFW_ACT /* Active main firmware */ } VdatStringField; @@ -293,6 +294,22 @@ char* GetVdatString(char* dest, int size, VdatStringField field) value = GetVdatLoadKernelDebug(dest, size, sh); break; + case VDAT_STRING_MAINFW_ACT: + switch(sh->firmware_index) { + case 0: + StrCopy(dest, "A", size); + break; + case 1: + StrCopy(dest, "B", size); + break; + case 0xFF: + StrCopy(dest, "recovery", size); + break; + default: + value = NULL; + } + break; + default: value = NULL; break; @@ -403,6 +420,8 @@ const char* VbGetSystemPropertyString(const char* name, char* dest, int size) { default: return NULL; } + } else if (!strcasecmp(name, "mainfw_act")) { + return GetVdatString(dest, size, VDAT_STRING_MAINFW_ACT); } else if (!strcasecmp(name, "vdat_timers")) { return GetVdatString(dest, size, VDAT_STRING_TIMERS); } else if (!strcasecmp(name, "vdat_lfdebug")) { |