Difference between revisions of "Embedded Controller Firmware"

From ThinkWiki
Jump to: navigation, search
(Firmware issues: some formatting fixes; add annoyance level measurement :-))
(Bug: Fan control loop status is not initialized: update with more data)
Line 69: Line 69:
 
* Windows annoyance level: unknown
 
* Windows annoyance level: unknown
 
* Fix: unknown status at this time, usually worked around by ACPI DSDT.
 
* Fix: unknown status at this time, usually worked around by ACPI DSDT.
* Information: [http://forum.thinkpads.com/viewforum.php?f=27 thinkpads.com fan control programs forum], [http://thread.gmane.org/gmane.linux.hardware.thinkpad/28326/ linux-thinkpad ML thread]
+
* Information: [http://forum.thinkpads.com/viewforum.php?f=27 thinkpads.com fan control programs forum], [http://thread.gmane.org/gmane.linux.hardware.thinkpad/28326 linux-thinkpad ML thread 1], [http://thread.gmane.org/gmane.linux.hardware.thinkpad/28554 linux-thinkpad ML thread 2]
  
 
* Models affected:
 
* Models affected:
** {{T43}}, {{T43p}}, {{R52}}
+
** {{T43}} (26xx), {{T43p}} (all), {{R51e}} 78HT05WW-1.00
** no information about other models, please report on linux-thinkpad ML, see link above
+
* Models NOT affected (confirmed by reports):
 +
** The *60 series and newer (T,Z,X)
 +
** T23
 +
* Models that are probably affected (need reports):
 +
** {{T43}} (18xx), {{R52}}
  
 
The EC does not correctly initializes its 0x2f (fan control) register, so [[ibm-acpi]] cannot determine the correct status of the fan control until something writes to the fan control register for the first time.
 
The EC does not correctly initializes its 0x2f (fan control) register, so [[ibm-acpi]] cannot determine the correct status of the fan control until something writes to the fan control register for the first time.

Revision as of 16:53, 18 October 2006

ThinkPad Embedded Controller Firmware

The ThinkPad has an embedded microcontroller (EC) which is responsible for many of the background tasks on a laptop. Embedded Controller Chips lists the different embedded microcontrollers found on various ThinkPads. This page concerns itself with the various embedded controller firmwares.

ATTENTION!
As a rule, if you are not using the latest available firmware for your ThinkPad, you are likely to be the unlucky chap that will find out some new code hits a firmware bug that was fixed by IBM or Lenovo. Do yourself a favour and always keep your ThinkPad's firmware up-to-date.

Old-style ThinkPad EC firmware

Not much is known about the ECs on the older numeric-series ThinkPads, or the early A, X and T-series models. These microcontrollers don't seem to support field-upgradeable firmware, and only the BIOS SMAPI and DSDT ACPI interfaces are really available for driver writers.

  • Interfaces:
    • EC register map
    • ACPI DSDT / APM
    • SMAPI
    • CMOS memory map

New-style ThinkPad EC firmware

Apparently, all newer ThinkPad ECs are a Renesas H8S/2161BV or another compatible H8S/300 microcontroller with very similar firmware.

  • Interfaces:
    • Forward-compatible EC register map
    • ACPI DSDT, APM (deprecated in newer models)
    • Renesas H8S LPC3A (?), LPC3B (HDAPS firmware, Battery information)
    • ACPI SMAPI methods
    • SMAPI
    • CMOS memory map
FIXME
tpctl, tpb and other drivers, please someone expand on how well they work with the new ThinkPads

Firmware issues

Various bugs have been observed in the ThinkPad EC firmware of various models. Most of them were fixed in later revisions, but a few are either very dangerous and driver writers need to always work around them, or have never been fixed. One must keep in mind that many of the bugs fixed by IBM or Lenovo could cause serious problems, but might never be noticed by driver developers, because they usually keep their ThinkPads up-to-date. People that don't keep their ThinkPad firmware up-to-date are excellent guinea pigs...

Bug: Advanced battery query causes EC hang

  • Severity: critical
  • Linux annoyance level: harmless
  • Windows annoyance level: unknown
  • Fix: available from IBM, but not for all affected models
  • Information: thread in linux-thinkpad ML
  • Models affected:
    • T40, T40p, T41, T41p, T42, T42p: all models affected, no fix available
    • T43 26xx, T43p: fixed on firmware 1YHT28WW (1.05) and newer
    • T43 18xx, R52: likely buggy, unknown status (might be fixed in latest firmwares)
    • other ThinkPads featuring advanced battery queries: unknown status; every model supported by tp_smapi advanced battery information is a candidate for this bug

The EC LPC3B advanced battery query function 0x0B (only used by tp_smapi) has a hideous bug that causes the EC to misbehave and crash (usually hanging the entire ThinkPad). This function must never be called on a buggy firmware.

No Linux drivers use this function, as its purpose is currently unknown.

Bug: Fan control loop status is not initialized

  • Models affected:
  • Models NOT affected (confirmed by reports):
    • The *60 series and newer (T,Z,X)
    • T23
  • Models that are probably affected (need reports):

The EC does not correctly initializes its 0x2f (fan control) register, so ibm-acpi cannot determine the correct status of the fan control until something writes to the fan control register for the first time.

Many models do write to the fan control register in their ACPI DSDT methods, which provides a work-around. This usually fixes the issue during suspend and wakeup.

Bug: Fan control loop pulses the fan in an annoying pattern

  • Models affected:
    • T40, T40p, T41, T41p, T42, T42p: fixed by firmware 1RHT70WW (3.03) and later
    • T43, T43p, R52: IBM provided a broken firmware fix, so they are all affected
    • other newer models: unknown status

The fan control loop will vary the fan speed quite a lot, in a very annoying pattern. The broken fix on the T43 firmware causes very loud and annoying pulses every 30s.

People have reportedly returned ThinkPads because of this bug.

Bug: Tachometer registers not invalidated in disengaged mode

  • Severity: low
  • Linux annoyance level: minor
  • Windows annoyance level: minor
  • Fix: none available
  • Models affected:
    • Unknown (disengaged mode might not be supported on all ThinkPads)

When the fan control loop is placed in disengaged mode (bit 6 of EC register 0x2f is set) where no tachometer readings take place, the EC does not set the tachometer registers (0x84, 0x85) to 0xFF to signal an invalid reading. Instead, the registers are simply not updated anymore and retain the last tachometer reading that took place.

This bug can be easily worked around in drivers.

See also