[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 17/44] x86/boot: convert microcode loading to consume struct boot_info
- To: Jason Andryuk <jason.andryuk@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Oct 2024 10:58:26 -0400
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728485909; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=2FCMbJwEqBB7OrCa98yYjw9xQ65QkCdMbgQil75MjuY=; b=gVy1Ol/zinUPaFOZrszXkZi2lIX2BsDtg8m5jFqzndd51avwgF3stbYJdkrRtscxUOZYjr8/a3+VWI3mmFQv5BfQtgOqKbjf9KnGpdDbf26f9qd8uQmJ0TLgZoV2jb4PtpR++eAv1hLl5L1Ovqj/QM2XNNPx6PXvnnna9R13fG8=
- Arc-seal: i=1; a=rsa-sha256; t=1728485909; cv=none; d=zohomail.com; s=zohoarc; b=HiF6yrRJJh33CGIKM4KAZwRyNpbwTb7WtsuqsXQ/G7fAshWQlsimHV/c7h6foQxvxikkrmBjxHrQs3qjSGRFLT8Is3DM120LR+xF41lnYNhtNJuUoJ5hcKm3qgfTgJB5bvmRpoGrZsMJdpuuowJWqsZs7gAiCHdPJUaOcX8Zy6w=
- Cc: christopher.w.clark@xxxxxxxxx, stefano.stabellini@xxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Wed, 09 Oct 2024 14:58:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 10/8/24 08:50, Jason Andryuk wrote:
On 2024-10-07 17:22, Jason Andryuk wrote:
On 2024-10-06 17:49, Daniel P. Smith wrote:
@@ -205,20 +204,18 @@ static void __init microcode_scan_module(
}
static void __init microcode_grab_module(
- unsigned long *module_map,
- const multiboot_info_t *mbi)
+ unsigned long *module_map, struct boot_info *bi)
{
- module_t *mod = (module_t *)__va(mbi->mods_addr);
-
if ( ucode_mod_idx < 0 )
- ucode_mod_idx += mbi->mods_count;
- if ( ucode_mod_idx <= 0 || ucode_mod_idx >= mbi->mods_count ||
+ ucode_mod_idx += bi->nr_modules;
+ if ( ucode_mod_idx <= 0 || ucode_mod_idx >= bi->nr_modules ||
!__test_and_clear_bit(ucode_mod_idx, module_map) )
goto scan;
- ucode_mod = mod[ucode_mod_idx];
+ bi->mods[ucode_mod_idx].type = BOOTMOD_MICROCODE;
+ ucode_mod = *bi->mods[ucode_mod_idx].mod;
Why the dereference: *bi->mods[ucode_mod_idx].mod; ? I don't think it
should be there.
Oh, the next patch shows ucode_mod is not a pointer, so dereferencing is
correct. Sorry for the noise.
No worries.
v/r,
dps
|