lkml.org 
[lkml]   [2023]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch V2 03/37] x86/microcode/intel: Move microcode functions out of cpu/intel.c
Date
Hi Thomas,

> ...
> -#define get_totalsize(mc) \
> - (((struct microcode_intel *)mc)->hdr.datasize ? \
> - ((struct microcode_intel *)mc)->hdr.totalsize : \
> - DEFAULT_UCODE_TOTALSIZE)
> +#define DEFAULT_UCODE_DATASIZE (2000)
>
> ...
> +
> +static inline unsigned int get_totalsize(struct microcode_header_intel *hdr)
> +{
> + return hdr->datasize ? : DEFAULT_UCODE_TOTALSIZE;

I tested this patch series and observed that the inline code above failed
the late microcode loading with the error message:

[ 117.100299] microcode: Error: bad microcode data file size.

According to the original get_totalsize() macro, seems like it should be:

return hdr->datasize ? hdr->totalsize : DEFAULT_UCODE_TOTALSIZE;

With this minor change, the late microcode loading was successful, and the
expected message was displayed:

...
[ 150.198654] microcode: Microcode revision: 0x80000400 -> 0x80000401

-Qiuxu

> +}
> ...

\
 
 \ /
  Last update: 2023-08-23 15:00    [W:0.318 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site