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

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 9 Apr 2007 23:49:00 -0300


On Mon, 09 Apr 2007, Steve Thompson wrote:
> > 2. Your machine might be blacklisted by the cpufreq module and it
> > reduces the capabilities.
> 
> I doubt it.

Well, I've read something about a blacklist for some processors due to an
errata or something in LKML, but I didn't pay much attention at the time.

> > Install tp_smapi and its hdaps patch.  Use *that* one to try to locate
> > an
> > HDAPS firmware in your X30.  The stuff in Linux mainline is hopeless.
> 
> Hopeless, you say?  I thought they were careful about that sort of thing,

Yes, it is hopeless because nobody is working on hdaps mainline at all, and
yes, they are careful.

> what with 2.6 being a production cycle and all.  2.7 should be where all
> the real fun occurs.

Well, it is more complicated than that.  If you use HDAPS, get tp_smapi and
use tp_smapi's hdaps instead of what is in the kernel.  If you are curious
about the issues, search the LKML archives for HDAPS.

And there is no 2.7.  2.6 *is* where all the real fun happens right now.
The Linux kernel development model re. these things has changed.

> > *Don't* *mess* *with* *these* *IO* *ports*.   They are sensitive to
> > reads.
> 
> 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

Reading these IO ports signal transation steps to the EC.  It is all in the
H8S docs and tp_smapi code.  Messing with that might make something unhappy.
I don't know about the X30 firmware, maybe nothing reads those ports at all
in the BIOS and they're there just for the windows drivers and thinkvantage
software suite, so there would be nothing to be made unhappy.

But...

> But in this case it's too late, and I have emperical proof that wacking on
> that port range with 'inb' is not immediately fatal.  I actively encourage

... you are working blind for no reason.

> other X30 users to give it a shot if they are willing to take full
> responsibility for the possible consequences of their actions.

I encourage X30 users to read the tp_smapi code and tp_smapi-patched hdaps
code, where the protocol to talk to ports 0x1600-0x161f and what little is
known about the HDAPS firmware is documented, instead.  It is safer than
reading those ports blindly, and it will get you somewhere a LOT faster.

Reading the tp_smapi code, you'd know that a lot of the battery information
tp_smapi gets comes from those ports too, for example, so they will indeed
return something even if you don't have any HDAPS firmware in your X30...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh