aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/amd/model_fxx/model_fxx_init.c
diff options
context:
space:
mode:
authorSven Kapferer <skapfere@rumms.uni-mannheim.de>2007-05-26 13:56:34 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-05-26 13:56:34 +0000
commit4834a4f2063509cbdb2ab20114f18664d5e9caf2 (patch)
treea78788a0e9b8aacd31005a3c3f3f4dc19b8ce994 /src/cpu/amd/model_fxx/model_fxx_init.c
parentcd3afc052492e577774b1978f47f2ed28cea7d01 (diff)
This patch fixes the processor name string for Rev F. CPUs.
It moves the complete naming functionality to src/cpu/amd/model_fxx/processor_name.c. The current code sets the processor name string twice for Rev. F CPUs. In src/cpu/amd/model_fxx/model_fxx_init.c the function amd_set_name_string_f is called first. Several lines later init_processor_name is called which doesn't recognize newer CPUs and actually programs incorrect values, thus overwriting the previously set CPU name. For example, this resulted in identifying an Opteron 2218 as a Turion processor. This patch removes the amd_set_name_string_f function from src/cpu/amd/model_fxx/model_fxx_init.c and adds support for Rev. F CPUs to src/cpu/amd/model_fxx/processor_name.c as described in the Revision Guide for AMD NPT Family 0Fh Processors, AMD Document ID 33610 Rev 3.00, October 2006. Signed-off-by: Sven Kapferer <skapfere@rumms.uni-mannheim.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2699 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/amd/model_fxx/model_fxx_init.c')
-rw-r--r--src/cpu/amd/model_fxx/model_fxx_init.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/src/cpu/amd/model_fxx/model_fxx_init.c b/src/cpu/amd/model_fxx/model_fxx_init.c
index 4087ad6e11..685b9e1804 100644
--- a/src/cpu/amd/model_fxx/model_fxx_init.c
+++ b/src/cpu/amd/model_fxx/model_fxx_init.c
@@ -462,87 +462,6 @@ static inline void k8_errata(void)
}
-#if K8_REV_F_SUPPORT == 1
-static void amd_set_name_string_f(device_t dev)
-{
- unsigned socket;
- unsigned cmpCap;
- unsigned pwrLmt;
- unsigned brandId;
- unsigned brandTableIndex;
- unsigned nN;
- unsigned unknown = 1;
-
- uint8_t str[48];
- uint32_t *p;
-
- msr_t msr;
- unsigned i;
-
- brandId = cpuid_ebx(0x80000001) & 0xffff;
-
- printk_debug("brandId=%04x\n", brandId);
- pwrLmt = ((brandId>>14) & 1) | ((brandId>>5) & 0x0e);
- brandTableIndex = (brandId>>9) & 0x1f;
- nN = (brandId & 0x3f) | ((brandId>>(15-6)) &(1<<6));
-
- socket = (dev->device >> 4) & 0x3;
-
- cmpCap = cpuid_ecx(0x80000008) & 0xff;
-
-
- if((brandTableIndex == 0) && (pwrLmt == 0)) {
- memset(str, 0, 48);
- sprintf(str, "AMD Engineering Sample");
- unknown = 0;
- } else {
-
- memset(str, 0, 48);
- sprintf(str, "AMD Processor model unknown");
-
- #if CPU_SOCKET_TYPE == 0x10
- if(socket == 0x01) { // socket F
- if ((cmpCap == 1) && ((brandTableIndex==0) ||(brandTableIndex ==1) ||(brandTableIndex == 4)) ) {
- uint8_t pc[2];
- unknown = 0;
- switch (pwrLmt) {
- case 2: pc[0]= 'E'; pc[1] = 'E'; break;
- case 6: pc[0]= 'H'; pc[1] = 'E'; break;
- case 0xa: pc[0]= ' '; pc[1] = ' '; break;
- case 0xc: pc[0]= 'S'; pc[1] = 'E'; break;
- default: unknown = 1;
-
- }
- if(!unknown) {
- memset(str, 0, 48);
- sprintf(str, "Dual-Core AMD Opteron(tm) Processor %1d2%2d %c%c", brandTableIndex<<1, (nN-1)&0x3f, pc[0], pc[1]);
- }
- }
- }
- #else
- #if CPU_SOCKET_TYPE == 0x11
- if(socket == 0x00) { // socket AM2
- if(cmpCap == 0) {
- sprintf(str, "Athlon 64");
- } else {
- sprintf(str, "Athlon 64 Dual Core");
- }
-
- }
- #endif
- #endif
- }
-
- p = str;
- for(i=0;i<6;i++) {
- msr.lo = *p; p++; msr.hi = *p; p++;
- wrmsr(0xc0010030+i, msr);
- }
-
-
-}
-#endif
-
extern void model_fxx_update_microcode(unsigned cpu_deviceid);
int init_processor_name(void);
@@ -561,10 +480,6 @@ void model_fxx_init(device_t dev)
struct cpuinfo_x86 c;
get_fms(&c, dev->device);
-
- if((c.x86_model & 0xf0) == 0x40) {
- amd_set_name_string_f(dev);
- }
#endif
#if CONFIG_USBDEBUG_DIRECT