|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Stefan Sperling (stsp
stsp.in-berlin.de)
Date: Tue Mar 20 2007 - 06:15:10 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
looking into SpeedStep support for my Thinkpad X21 laptop,
I found an piixpcib driver in NetBSD [1] and created an
equivalent one for OpenBSD. You can find the current state of
the driver at http://stsp.in-berlin.de/piixpcib/
My piixpcib driver is based on the ichpcib driver and uses code from
the NetBSD piixpcib driver. It also supports setting hw.cpuspeed
which the NetBSD version seems to be lacking.
I've tested the driver on my laptop and it works fine.
I'm not stuck at a fixed CPU speed anymore :-)
If the driver attaches correctly it displays:
piixpcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02: SpeedStep
isa0 at piixpcib0
There is one issue I need help with though:
The NetBSD driver uses the bioscall [2] interface to
query the BIOS for an I/O port and a special "signature"
(PIIXPCIB_GSIC in the code below) that apparently indicates
SpeedStep support. This is the function in the NetBSD driver
that does this:
static void
piixpcib_int15_gsic_call(int *sig, int *smicmd, int *cmd, int *smidata, int *flags)
{
struct bioscallregs regs;
memset(®s, 0, sizeof(struct bioscallregs));
regs.EAX = 0x0000e980; /* IST support */
regs.EDX = PIIXPCIB_GSIC;
bioscall(0x15, ®s);
if (regs.EAX == PIIXPCIB_GSIC) {
*sig = regs.EAX;
*smicmd = regs.EBX & 0xff;
*cmd = (regs.EBX >> 16) & 0xff;
*smidata = regs.ECX;
*flags = regs.EDX;
} else
*sig = *smicmd = *cmd = *smidata = *flags = -1;
return;
}
I don't know how to do the equivalent of this on OpenBSD.
For now, my driver uses "default values" the NetBSD
driver uses if its piixpcib_int15_gsic_call() function fails.
These values work fine on my laptop but may cause issues on other
hardware, I'm not sure. Any help is very much appreciated.
If you find any other issues in my patch please point them out, thanks.
[1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/pci/piixpcib.c
[2] http://netbsd.gw.com/cgi-bin/man-cgi?bioscall++NetBSD-current
--
stefan
http://stsp.in-berlin.de PGP Key: 0xF59D25F0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]