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