diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-04-18 09:39:47 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-04 03:02:49 -0700 |
commit | 84a843bf63ad287bdf63285ccdf3c955b65f7a33 (patch) | |
tree | eda1f348a363fbd90a20cbc8fd97c6af90c347f0 /util/ectool.c | |
parent | 74d08a581d9f08cfa5b5c02ad56267384fb42c9b (diff) | |
download | chrome-ec-84a843bf63ad287bdf63285ccdf3c955b65f7a33.tar.gz |
CBI: Disallow board version and OEM ID to be reprogrammed
This patch makes CBI refuse to change board version and OEM ID.
When CONFIG_SYSTEM_UNLOCKED is defined, this restriction is removed.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:74946347
BRANCH=none
TEST=buildall
Change-Id: I6ceda5764af56ed18a575f5563eaf294bb2876d0
Reviewed-on: https://chromium-review.googlesource.com/1017225
Commit-Ready: Jett Rink <jettrink@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/ectool.c')
-rw-r--r-- | util/ectool.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/util/ectool.c b/util/ectool.c index 87f30a9bc5..8b1432b697 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -6507,8 +6507,8 @@ static void cmd_cbi_help(char *cmd) " 0: BOARD_VERSION\n" " 1: OEM_ID\n" " 2: SKU_ID\n" - " <size> is the size of the data" - " <value> is integer to be set. No raw data support yet." + " <size> is the size of the data\n" + " <value> is integer to be set. No raw data support yet.\n" " [get_flag] is combination of:\n" " 01b: Invalidate cache and reload data from EEPROM\n" " [set_flag] is combination of:\n" @@ -6609,7 +6609,9 @@ static int cmd_cbi(int argc, char *argv[]) p, sizeof(*p) + size, NULL, 0); if (rv < 0) { if (rv == -EC_RES_ACCESS_DENIED - EECRESULT) - fprintf(stderr, "Write failed. WP enabled?\n"); + fprintf(stderr, "Write failed. Write-protect " + "is enabled or EC explicitly refused " + "to change the requested field."); else fprintf(stderr, "Error code: %d\n", rv); return rv; |