UACPI: Difference between revisions

297 bytes added ,  2 months ago
[unchecked revision][unchecked revision]
Line 177:
 
In order to hook that up you will need to:
* Write an [https://uefi.org/specs/ACPI/6.5/12_Embedded_Controller_Interface_Specification.html embedded controller] driver
- Write an EC driver
-* Find the EC device in the AML namespace (PNP ID "PNP0C09" or ECDT table), attach an address space handler
-* Find a power button object in the namespace, attach a notify handler
-* Wait for notifications with value 0x80 (S0 Power Button Pressed).
 
Refer to [https://github.com/managarm/managarm/blob/master/kernel/thor/system/acpi/ec.cpp managarm kernel EC driver] to see an example of how this may be done.
 
<source lang="c">
Anonymous user