[coreboot-gerrit] New patch to review for coreboot: b7d64ac smbios: Define and use enclosure types.
Vladimir Serbinenko (phcoder@gmail.com)
gerrit at coreboot.org
Thu Aug 28 01:55:03 CEST 2014
Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6786
-gerrit
commit b7d64ac604041b5f10209cf46a59ccb58be8ce3c
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Wed Aug 27 23:23:14 2014 +0200
smbios: Define and use enclosure types.
Change-Id: Ib5b92120cbe2ca41c9813e8caeb03161f4d3954c
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
src/arch/x86/boot/smbios.c | 2 +-
src/include/smbios.h | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/arch/x86/boot/smbios.c b/src/arch/x86/boot/smbios.c
index ce47a8b..1e720ec 100644
--- a/src/arch/x86/boot/smbios.c
+++ b/src/arch/x86/boot/smbios.c
@@ -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;
diff --git a/src/include/smbios.h b/src/include/smbios.h
index 7c41c42..a5716b3 100644
--- a/src/include/smbios.h
+++ b/src/include/smbios.h
@@ -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;
More information about the coreboot-gerrit
mailing list