| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MODEL_ID is an optional field containing a numeric value identifying
models. Model IDs are unique within each OEM and <OEM_ID, MODEL_ID>
should form a unique ID within the family.
$ cbi-util create --file ~/cbi_image --board_version 0 --oem_id 6
--sku_id 255 --dram_part_num "012345679abcdef" --model_id 127 --size 256
$ hexdump -C /tmp/cbi.bin
0000 43 42 49 fa 00 00 26 00 00 01 00 01 01 06 02 01 |CBI...&.........|
0010 ff 05 01 7f 03 10 30 31 32 33 34 35 36 37 39 61 |......012345679a|
0020 62 63 64 65 66 00 ff ff ff ff ff ff ff ff ff ff |bcdef...........|
$ cbi-util show --file /tmp/cbi.bin
CBI image: /tmp/cbi.bin
TOTAL_SIZE: 38
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)
MODEL_ID: 127 (0x7f, 5, 1)
DRAM_PART_NUM: 012345679abcdef (3, 16)
Data validated successfully
localhost # ectool cbi set 5 127 1
localhost # ectool cbi get 5
As integer: 127 (0x7f)
As binary: 7f
> cbi
[1289.860454 CBI Reading board info]
CBI_VERSION: 0x0000
TOTAL_SIZE: 22
BOARD_VERSION: 513 (0x201)
OEM_ID: 3 (0x3)
MODEL_ID: 127 (0x7f)
SKU_ID: 14951 (0x3a67)
43 42 49 b0 00 00 16 00 00 02 01 02 01 01 03 02
02 67 3a 05 01 7f ff ff ff ff ff ff ff ff ff ff
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:119522898,b:120105950
BRANCH=none
TEST=See above.
Change-Id: Ifd6f3087f5422bcf4c36d3d981b262653d0c89dc
Reviewed-on: https://chromium-review.googlesource.com/1341099
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, field sizes are automatically set to the smallest size
which can fit a given value. This patch makes cbi-util allow field
sizes to be specified.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b:79514391
BRANCH=none
TEST=Tested as follows:
1. Create CBI image:
$ cbi-util create --file cbi.bin --board_version 0x202 \
--oem_id 0xabcd:2 --sku_id 0xff:4 --size 256
2. Verify the image:
$ cbi-util show --file cbi.bin
CBI image: /home/dnojiri/tmp/nami/tmp/cbi.new.bin
TOTAL_SIZE: 22
Data Field: name: value (hex, tag, size)
BOARD_VERSION: 514 (0x202, 0, 2)
OEM_ID: 43981 (0xabcd, 1, 2)
SKU_ID: 255 (0xff, 2, 4)
3. Verify the output matches with the previous output if field sizes
are not specified.
Change-Id: Ic7149274d6e4a118ea12bbf03199b548b7089a3e
Reviewed-on: https://chromium-review.googlesource.com/1056201
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes EC firmware and cbi-util share the common code.
BUG=b:70294260
BRANCH=none
TEST=Set fields using ectool. Verify the contents by cbi command.
Verify cbi-util creates the same binary as before.
Verify emerge ec-utils ec-devutils pass.
Change-Id: If5e65e48dd03960e0adf23ef775f67aecf785d85
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/932001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
This patch adds Cros Board Info APIs. It reads board info from EEPROM.
This patch sets CONFIG_CBI for Fizz to make it use CBI.
BUG=b:70294260
BRANCH=none
TEST=Read data from EEPROM.
Change-Id: I7eb4323188817d46b0450f1d65ac34d1b7e4e220
Reviewed-on: https://chromium-review.googlesource.com/707741
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|