Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: firmware/lib/vboot_kernel.c

Issue 6462010: Support dev vs consumer firmware in vboot_reference (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: post-merge Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | firmware/stub/load_firmware_stub.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/vboot_kernel.c
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 8ee45a7eabb3b6aa7bf728bd50005f1bfa3f75aa..bd8865bd6e2bb72e0367dc41d9827d518daf5cb2 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 */
« no previous file with comments | « firmware/lib/vboot_firmware.c ('k') | firmware/stub/load_firmware_stub.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698