smbios: add a family id in smbios type1 family
mosys will use this field to identify system
BRANCH=none
BUG=chromium:359155
TEST=build ok, use dmidecode to check whether data is
written correctly
Change-Id: Icfbd4c61fc49a9cb3d3ecd2b622339957963150c
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/217400
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
This commit is contained in:
parent
4df22cd78e
commit
7adbdab761
2 changed files with 13 additions and 0 deletions
|
|
@ -277,6 +277,13 @@ const char *__attribute__((weak)) smbios_mainboard_version(void)
|
|||
return CONFIG_MAINBOARD_VERSION;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAINBOARD_FAMILY
|
||||
const char *smbios_mainboard_family(void)
|
||||
{
|
||||
return CONFIG_MAINBOARD_FAMILY;
|
||||
}
|
||||
#endif /* CONFIG_MAINBOARD_FAMILY */
|
||||
|
||||
static int smbios_write_type1(unsigned long *current, int handle)
|
||||
{
|
||||
struct smbios_type1 *t = (struct smbios_type1 *)*current;
|
||||
|
|
@ -290,6 +297,9 @@ static int smbios_write_type1(unsigned long *current, int handle)
|
|||
t->product_name = smbios_add_string(t->eos, CONFIG_MAINBOARD_PART_NUMBER);
|
||||
t->serial_number = smbios_add_string(t->eos, smbios_mainboard_serial_number());
|
||||
t->version = smbios_add_string(t->eos, smbios_mainboard_version());
|
||||
#ifdef CONFIG_MAINBOARD_FAMILY
|
||||
t->family = smbios_add_string(t->eos, smbios_mainboard_family());
|
||||
#endif
|
||||
len = t->length + smbios_string_table_len(t->eos);
|
||||
*current += len;
|
||||
return len;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ int smbios_write_type41(unsigned long *current, int *handle,
|
|||
|
||||
const char *smbios_mainboard_serial_number(void);
|
||||
const char *smbios_mainboard_version(void);
|
||||
#ifdef CONFIG_MAINBOARD_FAMILY
|
||||
const char *smbios_mainboard_family(void);
|
||||
#endif
|
||||
|
||||
#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7)
|
||||
#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue