[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230919143230.GDZQmw/kLc5nyu9CZV@fat_crate.local>
Date: Tue, 19 Sep 2023 16:32:30 +0200
From: Borislav Petkov <bp@...en8.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
"Chang S. Bae" <chang.seok.bae@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Nikolay Borisov <nik.borisov@...e.com>
Subject: Re: [patch V3 07/30] x86/microcode/intel: Simplify early loading
On Tue, Sep 12, 2023 at 09:57:54AM +0200, Thomas Gleixner wrote:
> @@ -361,89 +356,75 @@ static bool load_builtin_intel_microcode
> return false;
> }
>
> -int __init save_microcode_in_initrd_intel(void)
> +static __init struct microcode_intel *get_ucode_from_cpio(struct ucode_cpu_info *uci)
This is not only cpio but the builtin crap too. Just call it
load_microcode_blobs() or so.
...
> -static struct microcode_intel *__load_ucode_intel(struct ucode_cpu_info *uci)
> +static int __init save_microcode_from_cpio(void)
> {
> - struct cpio_data cp;
> -
> - /* try built-in microcode first */
> - if (!load_builtin_intel_microcode(&cp))
> - cp = find_microcode_in_initrd(ucode_path);
> -
> - if (!(cp.data && cp.size))
> - return NULL;
> + struct microcode_intel *mc;
>
> - intel_cpu_collect_info(uci);
> + if (!ucode_early_pa)
> + return 0;
>
> - return scan_microcode(cp.data, cp.size, uci, false);
> + mc = __va((void *)ucode_early_pa);
> + save_microcode_patch(mc);
> + return 0;
> }
> +early_initcall(save_microcode_from_cpio);
>
> +/* Load microcode on BSP from CPIO */
Yeah, no need to say "from CPIO" everywhere. We load it from somewhere,
it can be cpio but it can be builtin too.
But I can fix up too when applying.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists