--- linux-2.4.21-192/arch/i386/kernel/powernow-k7.c 2004-02-18 18:52:22.000000000 +0000 +++ patched/arch/i386/kernel/powernow-k7.c 2004-02-28 12:17:57.000000000 +0000 @@ -294,6 +294,96 @@ etuple &= 0xf00; etuple |= (c->x86_model<<4)|(c->x86_mask); +/*JOSN*/ + if (etuple == 0x7a0 && maxfid == 0x18 && startvid == 0xb) { + static struct + { + struct psb_s mypsbtable; + struct pst_s mypsttable; + char mypse []; + } mypst = + { + { + "AMDK7PNOW!", + 0x12, /* table version */ + 0, /* flags */ + 100, /* settling time */ + 0, /* reserved */ + 1 /* mumber of pst's */ + }, + { + 0x7a0, /* cpuid */ + 133, /* fsb speed */ + 0x18, /* maxFID */ + 0x0b, /* startVID */ + sizeof mypst.mypse / 2 /* number of pstates */ + }, + { + 0x12, 0x19, /* 27% 4x / 532 MHz, 1.050 V WL*/ /* FID, VID */ + 0x04, 0x19, /* 33% 5x / 665 MHz, 1.050 V L*/ + 0x06, 0x19, /* 40% 6x / 798 MHz, 1.050 V WL*/ + 0x08, 0x19, /* 46% 7x / 931 MHz, 1.050 V L*/ + 0x0b, 0x15, /* 57% 8.5x / 1130.MHz, 1.150 V W */ + //0x0e, 0x11, /* 66% 10x / 1330 MHz, 1.250 V L*/ // 0x0e, 0x0e, /* 10x / 1330 MHz, 1.300 V L*/ + 0x0f, 0x11, /* 70% 10.5x / 1396.MHz, 1.250 V W */ + 0x03, 0x0d, /* 83% 12.5x / 1662.MHz, 1.350 V W */ + //0x15, 0x0c, /* 90% 13.5x / 1796 MHz, 1.400 V L*/ // 0x15, 0x0b, /* 13.5x / 1796 MHz, 1.450 V L*/ + 0x18, 0x0b /* 100% 15x / 1995 MHz, 1.450 V WL*/ + } + }; + printk (KERN_INFO PFX "*JOSN* cpuid is 0x7a0\n"); + printk (KERN_INFO PFX "*JOSN* maxFID is 0x18\n"); + printk (KERN_INFO PFX "*JOSN* startvid is 0xb\n"); + printk (KERN_INFO PFX "*JOSN* USING MY OWN PST!\n"); + + p = (void*)&mypst; + + dprintk (KERN_INFO PFX "Found PSB header at %p\n", p); + psb = (struct psb_s *) p; + dprintk (KERN_INFO PFX "Table version: 0x%x\n", psb->tableversion); + + dprintk (KERN_INFO PFX "Flags: 0x%x (", psb->flags); + if ((psb->flags & 1)==0) { + dprintk ("Mobile"); + } else { + dprintk ("Desktop"); + } + dprintk (" voltage regulator)\n"); + + latency = psb->settlingtime; + dprintk (KERN_INFO PFX "Settling Time: %d microseconds.\n", psb->settlingtime); + dprintk (KERN_INFO PFX "Has %d PST tables. (Only dumping ones relevant to this CPU).\n", psb->numpst); + + p += sizeof (struct psb_s); + + pst = (struct pst_s *) p; + + for (i = 0 ; i numpst; i++) { + pst = (struct pst_s *) p; + number_scales = pst->numpstates; + + if ((etuple == pst->cpuid) && (maxfid==pst->maxfid) && (startvid==pst->startvid)) + { + dprintk (KERN_INFO PFX "PST:%d (@%p)\n", i, pst); + dprintk (KERN_INFO PFX " cpuid: 0x%x\t", pst->cpuid); + dprintk ("fsb: %d\t", pst->fsbspeed); + dprintk ("maxFID: 0x%x\t", pst->maxfid); + dprintk ("startvid: 0x%x\n", pst->startvid); + + fsb = pst->fsbspeed; + ret = get_ranges ((char *) pst + sizeof (struct pst_s)); + return ret; + + } else { + p = (char *) pst + sizeof (struct pst_s); + for (j=0 ; j < number_scales; j++) + p+=2; + } + } + return -ENODEV; + } +/*JOSN*/ + for (i=0xC0000; i < 0xffff0 ; i+=16) { p = phys_to_virt(i);