aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/microcode/amd_early.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c
index 7aa1acc79789..8b75f7050129 100644
--- a/arch/x86/kernel/cpu/microcode/amd_early.c
+++ b/arch/x86/kernel/cpu/microcode/amd_early.c
@@ -348,6 +348,7 @@ int __init save_microcode_in_initrd_amd(void)
348{ 348{
349 unsigned long cont; 349 unsigned long cont;
350 enum ucode_state ret; 350 enum ucode_state ret;
351 u8 *cont_va;
351 u32 eax; 352 u32 eax;
352 353
353 if (!container) 354 if (!container)
@@ -355,13 +356,15 @@ int __init save_microcode_in_initrd_amd(void)
355 356
356#ifdef CONFIG_X86_32 357#ifdef CONFIG_X86_32
357 get_bsp_sig(); 358 get_bsp_sig();
358 cont = (unsigned long)container; 359 cont = (unsigned long)container;
360 cont_va = __va(container);
359#else 361#else
360 /* 362 /*
361 * We need the physical address of the container for both bitness since 363 * We need the physical address of the container for both bitness since
362 * boot_params.hdr.ramdisk_image is a physical address. 364 * boot_params.hdr.ramdisk_image is a physical address.
363 */ 365 */
364 cont = __pa(container); 366 cont = __pa(container);
367 cont_va = container;
365#endif 368#endif
366 369
367 /* 370 /*
@@ -372,6 +375,8 @@ int __init save_microcode_in_initrd_amd(void)
372 if (relocated_ramdisk) 375 if (relocated_ramdisk)
373 container = (u8 *)(__va(relocated_ramdisk) + 376 container = (u8 *)(__va(relocated_ramdisk) +
374 (cont - boot_params.hdr.ramdisk_image)); 377 (cont - boot_params.hdr.ramdisk_image));
378 else
379 container = cont_va;
375 380
376 if (ucode_new_rev) 381 if (ucode_new_rev)
377 pr_info("microcode: updated early to new patch_level=0x%08x\n", 382 pr_info("microcode: updated early to new patch_level=0x%08x\n",