diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-10-25 12:18:12 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-26 01:45:10 -0700 |
commit | 6e82ee47298583dd1ac3e37e5f73f93ee17a45d9 (patch) | |
tree | 2c5492c57c06affb3fc8f5a0cbd617915806bbf9 | |
parent | d73f705442b203474d7e2d986ab336f7f3a014c9 (diff) | |
download | chrome-ec-6e82ee47298583dd1ac3e37e5f73f93ee17a45d9.tar.gz |
cr50: enable write protect
Enable write protect based on the type of image being built. Write
protect will be enabled on production images and disabled on dev images.
BUG=chrome-os-partner:49959
BUG=chrome-os-partner:55604
BUG=chrome-os-partner:58961
BRANCH=none
TEST=verify wp is enabled unless the image is built with CR50_DEV=1
Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/403308
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | board/cr50/board.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index 686387eefd..520c7d82bd 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -304,8 +304,8 @@ static void board_init(void) /* Initialize NvMem partitions */ nvmem_init(); - /* TODO(crosbug.com/p/49959): For now, leave flash WP unlocked */ - GREG32(RBOX, EC_WP_L) = 1; + /* Enable write protect on production images. Disable it on dev */ + GREG32(RBOX, EC_WP_L) = !console_is_restricted(); /* Indication that firmware is running, for debug purposes. */ GREG32(PMU, PWRDN_SCRATCH16) = 0xCAFECAFE; |