cr50: enable write protect [chromiumos/platform/ec : master]

141 views
Skip to first unread message

Mary Ruthven (Gerrit)

unread,
Oct 25, 2016, 3:34:22 PM10/25/16
to Bill Richardson, Vadim Bendebury, Vincent Palatin

Mary Ruthven would like Bill Richardson and Vadim Bendebury to review cr50: enable write protect.

View Change

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:55604
BUG=chrome-os-partner:49959
BRANCH=none
TEST=verify wp is enabled unless the image is built with CR50_DEV=1

Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
Signed-off-by: Mary Ruthven <mrut...@chromium.org>
---
M board/cr50/board.c
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/cr50/board.c b/board/cr50/board.c
index 686387e..520c7d8 100644
--- a/board/cr50/board.c
+++ b/board/cr50/board.c
@@ -304,8 +304,8 @@
 	/* 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;

To view, visit this change. To unsubscribe, visit settings.

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/ec
Gerrit-Branch: master
Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>

Mary Ruthven (Gerrit)

unread,
Oct 25, 2016, 3:34:38 PM10/25/16
to Bill Richardson, Vadim Bendebury

Mary Ruthven posted comments on cr50: enable write protect.

View Change

Patch Set 1: Verified+1

    To view, visit this change. To unsubscribe, visit settings.

    Gerrit-MessageType: comment


    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 1
    Gerrit-Project: chromiumos/platform/ec
    Gerrit-Branch: master
    Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>

    Gerrit-HasComments: No

    Bill Richardson (Gerrit)

    unread,
    Oct 25, 2016, 7:32:27 PM10/25/16
    to Mary Ruthven, Bill Richardson, Vadim Bendebury

    Bill Richardson posted comments on cr50: enable write protect.

    View Change

    Patch Set 1: Code-Review+2
    
    (1 comment)

    To view, visit this change. To unsubscribe, visit settings.

    Gerrit-MessageType: comment


    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 1
    Gerrit-Project: chromiumos/platform/ec
    Gerrit-Branch: master
    Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>

    Gerrit-HasComments: Yes

    Mary Ruthven (Gerrit)

    unread,
    Oct 25, 2016, 7:34:07 PM10/25/16
    to Bill Richardson, Vadim Bendebury

    Mary Ruthven uploaded patch set #2 to cr50: enable write protect.

    View Change

    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 <mrut...@chromium.org>
    ---
    M board/cr50/board.c
    1 file changed, 2 insertions(+), 2 deletions(-)
    
    

    To view, visit this change. To unsubscribe, visit settings.

    Gerrit-MessageType: newpatchset
    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 2

    Mary Ruthven (Gerrit)

    unread,
    Oct 25, 2016, 7:34:36 PM10/25/16
    to Bill Richardson, Vadim Bendebury

    Mary Ruthven posted comments on cr50: enable write protect.

    View Change

    Patch Set 2: Verified+1 Commit-Queue+1
    
    (1 comment)
      • BUG=chrome-os-partner:49959
        BUG=chrome-os-partner:55604
        

        Also 58961

        Done

    To view, visit this change. To unsubscribe, visit settings.

    Gerrit-MessageType: comment
    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 2


    Gerrit-Project: chromiumos/platform/ec
    Gerrit-Branch: master
    Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>

    Gerrit-HasComments: Yes

    ChromeOS Commit Bot (Gerrit)

    unread,
    Oct 26, 2016, 4:47:26 AM10/26/16
    to Mary Ruthven, Bill Richardson, Vadim Bendebury
    Hello Bill Richardson, Vadim Bendebury, Mary Ruthven,

    I'd like you to reexamine a change. Please visit

    https://chromium-review.googlesource.com/403308

    to look at the new patch set (#3).

    Change subject: cr50: enable write protect
    ......................................................................

    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 <mrut...@chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/403308
    Reviewed-by: Bill Richardson <wfri...@chromium.org>
    ---
    M board/cr50/board.c
    1 file changed, 2 insertions(+), 2 deletions(-)


    --
    To view, visit https://chromium-review.googlesource.com/403308
    To unsubscribe, visit https://chromium-review.googlesource.com/settings

    Gerrit-MessageType: newpatchset
    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 3
    Gerrit-Project: chromiumos/platform/ec
    Gerrit-Branch: master
    Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>
    Gerrit-Reviewer: Bill Richardson <wfri...@chromium.org>
    Gerrit-Reviewer: Mary Ruthven <mrut...@chromium.org>
    Gerrit-Reviewer: Vadim Bendebury <vbe...@chromium.org>

    ChromeOS Commit Bot (Gerrit)

    unread,
    Oct 26, 2016, 4:47:27 AM10/26/16
    to Mary Ruthven, Bill Richardson, Vadim Bendebury
    ChromeOS Commit Bot has submitted this change and it was merged. (
    https://chromium-review.googlesource.com/403308 )

    Change subject: cr50: enable write protect
    ......................................................................

    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 <mrut...@chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/403308
    Reviewed-by: Bill Richardson <wfri...@chromium.org>
    ---
    M board/cr50/board.c
    1 file changed, 2 insertions(+), 2 deletions(-)



    diff --git a/board/cr50/board.c b/board/cr50/board.c
    index 686387e..520c7d8 100644
    --- a/board/cr50/board.c
    +++ b/board/cr50/board.c
    @@ -304,8 +304,8 @@
    /* 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;

    Gerrit-MessageType: merged
    Gerrit-Change-Id: Ibcd7f35fb4b33142c94e59e8c103624fce4e0b10
    Gerrit-PatchSet: 3
    Gerrit-Project: chromiumos/platform/ec
    Gerrit-Branch: master
    Gerrit-Owner: Mary Ruthven <mrut...@chromium.org>
    Reply all
    Reply to author
    Forward
    0 new messages