From db44be9405ae4b62b525fb7dad80e20c499cc07b Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Mon, 20 Mar 2006 20:49:34 +0000 Subject: added definitions. added cpubug support. added object. Commented out msr set in northbridge that conflicted with the cpubug support. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2218 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/cpu/amd/model_gx2/Config.lb | 1 + src/cpu/amd/model_gx2/cpubug.c | 364 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 src/cpu/amd/model_gx2/cpubug.c (limited to 'src/cpu') diff --git a/src/cpu/amd/model_gx2/Config.lb b/src/cpu/amd/model_gx2/Config.lb index b643d778eb..8fe6dda21d 100644 --- a/src/cpu/amd/model_gx2/Config.lb +++ b/src/cpu/amd/model_gx2/Config.lb @@ -4,3 +4,4 @@ dir /cpu/x86/mmx dir /cpu/x86/lapic dir /cpu/x86/cache driver model_gx2_init.o +object cpubug.o diff --git a/src/cpu/amd/model_gx2/cpubug.c b/src/cpu/amd/model_gx2/cpubug.c new file mode 100644 index 0000000000..02fce1a0b6 --- /dev/null +++ b/src/cpu/amd/model_gx2/cpubug.c @@ -0,0 +1,364 @@ +#include + +void +cpubug(void){ + msr_t msr; + int rev; + + msr = rdmsr(GLCP_CHIP_REVID); + + rev = msr.lo & 0xff; + if (rev < 0x20) { + printk_error("%s: rev < 0x20! bailing!\n"); + return; + } + + switch(rev) + { + case 0x20: + pcideadlock(); + eng1398(); + bug752(); + break; + case 0x22: + pcideadlock(); + eng1398(); + eng2900(); + bug 118339(); + break; + case 0x22: + case 0x30: + break; + default: + printk_error("unknown rev %x, bailing\n", rev); + return; + } + bug784(); + bug118253(); + disablememoryreadorder(); +} + +#if 0 +void +bug645(void){ + msr_t msr; + rdmsr(CPU_ID_CONFIG); + msr.whatever |= ID_CONFIG_SERIAL_SET; + wrmsr(msr); +} + +void +bug573(void){ + msr_t msr; + + msr = rdmsr(MC_GLD_MSR_PM); + msr.eax &= 0xfff3; + wrmsr(MC_GLD_MSR_PM); +} + +static void +pcideadlock(void){ + msr_t msr; + + msr = rdmsr(CPU_DM_CONFIG0); + msr.hi &= ~(7<