Skip to content

Commit

Permalink
Patch for coreboot 4.11 titled: "Boot to Recovery Mode if no RW slot …
Browse files Browse the repository at this point in the history
…present"

Original credit: Bill XIE <[email protected]> [Available at: https://review.coreboot.org/c/coreboot/+/34977]
Thanks @miczyg1 for the suggestion.

Points to linuxboot#795 build errors troubleshooting and won't be merged upstream in the form of this PR.
  • Loading branch information
Tonux599 authored and tlaurion committed Oct 18, 2020
1 parent f2e8629 commit 682fa43
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions patches/coreboot-4.11/0030-boot-recovery-if-no-RW.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[PATCH] security/vboot: Boot to Recovery Mode if no RW slot present

Original credit: Bill XIE <[email protected]>
Available at: https://review.coreboot.org/c/coreboot/+/34977

Modified for Coreboot 4.11 compatibility.
---

diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 5facd283ee..65e9900ef0 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -355,7 +355,9 @@ void verstage_main(void)
"Initializing measured boot mode failed!");
}

- if (get_recovery_mode_switch()) {
+ /* Boot to Recovery Mode if no RW slot present */
+ if (!CONFIG(VBOOT_SLOTS_RW_A) ||
+ get_recovery_mode_switch()) {
ctx->flags |= VB2_CONTEXT_FORCE_RECOVERY_MODE;
if (CONFIG(VBOOT_DISABLE_DEV_ON_RECOVERY))
ctx->flags |= VB2_CONTEXT_DISABLE_DEVELOPER_MODE;

0 comments on commit 682fa43

Please sign in to comment.