diff options
author | Borislav Petkov <bp@suse.de> | 2014-12-03 17:21:41 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-12-06 13:03:03 +0100 |
commit | fbae4ba8c4a387e306adc9c710e5c225cece7678 (patch) | |
tree | 661e543af2cab13c77b21519d49534e51e319fbd /arch/x86/kernel/cpu/microcode/core_early.c | |
parent | a18a0f6850d4b286a5ebf02cd5b22fe496b86349 (diff) | |
download | linux-fbae4ba8c4a387e306adc9c710e5c225cece7678.tar.gz linux-fbae4ba8c4a387e306adc9c710e5c225cece7678.tar.bz2 linux-fbae4ba8c4a387e306adc9c710e5c225cece7678.zip |
x86, microcode: Reload microcode on resume
Normally, we do reapply microcode on resume. However, in the cases where
that microcode comes from the early loader and the late loader hasn't
been utilized yet, there's no easy way for us to go and apply the patch
applied during boot by the early loader.
Thus, reuse the patch stashed by the early loader for the BSP.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/core_early.c')
-rw-r--r-- | arch/x86/kernel/cpu/microcode/core_early.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/microcode/core_early.c b/arch/x86/kernel/cpu/microcode/core_early.c index 2c017f242a78..d45df4bd16ab 100644 --- a/arch/x86/kernel/cpu/microcode/core_early.c +++ b/arch/x86/kernel/cpu/microcode/core_early.c @@ -176,3 +176,24 @@ int __init save_microcode_in_initrd(void) return 0; } + +void reload_early_microcode(void) +{ + int vendor, x86; + + vendor = x86_vendor(); + x86 = x86_family(); + + switch (vendor) { + case X86_VENDOR_INTEL: + if (x86 >= 6) + reload_ucode_intel(); + break; + case X86_VENDOR_AMD: + if (x86 >= 0x10) + reload_ucode_amd(); + break; + default: + break; + } +} |