2012-12-05 12:59:35 +00:00
|
|
|
From: Ian Campbell <ijc@hellion.org.uk>
|
|
|
|
Date: Mon, 26 Nov 2012 09:41:02 +0000
|
2013-07-01 01:12:30 +00:00
|
|
|
Subject: microcode_xen: Add support for AMD family >= 15h
|
|
|
|
Origin: http://git.kernel.org/?p=linux/kernel/git/konrad/xen.git/commit?id=db18162b238275f4ef532c6c1f662116a83b6496
|
2012-12-05 12:59:35 +00:00
|
|
|
|
|
|
|
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
|
2013-07-01 01:12:30 +00:00
|
|
|
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
2012-12-05 12:59:35 +00:00
|
|
|
---
|
2013-07-01 01:12:30 +00:00
|
|
|
arch/x86/kernel/microcode_xen.c | 8 ++++++--
|
2012-12-05 12:59:35 +00:00
|
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/arch/x86/kernel/microcode_xen.c b/arch/x86/kernel/microcode_xen.c
|
2013-07-01 01:12:30 +00:00
|
|
|
index 6a73957..9e50566 100644
|
2012-12-05 12:59:35 +00:00
|
|
|
--- a/arch/x86/kernel/microcode_xen.c
|
|
|
|
+++ b/arch/x86/kernel/microcode_xen.c
|
|
|
|
@@ -58,7 +58,7 @@ static int xen_microcode_update(int cpu)
|
|
|
|
|
|
|
|
static enum ucode_state xen_request_microcode_fw(int cpu, struct device *device)
|
|
|
|
{
|
|
|
|
- char name[30];
|
|
|
|
+ char name[36];
|
|
|
|
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
|
|
|
const struct firmware *firmware;
|
|
|
|
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
|
|
|
|
@@ -74,7 +74,11 @@ static enum ucode_state xen_request_microcode_fw(int cpu, struct device *device)
|
|
|
|
break;
|
|
|
|
|
|
|
|
case X86_VENDOR_AMD:
|
|
|
|
- snprintf(name, sizeof(name), "amd-ucode/microcode_amd.bin");
|
|
|
|
+ /* Beginning with family 15h AMD uses family-specific firmware files. */
|
|
|
|
+ if (c->x86 >= 0x15)
|
|
|
|
+ snprintf(name, sizeof(name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86);
|
|
|
|
+ else
|
|
|
|
+ snprintf(name, sizeof(name), "amd-ucode/microcode_amd.bin");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|