smbios: Create a type for smbios_enclosure_type
Add a name to the SMBIOS enclosure type enum and use it as the return type for smbios_mainboard_enclosure_type. BUG=b:143701965 TEST=compiles Change-Id: I816e17f0de2b0c119ddab638e57b0652f53f5b61 Signed-off-by: Mathew King <mathewk@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36516 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f91c0f9935
commit
be820b3911
|
@ -492,7 +492,7 @@ smbios_board_type __weak smbios_mainboard_board_type(void)
|
||||||
return SMBIOS_BOARD_TYPE_UNKNOWN;
|
return SMBIOS_BOARD_TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 __weak smbios_mainboard_enclosure_type(void)
|
smbios_enclosure_type __weak smbios_mainboard_enclosure_type(void)
|
||||||
{
|
{
|
||||||
return CONFIG_SMBIOS_ENCLOSURE_TYPE;
|
return CONFIG_SMBIOS_ENCLOSURE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,6 @@ const char *smbios_mainboard_bios_version(void);
|
||||||
const char *smbios_mainboard_asset_tag(void);
|
const char *smbios_mainboard_asset_tag(void);
|
||||||
u8 smbios_mainboard_feature_flags(void);
|
u8 smbios_mainboard_feature_flags(void);
|
||||||
const char *smbios_mainboard_location_in_chassis(void);
|
const char *smbios_mainboard_location_in_chassis(void);
|
||||||
u8 smbios_mainboard_enclosure_type(void);
|
|
||||||
|
|
||||||
#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7)
|
#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7)
|
||||||
#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8)
|
#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8)
|
||||||
|
@ -319,7 +318,7 @@ struct smbios_type2 {
|
||||||
u8 eos[2];
|
u8 eos[2];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
enum {
|
typedef enum {
|
||||||
SMBIOS_ENCLOSURE_OTHER = 0x01,
|
SMBIOS_ENCLOSURE_OTHER = 0x01,
|
||||||
SMBIOS_ENCLOSURE_UNKNOWN = 0x02,
|
SMBIOS_ENCLOSURE_UNKNOWN = 0x02,
|
||||||
SMBIOS_ENCLOSURE_DESKTOP = 0x03,
|
SMBIOS_ENCLOSURE_DESKTOP = 0x03,
|
||||||
|
@ -356,7 +355,7 @@ enum {
|
||||||
SMBIOS_ENCLOSURE_EMBEDDED_PC = 0x22,
|
SMBIOS_ENCLOSURE_EMBEDDED_PC = 0x22,
|
||||||
SMBIOS_ENCLOSURE_MINI_PC = 0x23,
|
SMBIOS_ENCLOSURE_MINI_PC = 0x23,
|
||||||
SMBIOS_ENCLOSURE_STICK_PC = 0x24,
|
SMBIOS_ENCLOSURE_STICK_PC = 0x24,
|
||||||
};
|
} smbios_enclosure_type;
|
||||||
|
|
||||||
struct smbios_type3 {
|
struct smbios_type3 {
|
||||||
u8 type;
|
u8 type;
|
||||||
|
@ -798,5 +797,6 @@ void smbios_fill_dimm_locator(const struct dimm_info *dimm,
|
||||||
struct smbios_type17 *t);
|
struct smbios_type17 *t);
|
||||||
|
|
||||||
smbios_board_type smbios_mainboard_board_type(void);
|
smbios_board_type smbios_mainboard_board_type(void);
|
||||||
|
smbios_enclosure_type smbios_mainboard_enclosure_type(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue