From 229ad270f67af53c62b1ef6fe74bc48ef3d1ec58 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Fri, 14 Mar 2014 13:57:32 -0700 Subject: chromeos: vboot_loader: Add support for SW_WP_ENABLED flag Set VB_INIT_FLAG_SW_WP_ENABLED according to the status returned by an optional platform / mainboard function vboot_get_sw_write_protect(). BUG=chrome-os-partner:26777 TEST=Manual on Rambi with all patches in sequence: `crossystem sw_wpsw_boot` prints 0 `flashrom --wp-enable` and reboot `crossystem sw_wpsw_boot` prints 1 BRANCH=Rambi Original-Change-Id: Ifb852d75cc106d10120cfee0a396b0662282051a Original-Signed-off-by: Shawn Nematbakhsh Original-Reviewed-on: https://chromium-review.googlesource.com/190096 Original-Reviewed-by: Aaron Durbin (cherry picked from commit c4668fc8a9ab31d9cf876b3d9ad3405756d4d683) Signed-off-by: Marc Jones Change-Id: Idace325439958f6b490d2e6705d55e95305c4b2a Reviewed-on: http://review.coreboot.org/7750 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- src/vendorcode/google/chromeos/chromeos.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vendorcode/google/chromeos/chromeos.h') diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index 6e3b2dacf1..7192f3395f 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -35,6 +35,9 @@ void save_vbnv(const uint8_t *vbnv_copy); void init_chromeos(int bootmode); struct romstage_handoff; + +/* TODO(shawnn): Remove these CONFIGs and define default weak functions + * that can be overridden in the platform / MB code. */ #if CONFIG_VBOOT_VERIFY_FIRMWARE /* * This is a dual purpose routine. If dest is non-NULL the region at @@ -57,6 +60,7 @@ static inline int vboot_get_handoff_info(void **addr, uint32_t *size) } static inline int vboot_skip_display_init(void) { return 0; } #endif +int vboot_get_sw_write_protect(void); #include "gnvs.h" struct device; -- cgit v1.2.3