Add LpcThinkpadEC: ThinkPad 0x1600 EC window - #105
Conversation
ec39947 to
eb535dd
Compare
namazso
left a comment
There was a problem hiding this comment.
We do have DMI checks now, please see ValveLeds.p
|
Also, I changed this to draft, please test it on the unrestricted driver (you'll have to use 2.1.0 or your own builds because 2.2.0 accidentally shipped with signature verification enabled on the unrestricted driver as well) before marking it as ready. |
ThinkPads decode a second interface to the embedded controller as a 32 byte window at 0x1600: the ACPI EC command set on 0x1600/0x1604 and the row transfer region at 0x1610..0x161F. Newer models want this interface rather than 0x62/0x66. Same shape as LpcACPIEC, with a load time gate that refuses machines where the window reads as a floating bus. Closes namazso#61
eb535dd to
5cdd313
Compare
|
Reworked the DMI gate to match LedsValve.p — I couldn't finish the unrestricted-driver test on my machine though. The 2.1.0 unrestricted driver won't load here — |
|
VBS shouldn't interfere, test signing means that things just need to be signed, but it doesn't care by whom. You could try using the old 2.0.1 version instead... I plan to try fixing this in 2.3.0, but it's a bit more complicated with DriverStore's involvement since all versions since 2.1.0 live side-by-side and are chosen by Windows. |
|
Tried 2.0.1 as you suggested, on a clean Windows 11 24H2 VM (QEMU) so I could keep it off my daily machine — same result, I loaded the driver directly with The VM has 8 active CI policies out of the box ( I can test a specific build or config on that VM if it helps the 2.3.0 work. |
|
I'm not sure what you're doing wrong, here's it all working on 24H2. Fully updated, defender enabled: vmconnect_LqYB29Not7.mp4Are you sure you have "Test Mode" correctly displayed in the bottom right of your desktop? |
|
Following your video it just worked — Test Mode was up, so that wasn't it; the earlier failures were on my end. Installed the unrestricted 2.0.1 through the installer ("Install unrestricted edition (FOR DEVELOPERS)") and the module loads and runs. Verified on the X13 (23H2), unsigned module built from this branch:
DMI gate is the LedsValve-style |
Adds the module #61 asks for: same shape as LpcACPIEC, but for the second EC interface ThinkPads decode at 0x1600 — the ACPI EC command set on 0x1600/0x1604 plus the row transfer region at 0x1610..0x161F, the window tp_smapi's thinkpad_ec.c drives on Linux. Newer ThinkPads want this interface rather than 0x62/0x66.
#61 stalled on the hardware gate, since Pawn has no DMI access. This takes the DellSMM route instead and probes the hardware at load: an unimplemented LPC port reads 0xFF, and 0xFF is never a valid EC status (every bit set, including both reserved ones), so main() refuses to load unless 0x1604 answers with a live status byte.
Reference points: TPFanCtrl2's portio.cpp and tp_smapi's thinkpad_ec.c. Verified on a ThinkPad X13 Gen 3, where this window and protocol drive the fan today and the status port reads 0x00/0x20/0x50 at 0x1604, never 0xFF. The signed-module requirement means the blob from this branch has not itself been loaded on hardware.