Aaron Durbin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40299 )
Change subject: ec/google/chromeec: expose failure SKU id ......................................................................
ec/google/chromeec: expose failure SKU id
Provide CROS_SKU_UNKNOWN defintion so callers can utilize the default and failing value without open coding it.
BUG=b:153642124 Signed-off-by: Aaron Durbin adurbin@chromium.org
Change-Id: I447004e9016b6ab3306ea532721494ebbcda741d --- M src/ec/google/chromeec/ec.h M src/ec/google/chromeec/ec_skuid.c 2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/40299/1
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index f1caeb0..c8a199f 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -79,6 +79,8 @@ int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize); int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize);
+#define CROS_SKU_UNKNOWN 0xFFFFFFFF +/* Returns CROS_SKU_UNKNOWN on failure. */ uint32_t google_chromeec_get_board_sku(void); const char *google_chromeec_smbios_system_sku(void);
diff --git a/src/ec/google/chromeec/ec_skuid.c b/src/ec/google/chromeec/ec_skuid.c index 665d425..5122975 100644 --- a/src/ec/google/chromeec/ec_skuid.c +++ b/src/ec/google/chromeec/ec_skuid.c @@ -12,17 +12,15 @@ #include <string.h> #include <smbios.h>
-#define SKU_UNKNOWN 0xFFFFFFFF - uint32_t google_chromeec_get_board_sku(void) { - MAYBE_STATIC_NONZERO uint32_t sku_id = SKU_UNKNOWN; + MAYBE_STATIC_NONZERO uint32_t sku_id = CROS_SKU_UNKNOWN;
- if (sku_id != SKU_UNKNOWN) + if (sku_id != CROS_SKU_UNKNOWN) return sku_id;
if (google_chromeec_cbi_get_sku_id(&sku_id)) - sku_id = SKU_UNKNOWN; + sku_id = CROS_SKU_UNKNOWN;
return sku_id; }
Hello Furquan Shaikh, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40299
to look at the new patch set (#2).
Change subject: ec/google/chromeec: expose failure SKU id ......................................................................
ec/google/chromeec: expose failure SKU id
Provide CROS_SKU_UNKNOWN defintion so callers can utilize the default and failing value without open coding it.
BUG=b:153642124
Change-Id: I447004e9016b6ab3306ea532721494ebbcda741d Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/ec/google/chromeec/ec.h M src/ec/google/chromeec/ec_skuid.c 2 files changed, 5 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/40299/2
Hello build bot (Jenkins), Furquan Shaikh, Edward O'Callaghan,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40299
to look at the new patch set (#3).
Change subject: ec/google/chromeec: expose failure and unprovisioned SKU id values ......................................................................
ec/google/chromeec: expose failure and unprovisioned SKU id values
Provide CROS_SKU_UNKNOWN and CROS_SKU_UNPROVISIONED defintion so callers can utilize the default and failing value without open coding it.
BUG=b:153642124
Change-Id: I447004e9016b6ab3306ea532721494ebbcda741d Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/ec/google/chromeec/ec.h M src/ec/google/chromeec/ec_skuid.c 2 files changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/40299/3
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40299 )
Change subject: ec/google/chromeec: expose failure and unprovisioned SKU id values ......................................................................
Patch Set 3: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40299 )
Change subject: ec/google/chromeec: expose failure and unprovisioned SKU id values ......................................................................
Patch Set 3: Code-Review+2
Aaron Durbin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40299 )
Change subject: ec/google/chromeec: expose failure and unprovisioned SKU id values ......................................................................
ec/google/chromeec: expose failure and unprovisioned SKU id values
Provide CROS_SKU_UNKNOWN and CROS_SKU_UNPROVISIONED defintion so callers can utilize the default and failing value without open coding it.
BUG=b:153642124
Change-Id: I447004e9016b6ab3306ea532721494ebbcda741d Signed-off-by: Aaron Durbin adurbin@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/40299 Reviewed-by: Edward O'Callaghan quasisec@chromium.org Reviewed-by: Furquan Shaikh furquan@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/google/chromeec/ec.h M src/ec/google/chromeec/ec_skuid.c 2 files changed, 6 insertions(+), 5 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Edward O'Callaghan: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h index f1caeb0..77ba211 100644 --- a/src/ec/google/chromeec/ec.h +++ b/src/ec/google/chromeec/ec.h @@ -79,6 +79,9 @@ int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize); int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize);
+#define CROS_SKU_UNKNOWN 0xFFFFFFFF +#define CROS_SKU_UNPROVISIONED 0x7FFFFFFF +/* Returns CROS_SKU_UNKNOWN on failure. */ uint32_t google_chromeec_get_board_sku(void); const char *google_chromeec_smbios_system_sku(void);
diff --git a/src/ec/google/chromeec/ec_skuid.c b/src/ec/google/chromeec/ec_skuid.c index 665d425..5122975 100644 --- a/src/ec/google/chromeec/ec_skuid.c +++ b/src/ec/google/chromeec/ec_skuid.c @@ -12,17 +12,15 @@ #include <string.h> #include <smbios.h>
-#define SKU_UNKNOWN 0xFFFFFFFF - uint32_t google_chromeec_get_board_sku(void) { - MAYBE_STATIC_NONZERO uint32_t sku_id = SKU_UNKNOWN; + MAYBE_STATIC_NONZERO uint32_t sku_id = CROS_SKU_UNKNOWN;
- if (sku_id != SKU_UNKNOWN) + if (sku_id != CROS_SKU_UNKNOWN) return sku_id;
if (google_chromeec_cbi_get_sku_id(&sku_id)) - sku_id = SKU_UNKNOWN; + sku_id = CROS_SKU_UNKNOWN;
return sku_id; }
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40299 )
Change subject: ec/google/chromeec: expose failure and unprovisioned SKU id values ......................................................................
Patch Set 4:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2268 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2267 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2266
Please note: This test is under development and might not be accurate at all!