| 1 |
|
| 2 |
|
| 3 |
#include <ec/google/chromeec/ec.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <stdio.h> |
| 6 |
#include <string.h> |
| 7 |
#include <smbios.h> |
| 8 |
|
| 9 |
const char *google_chromeec_smbios_system_sku(void) |
| 10 |
{ |
| 11 |
static char sku_str[14]; |
| 12 |
uint32_t sku_id = google_chromeec_get_board_sku(); |
| 13 |
snprintf(sku_str, sizeof(sku_str), "sku%u", sku_id); |
| 14 |
return sku_str; |
| 15 |
} |
| 16 |
|
| 17 |
const char *smbios_system_sku(void) |
| 18 |
{ |
| 19 |
return google_chromeec_smbios_system_sku(); |
| 20 |
} |
| 21 |
|
| 22 |
const char *smbios_mainboard_manufacturer(void) |
| 23 |
{ |
| 24 |
static char oem_name[32]; |
| 25 |
static const char *manuf; |
| 26 |
|
| 27 |
if (manuf) |
| 28 |
return manuf; |
| 29 |
|
| 30 |
manuf = CONFIG_MAINBOARD_SMBIOS_MANUFACTURER; |
| 31 |
if (google_chromeec_cbi_get_oem_name(&oem_name[0], ARRAY_SIZE(oem_name)) < 0) |
| 32 |
printk(BIOS_INFO, "Couldn't obtain OEM name from CBI\n"); |
| 33 |
else if (strlen(oem_name) > 0) |
| 34 |
manuf = &oem_name[0]; |
| 35 |
else |
| 36 |
printk(BIOS_INFO, "OEM name from CBI is empty, use default\n"); |
| 37 |
|
| 38 |
return manuf; |
| 39 |
} |
| 40 |
|
| 41 |
const char *smbios_system_manufacturer(void) |
| 42 |
{ |
| 43 |
return "Google"; |
| 44 |
} |