Timothy Pearson (tpearson@raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8310
-gerrit
commit 2699f13a377f8a502356c9ea342c3a26b4cfd469 Author: Timothy Pearson tpearson@raptorengineeringinc.com Date: Fri Jan 30 23:47:45 2015 -0600
amd/amdfam10: Fix AP crash during microcode version lookup
This resolves a failure to initialize APs on Istanbul devices
While the table was a bit more elegant, the BSP needed a static table while the APs needed non-static tables due to simultaneous execution. If a static table was used each AP would crash in the for loop, while a non-static table would crash the BSP in the same for loop during cold boot. This solution keeps the logic in ROM.
TEST: Booted Opteron 8356 and Opteron 2419 into Linux. Verified that, unlike before, FIDVID code ran on startup and that all APs were initialized and presented to Linux.
Change-Id: I9e2554b50ad60a8d02ef4bd3fbee6fddb238d83f Signed-off-by: Timothy Pearson tpearson@raptorengineeringinc.com --- src/cpu/amd/model_10xxx/update_microcode.c | 49 +++++++++++------------------- 1 file changed, 18 insertions(+), 31 deletions(-)
diff --git a/src/cpu/amd/model_10xxx/update_microcode.c b/src/cpu/amd/model_10xxx/update_microcode.c index 95624e9..6a919b2 100644 --- a/src/cpu/amd/model_10xxx/update_microcode.c +++ b/src/cpu/amd/model_10xxx/update_microcode.c @@ -1,6 +1,7 @@ /* * This file is part of the coreboot project. * + * Copyright (C) 2015 Timothy Pearson tpearson@raptorengineeringinc.com, Raptor Engineering * Copyright (C) 2007 Advanced Micro Devices, Inc. * * This program is free software; you can redistribute it and/or modify @@ -56,38 +57,24 @@ static const u8 microcode_updates[] __attribute__ ((aligned(16))) = { 0x0, 0x0, 0x0, 0x0, };
-static u32 get_equivalent_processor_rev_id(u32 orig_id) { - static unsigned id_mapping_table[] = { - 0x100f00, 0x1000, - 0x100f01, 0x1000, - 0x100f02, 0x1000, - 0x100f20, 0x1020, - 0x100f21, 0x1020, - 0x100f2A, 0x1020, - 0x100f22, 0x1022, - 0x100f23, 0x1022, - 0x100f42, 0x1041, - 0x100f43, 0x1043, - 0x100f62, 0x1062, - 0x100f63, 0x1043, - 0x100f81, 0x1081, - 0x100fa0, 0x10A0, - }; - - u32 new_id; - int i; - - new_id = 0; - - for (i = 0; i < sizeof(id_mapping_table); i += 2 ) { - if(id_mapping_table[i]==orig_id) { - new_id = id_mapping_table[i + 1]; - break; - } - } - - return new_id; +u32 get_equivalent_processor_rev_id(u32 orig_id); +u32 get_equivalent_processor_rev_id(u32 orig_id) { + if (orig_id == 0x100f00) return 0x1000; + else if (orig_id == 0x100f01) return 0x1000; + else if (orig_id == 0x100f02) return 0x1000; + else if (orig_id == 0x100f20) return 0x1020; + else if (orig_id == 0x100f21) return 0x1020; + else if (orig_id == 0x100f2A) return 0x1020; + else if (orig_id == 0x100f22) return 0x1022; + else if (orig_id == 0x100f23) return 0x1022; + else if (orig_id == 0x100f42) return 0x1041; + else if (orig_id == 0x100f43) return 0x1043; + else if (orig_id == 0x100f62) return 0x1062; + else if (orig_id == 0x100f63) return 0x1043; + else if (orig_id == 0x100f81) return 0x1081; + else if (orig_id == 0x100fa0) return 0x10A0;
+ return 0; }
void update_microcode(u32 cpu_deviceid)