[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH 4/4] Add support for SMBIOS 2.7.0: cooling device, IP
From: |
Jean Delvare |
Subject: |
[dmidecode] [PATCH 4/4] Add support for SMBIOS 2.7.0: cooling device, IPMI |
Date: |
Sat, 13 Nov 2010 20:53:09 +0100 |
Add description of cooling device (DMI type 27).
Add limited support for new DMI type 42 (Management Controller Host
Interface).
---
dmidecode.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 49 insertions(+), 3 deletions(-)
--- dmidecode.orig/dmidecode.c 2010-11-13 10:41:53.000000000 +0100
+++ dmidecode/dmidecode.c 2010-11-13 20:41:59.000000000 +0100
@@ -66,7 +66,7 @@
#define out_of_spec "<OUT OF SPEC>"
static const char *bad_index = "<BAD INDEX>";
-#define SUPPORTED_SMBIOS_VER 0x0206
+#define SUPPORTED_SMBIOS_VER 0x0207
/*
* Type-independant Stuff
@@ -147,10 +147,11 @@ static const char *dmi_smbios_structure_
"IPMI Device",
"Power Supply",
"Additional Information",
- "Onboard Device", /* 41 */
+ "Onboard Device",
+ "Management Controller Host Interface", /* 42 */
};
- if (code <= 41)
+ if (code <= 42)
return type[code];
return out_of_spec;
}
@@ -3033,6 +3034,30 @@ static void dmi_additional_info(const st
}
/*
+ * 7.43 Management Controller Host Interface (Type 42)
+ */
+
+static const char *dmi_management_controller_host_type(u8 code)
+{
+ /* DMTF DSP0239 (MCTP) version 1.1.0 */
+ static const char *type[] = {
+ "KCS: Keyboard Controller Style", /* 0x02 */
+ "8250 UART Register Compatible",
+ "16450 UART Register Compatible",
+ "16550/16550A UART Register Compatible",
+ "16650/16650A UART Register Compatible",
+ "16750/16750A UART Register Compatible",
+ "16850/16850A UART Register Compatible" /* 0x08 */
+ };
+
+ if (code >= 0x02 && code <= 0x08)
+ return type[code - 0x02];
+ if (code == 0xF0)
+ return "OEM";
+ return out_of_spec;
+}
+
+/*
* Main
*/
@@ -3798,6 +3823,8 @@ static void dmi_decode(const struct dmi_
printf("\tNominal Speed:");
dmi_cooling_device_speed(WORD(data + 0x0C));
printf("\n");
+ if (h->length < 0x0F) break;
+ printf("\tDescription: %s\n", dmi_string(h,
data[0x0E]));
break;
case 28: /* 7.29 Temperature Probe */
@@ -4096,6 +4123,25 @@ static void dmi_decode(const struct dmi_
dmi_slot_segment_bus_func(WORD(data + 0x07),
data[0x09], data[0x0A], "\t");
break;
+ case 42: /* 7.43 Management Controller Host Interface */
+ printf("Management Controller Host Interface\n");
+ if (h->length < 0x05) break;
+ printf("\tInterface Type: %s\n",
+
dmi_management_controller_host_type(data[0x04]));
+ /*
+ * There you have a type-dependent, variable-length
+ * part in the middle of the structure, with no
+ * length specifier, so no easy way to decode the
+ * common, final part of the structure. What a pity.
+ */
+ if (h->length < 0x09) break;
+ if (data[0x04] == 0xF0) { /* OEM */
+ printf("\tVendor ID: 0x%02X%02X%02X%02X\n",
+ data[0x05], data[0x06], data[0x07],
+ data[0x08]);
+ }
+ break;
+
case 126: /* 7.44 Inactive */
printf("Inactive\n");
break;
--
Jean Delvare
- [dmidecode] [PATCH 0/4] SMBIOS 2.7.0 support, Jean Delvare, 2010/11/13
- [dmidecode] [PATCH 1/4] Update references to match SMBIOS 2.7.0, Jean Delvare, 2010/11/13
- [dmidecode] [PATCH 2/4] Add support SMBIOS 2.7.0: BIOS, chassis and processor, Jean Delvare, 2010/11/13
- [dmidecode] [PATCH 3/4] Add support for SMBIOS 2.7.0: memory, Jean Delvare, 2010/11/13
- [dmidecode] [PATCH 4/4] Add support for SMBIOS 2.7.0: cooling device, IPMI,
Jean Delvare <=
- [dmidecode] Re: [PATCH 0/4] SMBIOS 2.7.0 support, Jean Delvare, 2010/11/24