summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2018-08-07 11:29:28 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-08-08 13:45:46 -0700
commit6ece66961c1ea17f7f6868c41cc553b794623bb4 (patch)
treee6467333360405fc8ece28346bedc4695abb80f9 /include/ec_commands.h
parentb80693e94e6e9aa0a382c39c20efba6f2c7403a9 (diff)
downloadchrome-ec-6ece66961c1ea17f7f6868c41cc553b794623bb4.tar.gz
Add DRAM part number support to CBI
Allow one to encode the DRAM part number in CBI. Both cbi-util and ectool are updated. $ cbi-util create --file ~/cbi_image --board_version 0 --oem_id 6 --sku_id 255 --dram_part_num "012345679abcdef" --size 256 CBI image is created successfully $ hexdump -C ~/cbi_image 00000000 43 42 49 47 00 00 23 00 00 01 00 01 01 06 02 01 |CBIG..#.........| 00000010 ff 03 10 30 31 32 33 34 35 36 37 39 61 62 63 64 |...012345679abcd| 00000020 65 66 00 ff ff ff ff ff ff ff ff ff ff ff ff ff |ef..............| 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00000100 $ cbi-util show --file ~/cbi_image CBI image: /home/adurbin/cbi_image TOTAL_SIZE: 35 Data Field: name: value (hex, tag, size) BOARD_VERSION: 0 (0x0, 0, 1) OEM_ID: 6 (0x6, 1, 1) SKU_ID: 255 (0xff, 2, 1) DRAM_PART_NUM: 012345679abcdef (3, 16) Data validated successfully localhost /tmp # ./ectool cbi set 0 0 1 2 localhost /tmp # ./ectool cbi set 1 6 1 1 localhost /tmp # ./ectool cbi set 2 255 1 1 localhost /tmp # ./ectool cbi set 3 H9HCNNNBPUMLHR 0 0 localhost /tmp # ./ectool cbi get 0 As integer: 0 (0x0) As binary: 00 localhost /tmp # ./ectool cbi get 1 As integer: 6 (0x6) As binary: 06 localhost /tmp # ./ectool cbi get 2 As integer: 255 (0xff) As binary: ff localhost /tmp # ./ectool cbi get 3 H9HCNNNBPUMLHR BUG=b:112203105 BRANCH=None TEST=Commands executed above. Change-Id: I2d519ad16a158db4e624d3a03912434d0e8fdd73 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1165622 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index f423eca0ca..8e09e7a892 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4762,6 +4762,7 @@ enum cbi_data_tag {
CBI_TAG_BOARD_VERSION = 0, /* uint16_t or uint8_t[] = {minor,major} */
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_COUNT,
};