[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dmidecode] [PATCH v2 1/1] dmioem: HPE OEM Record 199
From: |
Jean Delvare |
Subject: |
Re: [dmidecode] [PATCH v2 1/1] dmioem: HPE OEM Record 199 |
Date: |
Tue, 9 Mar 2021 16:27:08 +0100 |
Hi Jerry,
On Sat, 6 Mar 2021 18:49:48 -0700, Jerry Hoemann wrote:
> Decode HPE OEM Record 199: CPU Microcode Patch.
>
> Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
> ---
> dmioem.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/dmioem.c b/dmioem.c
> index 3cdfdea..08e4d91 100644
> --- a/dmioem.c
> +++ b/dmioem.c
> @@ -313,6 +313,31 @@ static int dmi_decode_hp(const struct dmi_header *h)
>
> switch (h->type)
> {
> + case 199:
> + /*
> + * Vendor Specific: CPU Microcode Patch
> + *
> + * 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) {
> + const u8 *cpuid = data + ptr + 2 * 4;
> + u32 date;
> +
> + dmi_print_cpuid(pr_attr, "CPU ID", cpuid_type,
> cpuid);
> + date = DWORD(data + ptr + 4);
> + pr_subattr("Date", "%04x-%02x-%02x",
> + date & 0xffff, (date >> 24) & 0xff,
> (date >> 16) & 0xff);
> + pr_subattr("Patch", "0x%X", DWORD(data + ptr));
> + }
> + break;
> +
> case 203:
> /*
> * Vendor Specific: HP Device Correlation Record
I like it very much, thanks.
I tested it on my samples. The output makes sense for all Intel-based
systems. However for AMD-based systems, the CPU ID signature makes
little sense and doesn't match the installed CPU model. For example:
Handle 0x0003, DMI type 199, 28 bytes
HPE ProLiant CPU Microcode Patch Support Info
CPU ID: Family 0, Model 1, Stepping 2
Date: 2018-02-09
Patch: 0x8001227
CPU ID: Family 0, Model 1, Stepping 1
Date: 2017-07-14
Patch: 0x8001129
Handle 0x0084, DMI type 4, 48 bytes
Processor Information
Socket Designation: Proc 1
Type: Central Processor
Family: Zen
Manufacturer: Advanced Micro Devices, Inc.
ID: 12 0F 80 00 FF FB 8B 17
Signature: Family 23, Model 1, Stepping 2
(...)
Version: AMD EPYC 7451 24-Core Processor
(...)
That's kind of confusing. Whatever is encoded in the CPU ID field, it
doesn't look like an actual CPUID number. Any idea?
--
Jean Delvare
SUSE L3 Support