[ltp] Alan Cox 2.4 PnP BIOS kernels

Thomas Hood linux-thinkpad@linux-thinkpad.org
Mon, 05 Jan 2004 23:13:33 +0100


On Mon, 2004-01-05 at 22:42, Michael Hagemann wrote:
> There was a similar discussion recently.  You basically don't need the
> PnP BIOS support.  tpctl uses it's own interface to the BIOS (SMAPI).
> 
> The pnp-tools need the PnP support, but IIRC the only thing you can do
> with the pnp-tools that you can't do with tpctl is to make _permanent_
> changes to the configuration (I might be wrong, though...).
> 
> So if you don't use pnp-tools you don't need PnP BIOS.

The end of the tpctl README file describes the correspondences
between PS2.EXE, lspnp/setpnp and tpctl:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Things done
===========
tpctl is similar in function to PS2.EXE,  the ThinkPad configuration
tool that runs under DOS. 

One major difference between PS2.EXE and tpctl is that tpctl's changes
to hardware configuration (using --r* options) are non-permanent: they 
revert to their previous settings on reboot.  (In contrast, PS2.EXE
does change the boot-up settings; and setpnp does so if the '-b'
option is given.)  This isn't much of a limitation because appropriate
tpctl commands can be inserted in one of the initscripts (e.g.,
/etc/init.d/local in a Debian distro) to effect a quasi-permanent
change.

Another difference is in the option names.  Here is a list of all the
PS2.EXE options, plus their tpctl equivalent(s), if any.  Also listed
are equivalents using lspnp and setpnp.

Power expenditure control on ThinkPads is complicated.  The machine
switches power expenditure mode when the power source is switched
between line and battery.  For each power source, one can select to
expend power at a "high", "auto"matic or "manual"ly adjusted rate:
    PS2.EXE PMODE high AC
    tpctl --pma=high
The _current_ expenditure "rate" can in turn be customized using the
"PS2.EXE SPEED" command as follows.  This has no tpctl equivalent as
of this writing.
    PS2.EXE SPEED FIXED MAX
    PS2.EXE SPEED FIXED MEDIUM
    PS2.EXE SPEED FIXED SLOW
    PS2.EXE SPEED AUTO MEDIUM
    PS2.EXE SPEED AUTO SLOW

PS2.EXE     command or
option      tpctl option    comments
---------   -------------   --------
PMODE       --pm*
SERIAL      --rs1=(on|off)  but tpctl settings are volatile
POWER       --ptZ,--pdZ*
LCD         --ptB
DISK        --ptd,--pdZ*
ON          --pra
COVER       --psl
DOCK                        would be nice
SAFE        --pmR
RI          --prs
HTIMER      --psh
TIMER       --psZ
LBATTERY    --psb
S2H         --psH,--pdH
HSWITCH     --psp
CDSPEED     ioctl()s on the cd driver
CPUPOWER                    would be nice
SPEED                       would be nice
PCIBUSPOWER                 would be nice
HFILE                       would be nice, but if you have a FAT (i.e.,
DOS)
                            partition for the hib file then you also
have a
                            place to install PS2.EXE, which only needs
to be
                            run once with the "HFILE" option.

SCREEN      --sd*
HVEXPANSION                 would be nice
F8                          would be nice
BEEP                        would be nice

IRQ         lspnp,--rx      but tpctl doesn't display *all* IRQs
DMA         lspnp,--rx      but tpctl doesn't display *all* DMAs
KRATE                       would be nice
FNSTICKY    --sf
TPOINT      --sp*
JSTICK                      would be nice
PARALLEL    lspnp|setpnp|tpctl --rp            but tpctl settings are
volatile
SERA        lspnp|setpnp|tpctl --rs1           but tpctl settings are
volatile
IR          lspnp|setpnp|tpctl --rs2           but tpctl settings are
volatile and can't set dma
STARTUP                     yawn
PRESENTATION --pt*
PCIIRQ                      would be nice
AUDIO       lspnp|setpnp
MIDIPORT    lspnp|setpnp
AUDIOCTRL   lspnp|setpnp
IDE2        lspnp|setpnp
IDE3        lspnp|setpnp
IMODEM      lspnp|setpnp

BRIGHTNESS                  would be nice
FDD                         would be nice

SUSPEND     --S             actually does standby
OFF         --Z             actually does suspend
HIBERNATE   --H
TURN        --O (disabled)  actually does power-off
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I recommend using the PnP BIOS tools rather than tpctl -r* insofar
as possible because the PnP BIOS tools call IBM-written firmware.
The firmware functions store settings in nonvolatile ram.  Tpctl,
on the other hand, talks directly to hardware registers.  That
means that tpctl isn't dependent on the presence of the PnP BIOS
driver and that it gives a more immediate report of the current
state of the hardware; but it is still better to change settings
through the "official channels" insofar as one can.  Also, some
settings (such as resources used by sound chips) cannot be 
changed using tpctl but can be changed using setpnp.

-- 
Thomas Hood <jdthood2@yahoo.co.uk>