[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
On 2024-10-07 17:22, Jason Andryuk wrote: On 2024-10-06 17:49, Daniel P. Smith wrote:Convert the microcode loading functions to take struct boot_info, and then using struct boot_module to map and check for microcode. To keep the changes focused, continue using the struct mod to hold the reference to the microcodethat is used by the late microcode logic. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> --- xen/arch/x86/cpu/microcode/core.c | 37 +++++++++++++--------------- xen/arch/x86/include/asm/bootinfo.h | 1 + xen/arch/x86/include/asm/microcode.h | 14 ++++++----- xen/arch/x86/setup.c | 4 +-- 4 files changed, 28 insertions(+), 28 deletions(-)diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.cindex 8564e4d2c94c..22fea80bc97e 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c@@ -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. Regards, Jason
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |