diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2012-04-20 10:53:40 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-04-20 15:40:36 -0700 |
commit | fcec9e7c4b2b4a041c0a85b6d999c618ec595c57 (patch) | |
tree | d1c2cb14fc3a749b4236d5e10b58389c2a983caa | |
parent | beb3be1c0b1da8711685b9c4a86cee974d6a452a (diff) | |
download | vboot-fcec9e7c4b2b4a041c0a85b6d999c618ec595c57.tar.gz |
crossystem: introduce a new main firmware type, 'netboot'
We need to be able to tell when a ChromeOS machine was brought up
using netboot. This condition will be communicated from firmware using
the BINF.3 ACPI object (upcoming u-boot change).
BUG=chrome-os-partner:7952
TEST=manual
. boot a ChromeOS machine using the updated firmware and examine the
main firmware type reported by crossystem:
localhost ~ # echo $(/var/crossystem mainfw_type)
netboot
Change-Id: I35b10f41eb1f928a122c384d0179c9027f263acd
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/20707
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | host/arch/x86/lib/crossystem_arch.c | 2 | ||||
-rw-r--r-- | host/include/crossystem_arch.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c index 2d4a79bb..74411044 100644 --- a/host/arch/x86/lib/crossystem_arch.c +++ b/host/arch/x86/lib/crossystem_arch.c @@ -386,6 +386,8 @@ static const char* VbReadMainFwType(char* dest, int size) { /* Try reading type from BINF.3 */ switch(ReadFileInt(ACPI_BINF_PATH ".3")) { + case BINF3_NETBOOT: + return StrCopy(dest, "netboot", size); case BINF3_RECOVERY: return StrCopy(dest, "recovery", size); case BINF3_NORMAL: diff --git a/host/include/crossystem_arch.h b/host/include/crossystem_arch.h index fbef9b19..be6b5439 100644 --- a/host/include/crossystem_arch.h +++ b/host/include/crossystem_arch.h @@ -18,6 +18,7 @@ #define BINF3_RECOVERY 0 #define BINF3_NORMAL 1 #define BINF3_DEVELOPER 2 +#define BINF3_NETBOOT 3 /* INTERNAL APIS FOR CROSSYSTEM AVAILABLE TO ARCH-SPECIFIC FUNCTIONS */ |