diff options
author | Wisley Chen <wisley.chen@quanta.corp-partner.google.com> | 2018-11-06 11:59:50 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-13 03:32:51 -0800 |
commit | 2e5d1744a9b4bef51f5d5333a7bd5b77b68f1925 (patch) | |
tree | 318a0308207da6ed65e12e0841c5731d47ba6622 /include | |
parent | 12eacd182f5fba9cc744037c04c8e6317752b9fa (diff) | |
download | chrome-ec-2e5d1744a9b4bef51f5d5333a7bd5b77b68f1925.tar.gz |
Add OEM name support to CBI
Allow to set/get the OEM name in CBI.
$ cbi-util create --file ./cbi_image.bin --board_version 1 --oem_id 6
--sku_id 255 --dram_part_num "0123456789abcdef" --oem_name "ABC" --size 256
CBI image is created successfully
$hexdump -C cbi_image.bin
00000000 43 42 49 ed 00 00 2a 00 00 01 01 01 01 06 02 01 |CBI...*.........|
00000010 ff 03 11 30 31 32 33 34 35 36 37 38 39 61 62 63 |...0123456789abc|
00000020 64 65 66 00 04 04 41 42 43 00 ff ff ff ff ff ff |def...ABC.......|
00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00000100
$ ./build/meep/util/cbi-util show --file ./cbi_image.bin
CBI image: ./cbi_image.bin
TOTAL_SIZE: 42
Data Field: name: value (hex, tag, size)
BOARD_VERSION: 1 (0x1, 0, 1)
OEM_ID: 6 (0x6, 1, 1)
SKU_ID: 255 (0xff, 2, 1)
DRAM_PART_NUM: 0123456789abcdef (3, 17)
OEM_NAME: ABC (4, 4)
Data validated successfully
localhost /usr/local # ./ectool cbi set 0 1 1 2
localhost /usr/local # ./ectool cbi set 1 6 1 1
localhost /usr/local # ./ectool cbi set 2 255 1 1
localhost /usr/local # ./ectool cbi set 3 K4F6E304HB-MGCJ 0 0
localhost /usr/local # ./ectool cbi set 4 ABC 0 0
localhost /usr/local # ./ectool cbi get 0
As integer: 1 (0x1)
As binary: 01
localhost /usr/local # ./ectool cbi get 1
As integer: 6 (0x6)
As binary: 06
localhost /usr/local # ./ectool cbi get 2
As integer: 255 (0xff)
As binary: ff
localhost /usr/local # ./ectool cbi get 3
K4F6E304HB-MGCJ
localhost /usr/local # ./ectool cbi get 4
ABC
BRANCH=none
BUG=b:118798180
TEST=executed command as above.
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Change-Id: Ie933900ffd6c1317136c88a72ab8d5afc3976cc0
Reviewed-on: https://chromium-review.googlesource.com/1319394
Commit-Ready: Chen Wisley <wisley.chen@quantatw.com>
Tested-by: Chen Wisley <wisley.chen@quantatw.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 7e37a2ad94..cb0bc9f62f 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4778,6 +4778,7 @@ enum cbi_data_tag { CBI_TAG_OEM_ID = 1, /* uint8_t */ CBI_TAG_SKU_ID = 2, /* uint8_t */ CBI_TAG_DRAM_PART_NUM = 3, /* variable length ascii, nul terminated. */ + CBI_TAG_OEM_NAME = 4, /* variable length ascii, nul terminated. */ CBI_TAG_COUNT, }; |