summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2015-04-27 08:29:32 +0000
committerkhali <khali>2015-04-27 08:29:32 +0000
commit12864a3f3af38ee0ec71b9796bd10ee98b5d32dd (patch)
tree020e39ec701369a19a9d9ae98859bb0d586841b2
parentc001cfff2f8ff2689c87a75623d312e331df31f7 (diff)
downloaddmidecode-12864a3f3af38ee0ec71b9796bd10ee98b5d32dd.tar.gz
dmidecode: Add fields from the SMBIOS 3.0.0 specification
Add support for 3 new fields in DMI type 4 (Processor Information): extended core and thread counts, for systems with more than 255 of those.
-rw-r--r--CHANGELOG4
-rw-r--r--dmidecode.c16
2 files changed, 15 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 7f7f2c6..b992f74 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
2015-04-27 Jean Delvare <jdelvare@suse.de>
+ Update to support SMBIOS specification version 3.0.0.
+
* dmidecode.c: Add preliminary support for the new _SM3_ 64-bit
entry point defined in the SMBIOS specification version 3.0.0.
* dmidecode.c: Add 3 new chassis types (DMI type 3).
@@ -7,6 +9,8 @@
* dmidecode.c: Add 4 new Intel socket types (DMI type 4).
* dmidecode.c: Add 13 new slot types (DMI type 9).
* dmidecode.c: Add 4 new memory device types (DMI type 17).
+ * dmidecode.c: Add support for processors with more than 255 cores
+ or threads (DMI type 4).
2015-04-21 Roy Franz <roy.franz@linaro.org>
diff --git a/dmidecode.c b/dmidecode.c
index 47e7b50..731026a 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -25,7 +25,7 @@
* are deemed to be part of the source code.
*
* Unless specified otherwise, all references are aimed at the "System
- * Management BIOS Reference Specification, Version 2.8.0" document,
+ * Management BIOS Reference Specification, Version 3.0.0" document,
* available from http://www.dmtf.org/standards/smbios.
*
* Note to contributors:
@@ -69,7 +69,7 @@
#define out_of_spec "<OUT OF SPEC>"
static const char *bad_index = "<BAD INDEX>";
-#define SUPPORTED_SMBIOS_VER 0x0208
+#define SUPPORTED_SMBIOS_VER 0x0300
#define FLAG_NO_FILE_OFFSET (1 << 0)
@@ -3394,11 +3394,17 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
dmi_string(h, data[0x22]));
if (h->length < 0x28) break;
if (data[0x23] != 0)
- printf("\tCore Count: %u\n", data[0x23]);
+ printf("\tCore Count: %u\n",
+ h->length >= 0x2C && data[0x23] == 0xFF ?
+ WORD(data + 0x2A) : data[0x23]);
if (data[0x24] != 0)
- printf("\tCore Enabled: %u\n", data[0x24]);
+ printf("\tCore Enabled: %u\n",
+ h->length >= 0x2E && data[0x24] == 0xFF ?
+ WORD(data + 0x2C) : data[0x24]);
if (data[0x25] != 0)
- printf("\tThread Count: %u\n", data[0x25]);
+ printf("\tThread Count: %u\n",
+ h->length >= 0x30 && data[0x25] == 0xFF ?
+ WORD(data + 0x2E) : data[0x25]);
printf("\tCharacteristics:");
dmi_processor_characteristics(WORD(data + 0x26), "\t\t");
break;