From 8eb557da83e52d3ab25ef9ac32c21800150649d4 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Fri, 7 Sep 2001 18:17:23 +0000 Subject: [PATCH] Remove code that AMD feels is not releasable. --- src/cpu/k7/cpufixup.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/cpu/k7/cpufixup.c b/src/cpu/k7/cpufixup.c index 60e75e728b..bf6fc3666c 100644 --- a/src/cpu/k7/cpufixup.c +++ b/src/cpu/k7/cpufixup.c @@ -3,42 +3,9 @@ #include #include -#define TOP_MEM 0xc001001a -#define TOP_MEM2 0xc001001d -#define IORR_FIRST 0xC0010016 -#define IORR_LAST 0xC0010019 -#define SYSCFG 0xc0010010 -#define MTRRVARDRAMEN (1 << 20) +#SORRY but AMD doesn't want this released. void k7_cpufixup(unsigned long ram_kilobytes) { - unsigned long lo = 0, hi = 0, i; - unsigned long ram_megabytes = ram_kilobytes * 1024; - // 8 MB alignment please - ram_megabytes += 0x7fffff; - ram_megabytes &= (~0x7fffff); - // set top_mem registers to ram size - printk_spew("Setting top_mem to 0x%x\n", ram_megabytes); - rdmsr(TOP_MEM, lo, hi); - printk_spew("TOPMEM was 0x%02x:0x%02x\n", hi, lo); - hi = 0; - lo = ram_megabytes; - wrmsr(TOP_MEM, lo, hi); - // I am setting this even though I won't enable it - wrmsr(TOP_MEM2, lo, hi); - - /* zero the IORR's before we enable to prevent - * undefined side effects - */ - lo = hi = 0; - for(i = IORR_FIRST; i <= IORR_LAST; i++) - wrmsr(i, lo, hi); - - rdmsr(SYSCFG, lo, hi); - printk_spew("SYSCFG was 0x%x:0x%x\n", hi, lo); - lo |= MTRRVARDRAMEN; - wrmsr(SYSCFG, lo, hi); - rdmsr(SYSCFG, lo, hi); - printk_spew("SYSCFG IS NOW 0x%x:0x%x\n", hi, lo); }