summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-03-15 12:12:26 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-03-16 18:31:27 -0700
commit39684f894620238c6ea08b54ad7bb23bb2025499 (patch)
treec1af04bb0872b75d4f0f6b4ddafff879f9feeab8
parent27a0cf0233090737079373604da1469fafb6869a (diff)
downloadchrome-ec-39684f894620238c6ea08b54ad7bb23bb2025499.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>
-rw-r--r--common/vboot/vboot.c4
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