diff options
author | Clark Williams <williams@redhat.com> | 2012-02-03 15:10:42 -0600 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-02-03 15:10:42 -0600 |
commit | 77f57fb93d132875acead3581bcdc5d2fefbe7a0 (patch) | |
tree | 5db5ccf5e1754248edc790e2f37f3a2b863f0ddb /arch/x86/kernel/microcode_amd.c | |
parent | d28048db190097536aef2be5ee9a736bd7bb92eb (diff) | |
parent | 69bade053d0f2ef0c8ee98af9f6699a55a8d8bb9 (diff) |
Merge commit 'v3.2.3' into rt-3.2.3-rt10
Diffstat (limited to 'arch/x86/kernel/microcode_amd.c')
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index d494799aafcd..ac52c153e8d8 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c @@ -300,13 +300,33 @@ free_table: return state; } +/* + * AMD microcode firmware naming convention, up to family 15h they are in + * the legacy file: + * + * amd-ucode/microcode_amd.bin + * + * This legacy file is always smaller than 2K in size. + * + * Starting at family 15h they are in family specific firmware files: + * + * amd-ucode/microcode_amd_fam15h.bin + * amd-ucode/microcode_amd_fam16h.bin + * ... + * + * These might be larger than 2K. + */ static enum ucode_state request_microcode_amd(int cpu, struct device *device) { - const char *fw_name = "amd-ucode/microcode_amd.bin"; + char fw_name[36] = "amd-ucode/microcode_amd.bin"; const struct firmware *fw; enum ucode_state ret = UCODE_NFOUND; + struct cpuinfo_x86 *c = &cpu_data(cpu); + + if (c->x86 >= 0x15) + snprintf(fw_name, sizeof(fw_name), "amd-ucode/microcode_amd_fam%.2xh.bin", c->x86); - if (request_firmware(&fw, fw_name, device)) { + if (request_firmware(&fw, (const char *)fw_name, device)) { pr_err("failed to load file %s\n", fw_name); goto out; } |