dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] [PATCH 6/6] dmidecode: Save the CPUID format


From: Jerry Hoemann
Subject: Re: [dmidecode] [PATCH 6/6] dmidecode: Save the CPUID format
Date: Thu, 4 Mar 2021 18:13:46 -0700

On Thu, Mar 04, 2021 at 05:49:25PM +0100, Jean Delvare wrote:
> In order to decode the information from HPE type 199 in a
> human-friendly way, we need to know how the CPUID data is encoded.
> This depends on the CPU brand and family, so save this information for
> later.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> ---
>  dmidecode.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- dmidecode.orig/dmidecode.c        2021-03-04 16:01:59.641999933 +0100
> +++ dmidecode/dmidecode.c     2021-03-04 17:30:29.168678385 +0100
> @@ -5248,12 +5248,12 @@ static void dmi_table_decode(u8 *buf, u3
>  
>               /* Assign vendor for vendor-specific decodes later */
>               if (h.type == 1 && h.length >= 6)
> -             {
>                       dmi_set_vendor(_dmi_string(&h, data[0x04], 0),
>                                      _dmi_string(&h, data[0x05], 0));
> -                     break;
> -             }
>  
> +             /* Remember CPUID type for HPE type 199 */
> +             if (h.type == 4 && h.length >= 0x1A && cpuid_type != cpuid_none)

Inverted sense on cpuid_type comparison.  Should be:

                if (h.type == 4 && h.length >= 0x1A && cpuid_type == cpuid_none)


> +                     cpuid_type = dmi_get_cpuid_type(&h);
>               data = next;
>       }
>  
> 
> -- 
> Jean Delvare
> SUSE L3 Support

-- 

-----------------------------------------------------------------------------
Jerry Hoemann                  Software Engineer   Hewlett Packard Enterprise
-----------------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]