vboot: adding VBSD_BOOT_FIRMWARE_WP_ENABLED logic

BUG=chrome-os-partner:33395
BRANCH=none
TEST=emerge and test using crossystem

Change-Id: I0d49f85219d45c837a7100e0195bef86da2c6cdd
Signed-off-by: Gediminas Ramanauskas <gedis@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/227546
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Gediminas Ramanauskas 2014-11-04 20:07:09 -08:00 committed by chrome-internal-fetch
commit 5a2868e041

View file

@ -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)