diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-03-15 12:12:26 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-03-17 04:03:44 +0000 |
commit | 8f4ee58a1d7e2e840d18a6d25837d437a983288b (patch) | |
tree | 45135923cfdfca8db9e0d47624d3a7d34b1ac4fd | |
parent | 3fc021e9cfd0721eba4c0f9324deaf68b6a3e771 (diff) | |
download | chrome-ec-8f4ee58a1d7e2e840d18a6d25837d437a983288b.tar.gz |
EFS: Perform EFS even if flash WP is enabled
This patch removes flash WP check in the EFS main. It means even
if the SPI flash is not write protected, it performs EFS.
This allows dogfood devices to boot just like normal devices.
BUG=b:74983574
BRANCH=none
TEST=Boot Fizz. Verify EFS works as expected.
HW_WP=0, SW_WP=0: No EFS
HW_WP=0, SW_WP=1: No EFS
HW_WP=1, SW_WP=0: EFS is performed (Dogfood devices)
HW_WP=1, SW_WP=1: EFS is performed (Normal devices)
Change-Id: I33b39463d6bd16fe0fc398cd49f3c92c76fa5103
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/964740
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit 39684f894620238c6ea08b54ad7bb23bb2025499)
Reviewed-on: https://chromium-review.googlesource.com/965389
-rw-r--r-- | common/vboot/vboot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/vboot/vboot.c b/common/vboot/vboot.c index b1961ad6f7..fcdcc7287f 100644 --- a/common/vboot/vboot.c +++ b/common/vboot/vboot.c @@ -11,6 +11,7 @@ #include "charge_manager.h" #include "chipset.h" #include "console.h" +#include "flash.h" #include "hooks.h" #include "host_command.h" #include "rsa.h" @@ -193,7 +194,8 @@ void vboot_main(void) { CPRINTS("Main"); - if (system_is_in_rw() || !system_is_locked()) { + if (system_is_in_rw() || !(flash_get_protect() & + EC_FLASH_PROTECT_GPIO_ASSERTED)) { /* * If we're here, it means PD negotiation was attempted but * we didn't get enough power to boot AP. This happens on RW |