quo / ithc-linux

Linux driver for Intel Touch Host Controller
35 stars 6 forks source link

Implement low power modes #1

Open quo opened 2 years ago

quo commented 2 years ago

The THC doesn't seem to draw a significant amount of power as is, but it would still be nice to implement all the low power stuff the Windows driver does.

makinbacon21 commented 1 year ago

Is there documentation on this? I'd be curious to see where and how it is reducing power consumption on Windows. Could take a look at impl too.

quo commented 1 year ago

No public documentation. You'll have to reverse engineer IntelTHCBase.sys. Or if you know anyone at Intel/MS, ask them to share some docs :)

makinbacon21 commented 1 year ago

Do you have what you've RE'd so far somewhere? I'd be happy to take a look. Granted, my RE knowledge is sparse and my asm knowledge is mostly arm64, but I can try and dig around.

quo commented 1 year ago

Well, I have the register map here: https://github.com/quo/ithc-linux/blob/master/src/ithc-regs.h

What I have in Ghidra is a huge mess. I might clean it up or write up some notes at some point, but don't hold your breath.

The driver uses WDF, I think you can find some Ghidra scripts to load various WDF structs, function names etc. (But I don't remember what I used.)

makinbacon21 commented 1 year ago

Gotcha gotcha. I'll take a look if I get a chance. Thanks for the clarification!