[ltp] Thinkpad X30, 2.6.21-rc5, and the hdaps module.

Steve Thompson linux-thinkpad@linux-thinkpad.org
Mon, 9 Apr 2007 21:24:44 -0400 (EDT)


--- "Andrew J. Barr" <andrew.james.barr@gmail.com> wrote:

> Steve Thompson wrote:
>   > A bug seems likely.  As I have time I will isolate the invariants of
> 
> this
> > problem, but I don't reboot the machine all that much so it will take
> a
> > little time to isolate exactly who is doing what to whom.  I am
> somewhat
> > curious as to why the BIOS can set the CPU down to as low as 200MHz
> with
> > linux thinking it can step the processer up and down at entirely
> different
> > rates.  It just seems odd.
> 
> There are two different things, I believe, that determine the processor 
> clock speed.
> 
> I think the 200MHz frequency (and anything below 600MHz) that Windows 
> (and evidently the BIOS) reports is the result of SpeedStep + processor 
> C-states. This is at least the case for the Pentium-M in my R51. You 
> will see this number if you use gkrellm-x86info, for instance.

I blew away the entire Windows install so I can't verify this.  Yet, the
mp3 playback under those conditions is consistent with a system running at
200MHz that reports that it is running at 700+Mhz.

> > You're perfectly correct, of course.  Arbitrary ports may reset
> counters
> > or trigger actions and arbitrary events when read.  Of course, it is
> > usually the case that initiating a primary device function requires an
> IO
> > port write.  Sure, there's lots of buggy hardware (and people, if you
> > believe the stories about aliens) out there that will jump right off
> into
> > the hardware equivalent of undefined behaviour when probed
> > indiscriminately.
> > 
> > Arbitrarily reading IO ports associated with a network or SCSI
> controller
> > -- especially behind the back of the OS --  can be particularly bad. 
> But
> > if one looks at /proc/ioports and makes sure he is not bashing on
> > something already installed and not associated with the device under
> test,
> > then there is not too much risk -- particularly if you do it on a
> quite
> > system immediately after a `sync`.
> 
> I think there is the (very real) possibility for actual hardware damage 
> on the Thinkpad. Read some of the discussions a few months back about 
> tp_smapi and hdaps.

I won't discount the possibility of hardware damage, in principle.  Any
proprietary controller such as the one in ThinkPads can do just about
anything when it is accessed.  In principle, Evil Communists(tm) could
have infiltrated IBM and designed the embedded controller to delete your
hard disk if port 0x15ff was read even once, but that's just not all that
likely.  I'll stand by my non-professional assesment of the relative
dangers of inb in the context of reading the state of the hdaps port
ranges.

Indiscriminate scaremongering about such things doesn't seem reasonable. 
Writes to ports are potentially dangerous, reads much less so.


Regards,

Steve