1 ==================================================
2 QEMU and ACPI BIOS Generic Event Device interface
3 ==================================================
5 The ACPI *Generic Event Device* (GED) is a HW reduced platform
6 specific device introduced in ACPI v6.1 that handles all platform
7 events, including the hotplug ones. GED is modelled as a device
8 in the namespace with a _HID defined to be ACPI0013. This document
9 describes the interface between QEMU and the ACPI BIOS.
11 GED allows HW reduced platforms to handle interrupts in ACPI ASL
12 statements. It follows a very similar approach to the _EVT method
13 from GPIO events. All interrupts are listed in _CRS and the handler
14 is written in _EVT method. However, the QEMU implementation uses a
15 single interrupt for the GED device, relying on an IO memory region
16 to communicate the type of device affected by the interrupt. This way,
17 we can support up to 32 events with a unique interrupt.
19 **Here is an example,**
25 Name (_HID, "ACPI0013")
27 Name (_CRS, ResourceTemplate ()
29 Interrupt (ResourceConsumer, Edge, ActiveHigh, Exclusive, ,, )
34 OperationRegion (EREG, SystemMemory, 0x09080000, 0x04)
35 Field (EREG, DWordAcc, NoLock, WriteAsZeros)
39 Method (_EVT, 1, Serialized)
41 Local0 = ESEL // ESEL = IO memory region which specifies the
43 If (((Local0 & One) == One))
47 If ((Local0 & 0x2) == 0x2)
55 GED IO interface (4 byte access)
56 --------------------------------
61 [0x0-0x3] Event selector bit field (32 bit) set by QEMU.
64 0: Memory hotplug event
65 1: System power down event
66 2: NVDIMM hotplug event
71 Nothing is expected to be written into GED IO memory