[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dmidecode] [PATCH 1/1] dmioem: HPE OEM Record 199
From: |
Jerry Hoemann |
Subject: |
[dmidecode] [PATCH 1/1] dmioem: HPE OEM Record 199 |
Date: |
Thu, 25 Feb 2021 12:39:55 -0700 |
Decode HPE OEM Record 199: CPU Microcode Patch.
Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
dmioem.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/dmioem.c b/dmioem.c
index 8fe84e0..58ad400 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -310,6 +310,36 @@ static int dmi_decode_hp(const struct dmi_header *h)
switch (h->type)
{
+ case 199:
+ /*
+ * Vendor Specific: CPU Microcode Patch
+ *
+ * Type 199:
+ * Offset | Name | Width | Description
+ * -------------------------------------
+ * 0x00 | Type | BYTE | 0xC7, CPU Microcode
Patch
+ * 0x01 | Length | BYTE | Length of structure
+ * 0x02 | Handle | WORD | Unique handle
+ * 0x04 | Patch Info | Varies| { <DWORD: ID, DWORD
Date, DWORD CPUID> ...}
+ */
+ pr_handle_name("%s ProLiant CPU Microcode Patch Support
Info", company);
+
+ for (ptr = 0x4; ptr + 12 <= h->length; ptr += 12) {
+ u32 date;
+ u32 cpuid;
+
+ pr_attr("Patch", "0x%08X", DWORD(data + ptr));
+ date = DWORD(data + ptr + sizeof(u32));
+ pr_attr("Date", "%2x/%02x/%4x",
+ (date >> 24) & 0xff, (date >> 16) &
0xff, date & 0xffff);
+ cpuid = DWORD(data + ptr + 2 * sizeof(u32));
+ pr_attr("CPUID", "%02X %02X %02X %02X",
+ cpuid & 0xff, (cpuid >> 8) &
0xff,
+ (cpuid >> 16) & 0xff, (cpuid >>
24) & 0xff);
+ }
+
+ break;
+
case 203:
/*
* Vendor Specific: HP Device Correlation Record
--
2.26.2