summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_kernel.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-02-14 11:12:09 -0800
committerRandall Spangler <rspangler@chromium.org>2011-02-14 11:12:09 -0800
commita8e0f94b94c2181a95a984fbcd8de80c3ca1b8c9 (patch)
tree8443735374d04604a006d8561b770e1fd900e982 /firmware/lib/vboot_kernel.c
parent61362d65fcdd6f6aff90fc5be51237b39cfeb9ae (diff)
downloadvboot-a8e0f94b94c2181a95a984fbcd8de80c3ca1b8c9.tar.gz
Support dev vs consumer firmware in vboot_reference
Change-Id: I5a42ba017974b3d591abc574ef7b9b7c9ac579e8 BUG=chrome-os-partner:1824 TEST=make && make runtests Review URL: http://codereview.chromium.org/6462010
Diffstat (limited to 'firmware/lib/vboot_kernel.c')
-rw-r--r--firmware/lib/vboot_kernel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 8ee45a7e..bd8865bd 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -146,8 +146,16 @@ int LoadKernel(LoadKernelParams* params) {
return LOAD_KERNEL_INVALID;
}
- is_dev = (BOOT_FLAG_DEVELOPER & params->boot_flags ? 1 : 0);
is_rec = (BOOT_FLAG_RECOVERY & params->boot_flags ? 1 : 0);
+ if (is_rec || (BOOT_FLAG_DEV_FIRMWARE & params->boot_flags)) {
+ /* Recovery or developer firmware, so accurately represent the
+ * state of the developer switch for the purposes of verified boot. */
+ is_dev = (BOOT_FLAG_DEVELOPER & params->boot_flags ? 1 : 0);
+ } else {
+ /* Normal firmware always does a fully verified boot regardless of
+ * the state of the developer switch. */
+ is_dev = 0;
+ }
is_normal = (!is_dev && !is_rec);
/* Clear output params in case we fail */