summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGediminas Ramanauskas <gedis@google.com>2014-11-04 20:07:09 -0800
committerAaron Durbin <adurbin@chromium.org>2015-04-10 16:47:32 +0200
commitceaabc94efec339f75732dd7bf72c51f8dc52941 (patch)
treee740d8a85f4a3d249a33c66db3807987a7cd4dc4
parent2ab9f0825fec5007e0a7168f4d432fd86b20aaf2 (diff)
downloadcoreboot-ceaabc94efec339f75732dd7bf72c51f8dc52941.tar.xz
vboot: adding VBSD_BOOT_FIRMWARE_WP_ENABLED logic
BUG=chrome-os-partner:33395 BRANCH=none TEST=emerge and test using crossystem Original-Change-Id: I0d49f85219d45c837a7100e0195bef86da2c6cdd Original-Signed-off-by: Gediminas Ramanauskas <gedis@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/227546 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> (cherry picked from commit 5a2868e04140973691136adfd7d9e6d1aa1f6dae) Signed-off-by: Aaron Durbin <adurbin@chromium.org> Change-Id: I93c1ea9ce1270c2c143fd44ead2291dfbc114c00 Reviewed-on: http://review.coreboot.org/9437 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
-rw-r--r--src/vendorcode/google/chromeos/vboot2/vboot_handoff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
index a8573d0c88..7a61429d2f 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_handoff.c
@@ -59,7 +59,7 @@ static void *load_ramstage(struct vboot_handoff *vboot_handoff,
/**
* Sets vboot_handoff based on the information in vb2_shared_data
*
- * TODO: Read wp switch to set VBSD_BOOT_FIRMWARE_WP_ENABLED
+ * TODO: Add VBSD_BOOT_FIRMWARE_SW_WP_ENABLED logic
*/
static void fill_vboot_handoff(struct vboot_handoff *vboot_handoff,
struct vb2_shared_data *vb2_sd)
@@ -80,6 +80,9 @@ static void fill_vboot_handoff(struct vboot_handoff *vboot_handoff,
vb_sd->data_size = VB_SHARED_DATA_MIN_SIZE;
vb_sd->data_used = sizeof(VbSharedDataHeader);
+ if (get_write_protect_state())
+ vb_sd->flags |= VBSD_BOOT_FIRMWARE_WP_ENABLED;
+
if (vb2_sd->recovery_reason) {
vb_sd->firmware_index = 0xFF;
if (vb2_sd->recovery_reason == VB2_RECOVERY_RO_MANUAL)