Skip to content

Commit a0edbb4

Browse files
committed
dmidecode: Add enums from the SMBIOS 3.0.0 specification
Add 28 new enumerated values from the SMBIOS 3.0.0 specification (3 chassis types, 4 processor families, 4 processor upgrades, 13 slot types and 4 memory device types.)
1 parent 17d64dc commit a0edbb4

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
* dmidecode.c: Add preliminary support for the new _SM3_ 64-bit
44
entry point defined in the SMBIOS specification version 3.0.0.
5+
* dmidecode.c: Add 3 new chassis types (DMI type 3).
6+
* dmidecode.c: Add 4 new processor families (DMI type 4).
7+
* dmidecode.c: Add 4 new Intel socket types (DMI type 4).
8+
* dmidecode.c: Add 13 new slot types (DMI type 9).
9+
* dmidecode.c: Add 4 new memory device types (DMI type 17).
510

611
2015-04-21 Roy Franz <[email protected]>
712

dmidecode.c

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,15 @@ static const char *dmi_chassis_type(u8 code)
534534
"CompactPCI",
535535
"AdvancedTCA",
536536
"Blade",
537-
"Blade Enclosing" /* 0x1D */
537+
"Blade Enclosing",
538+
"Tablet",
539+
"Convertible",
540+
"Detachable" /* 0x20 */
538541
};
539542

540543
code &= 0x7F; /* bits 6:0 are chassis type, 7th bit is the lock bit */
541544

542-
if (code >= 0x01 && code <= 0x1D)
545+
if (code >= 0x01 && code <= 0x20)
543546
return type[code - 0x01];
544547
return out_of_spec;
545548
}
@@ -700,6 +703,7 @@ static const char *dmi_processor_family(const struct dmi_header *h, u16 ver)
700703
{ 0x29, "Core Duo Mobile" },
701704
{ 0x2A, "Core Solo Mobile" },
702705
{ 0x2B, "Atom" },
706+
{ 0x2C, "Core M" },
703707

704708
{ 0x30, "Alpha" },
705709
{ 0x31, "Alpha 21064" },
@@ -749,6 +753,9 @@ static const char *dmi_processor_family(const struct dmi_header *h, u16 ver)
749753
{ 0x63, "68010" },
750754
{ 0x64, "68020" },
751755
{ 0x65, "68030" },
756+
{ 0x66, "Athlon X4" },
757+
{ 0x67, "Opteron X1000" },
758+
{ 0x68, "Opteron X2000" },
752759

753760
{ 0x70, "Hobbit" },
754761

@@ -1176,10 +1183,14 @@ static const char *dmi_processor_upgrade(u8 code)
11761183
"Socket FM1",
11771184
"Socket FM2",
11781185
"Socket LGA2011-3",
1179-
"Socket LGA1356-3" /* 0x2C */
1186+
"Socket LGA1356-3",
1187+
"Socket LGA1150",
1188+
"Socket BGA1168",
1189+
"Socket BGA1234",
1190+
"Socket BGA1364" /* 0x30 */
11801191
};
11811192

1182-
if (code >= 0x01 && code <= 0x2C)
1193+
if (code >= 0x01 && code <= 0x30)
11831194
return upgrade[code - 0x01];
11841195
return out_of_spec;
11851196
}
@@ -1675,7 +1686,20 @@ static const char *dmi_slot_type(u8 code)
16751686
"AGP 2x",
16761687
"AGP 4x",
16771688
"PCI-X",
1678-
"AGP 8x" /* 0x13 */
1689+
"AGP 8x",
1690+
"M.2 Socket 1-DP",
1691+
"M.2 Socket 1-SD",
1692+
"M.2 Socket 2",
1693+
"M.2 Socket 3",
1694+
"MXM Type I",
1695+
"MXM Type II",
1696+
"MXM Type III",
1697+
"MXM Type III-HE",
1698+
"MXM Type IV",
1699+
"MXM 3.0 Type A",
1700+
"MXM 3.0 Type B",
1701+
"PCI Express 2 SFF-8639",
1702+
"PCI Express 3 SFF-8639" /* 0x20 */
16791703
};
16801704
static const char *type_0xA0[] = {
16811705
"PC-98/C20", /* 0xA0 */
@@ -1707,7 +1731,7 @@ static const char *dmi_slot_type(u8 code)
17071731
* function dmi_slot_id below needs updating too.
17081732
*/
17091733

1710-
if (code >= 0x01 && code <= 0x13)
1734+
if (code >= 0x01 && code <= 0x20)
17111735
return type[code - 0x01];
17121736
if (code >= 0xA0 && code <= 0xB6)
17131737
return type_0xA0[code - 0xA0];
@@ -1787,6 +1811,8 @@ static void dmi_slot_id(u8 code1, u8 code2, u8 type, const char *prefix)
17871811
case 0x11: /* AGP */
17881812
case 0x12: /* PCI-X */
17891813
case 0x13: /* AGP */
1814+
case 0x1F: /* PCI Express 2 */
1815+
case 0x20: /* PCI Express 3 */
17901816
case 0xA5: /* PCI Express */
17911817
case 0xA6: /* PCI Express */
17921818
case 0xA7: /* PCI Express */
@@ -2317,10 +2343,14 @@ static const char *dmi_memory_device_type(u8 code)
23172343
"Reserved",
23182344
"DDR3",
23192345
"FBD2",
2320-
"DDR4" /* 0x1A */
2346+
"DDR4",
2347+
"LPDDR",
2348+
"LPDDR2",
2349+
"LPDDR3",
2350+
"LPDDR4" /* 0x1E */
23212351
};
23222352

2323-
if (code >= 0x01 && code <= 0x1A)
2353+
if (code >= 0x01 && code <= 0x1E)
23242354
return type[code - 0x01];
23252355
return out_of_spec;
23262356
}

0 commit comments

Comments
 (0)