summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/coreboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc/coreboot.c')
-rw-r--r--payloads/libpayload/libc/coreboot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 1efde9a332..d831b96ba2 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -157,6 +157,12 @@ static void cb_parse_ram_code(unsigned char *ptr, struct sysinfo_t *info)
info->ram_code = ram_code->id_code;
}
+static void cb_parse_sku_id(unsigned char *ptr, struct sysinfo_t *info)
+{
+ struct cb_strapping_id *const sku_id = (struct cb_strapping_id *)ptr;
+ info->sku_id = sku_id->id_code;
+}
+
#if IS_ENABLED(CONFIG_LP_NVRAM)
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
@@ -280,6 +286,7 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
/* Initialize IDs as undefined in case they don't show up in table. */
info->board_id = UNDEFINED_STRAPPING_ID;
info->ram_code = UNDEFINED_STRAPPING_ID;
+ info->sku_id = UNDEFINED_STRAPPING_ID;
/* Now, walk the tables. */
ptr += header->header_bytes;
@@ -380,6 +387,9 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_RAM_CODE:
cb_parse_ram_code(ptr, info);
break;
+ case CB_TAG_SKU_ID:
+ cb_parse_sku_id(ptr, info);
+ break;
case CB_TAG_WIFI_CALIBRATION:
cb_parse_wifi_calibration(ptr, info);
break;