[coreboot-gerrit] New patch to review for coreboot: 39c8246 amd/amdfam10: Fix AP crash during microcode version lookup

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sat Jan 31 06:51:08 CET 2015


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8310

-gerrit

commit 39c8246d2475b4997339c188aaab4305335c29dd
Author: Timothy Pearson <tpearson at 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
    
    Change-Id: I9e2554b50ad60a8d02ef4bd3fbee6fddb238d83f
    Signed-off-by: Timothy Pearson <tpearson at 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 at 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)



More information about the coreboot-gerrit mailing list