diff options
-rw-r--r-- | include/ec_commands.h | 6 | ||||
-rw-r--r-- | util/cbi-util.c | 6 | ||||
-rw-r--r-- | util/ectool.c | 37 |
3 files changed, 25 insertions, 24 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index d0b272e8a8..ee6fa61ace 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4901,9 +4901,9 @@ struct ec_params_efs_verify { #define EC_CMD_SET_CROS_BOARD_INFO 0x0120 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_BOARD_VERSION = 0, /* uint32_t or smaller */ + CBI_TAG_OEM_ID = 1, /* uint32_t or smaller */ + CBI_TAG_SKU_ID = 2, /* uint32_t or smaller */ CBI_TAG_DRAM_PART_NUM = 3, /* variable length ascii, nul terminated. */ CBI_TAG_OEM_NAME = 4, /* variable length ascii, nul terminated. */ CBI_TAG_COUNT, diff --git a/util/cbi-util.c b/util/cbi-util.c index aa8e5dd325..cc4fda8ba5 100644 --- a/util/cbi-util.c +++ b/util/cbi-util.c @@ -82,13 +82,13 @@ const char help_create[] = " --size <size> Size of output file in bytes\n" "<value> must be a positive integer <= 0XFFFFFFFF and field size can\n" "be optionally specified by <value:size> notation: e.g. 0xabcd:4.\n" - "<value> can be a string for DRAM PART NUM/OEM NAME.\n" "<size> must be a positive integer <= 0XFFFF.\n" "Optional ARGS are:\n" - " --dram_part_num <value> DRAM PART NUM\n" - " --oem_name <value> OEM NAME\n" + " --dram_part_num <string> DRAM PART NUM\n" + " --oem_name <string> OEM NAME\n" " --erase_byte <uint8> Byte used for empty space. Default:0xff\n" " --format_version <uint16> Data format version\n" + "<string> is a string\n" "\n"; const char help_show[] = diff --git a/util/ectool.c b/util/ectool.c index 24c0c7955e..1c5cb1cc59 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -6750,21 +6750,22 @@ int cmd_board_version(int argc, char *argv[]) static void cmd_cbi_help(char *cmd) { fprintf(stderr, - " Usage: %s get <type> [get_flag]\n" - " Usage: %s set <type> <value> <size> [set_flag]\n" - " <type> is one of:\n" - " 0: BOARD_VERSION\n" - " 1: OEM_ID\n" - " 2: SKU_ID\n" - " 3: DRAM_PART_NUM\n" - " 4: OEM_NAME\n" - " <size> is the size of the data in byte\n" - " <value> is integer to be set, string for DRAM_PART_NUM/OEM_NAME\n" - " [get_flag] is combination of:\n" - " 01b: Invalidate cache and reload data from EEPROM\n" - " [set_flag] is combination of:\n" - " 01b: Skip write to EEPROM. Use for back-to-back writes\n" - " 10b: Set all fields to defaults first\n", cmd, cmd); + " Usage: %s get <tag> [get_flag]\n" + " Usage: %s set <tag> <value/string> <size> [set_flag]\n" + " <tag> is one of:\n" + " 0: BOARD_VERSION\n" + " 1: OEM_ID\n" + " 2: SKU_ID\n" + " 3: DRAM_PART_NUM (string)\n" + " 4: OEM_NAME (string)\n" + " <size> is the size of the data in byte. It should be zero for\n" + " string types.\n" + " <value/string> is an integer or a string to be set\n" + " [get_flag] is combination of:\n" + " 01b: Invalidate cache and reload data from EEPROM\n" + " [set_flag] is combination of:\n" + " 01b: Skip write to EEPROM. Use for back-to-back writes\n" + " 10b: Set all fields to defaults first\n", cmd, cmd); } /* @@ -6879,9 +6880,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. Write-protect " - "is enabled or EC explicitly refused " - "to change the requested field."); + fprintf(stderr, "Write-protect is enabled or " + "EC explicitly refused to change the " + "requested field.\n"); else fprintf(stderr, "Error code: %d\n", rv); return rv; |