diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2018-02-14 15:20:09 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-03-12 19:57:57 +0000 |
commit | a98f627ad2d4c6f061945eeebab8e4bddf5ac2a4 (patch) | |
tree | ad876570a1ebac2a2b833e8540bacd8f66a714ff /util/cbi-util.c | |
parent | c341f1885cd8a9e9eb14217929adc91c01b998e1 (diff) | |
download | chrome-ec-a98f627ad2d4c6f061945eeebab8e4bddf5ac2a4.tar.gz |
CBI: Make data offset and size variable
Currently CBI data offset and size are fixed. This patch makes them
variable. Each data item consists of <tag><size><value> where <tag>
is a numeric value assigned to each data item, <size> is the number
of bytes used for <value>.
BUG=b:70294260
BRANCH=none
TEST=Use 'ectool cbi set' to set board version, oem, sku.
Verify the contents by cbi console command and ectool cbi get.
1. ectool cbi set 0 0x202 2 2 (Init CBI and write board ver. of size 2)
2. ectool cbi set 1 1 1 (write oem id of size 1)
3. ectool cbi set 2 2 1 (write sku id of size 1)
4. ectool cbi get 0
514 (0x202)
5. ectool cbi get 1
1 (0x1)
6. ectool cbi get 2
2 (0x2)
7. Run cbi console command:
CBI_VERSION: 0x0000
TOTAL_SIZE: 18
BOARD_VERSION: 514 (0x202)
OEM_ID: 1 (0x1)
SKU_ID: 2 (0x2)
43 42 49 8c 00 00 12 00 00 02 02 02 01 01 01 02
01 02
Change-Id: I5a30a4076e3eb448f4808d2af8ec4ef4c016ae5e
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/920905
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/929311
Diffstat (limited to 'util/cbi-util.c')
0 files changed, 0 insertions, 0 deletions