smbios: Define and use enclosure types.

Change-Id: Ib5b92120cbe2ca41c9813e8caeb03161f4d3954c
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6786
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Vladimir Serbinenko 2014-08-27 23:23:14 +02:00
parent 04e6f070aa
commit 71c0bf6202
2 changed files with 7 additions and 1 deletions

View File

@ -253,7 +253,7 @@ static int smbios_write_type3(unsigned long *current, int handle)
t->bootup_state = SMBIOS_STATE_SAFE;
t->power_supply_state = SMBIOS_STATE_SAFE;
t->thermal_state = SMBIOS_STATE_SAFE;
t->_type = 3;
t->_type = SMBIOS_ENCLOSURE_DESKTOP;
t->security_status = SMBIOS_STATE_SAFE;
len = t->length + smbios_string_table_len(t->eos);
*current += len;

View File

@ -115,6 +115,12 @@ struct smbios_type2 {
char eos[2];
} __attribute__((packed));
enum
{
SMBIOS_ENCLOSURE_DESKTOP = 3,
SMBIOS_ENCLOSURE_NOTEBOOK = 9,
};
struct smbios_type3 {
u8 type;
u8 length;