aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-09-15 14:08:52 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-09-17 14:16:19 +0200
commit14404dd2d1c18529f619461e09e3065e1aa46c7b (patch)
tree3c982fc39e62a9ef02d18d3ea57b74f4f9357892 /include
parent38edb514c9c2cba3c3d536504b2cddbfdc915056 (diff)
downloadqemu-14404dd2d1c18529f619461e09e3065e1aa46c7b.zip
qemu-14404dd2d1c18529f619461e09e3065e1aa46c7b.tar.gz
qemu-14404dd2d1c18529f619461e09e3065e1aa46c7b.tar.bz2
acpi: ged: add control regs
Add control regs (sleep, reset) for hw-reduced acpi. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20200915120909.20838-5-kraxel@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/hw/acpi/generic_event_device.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/acpi/generic_event_device.h b/include/hw/acpi/generic_event_device.h
index 1be05a3..38aec52 100644
--- a/include/hw/acpi/generic_event_device.h
+++ b/include/hw/acpi/generic_event_device.h
@@ -74,6 +74,17 @@ DECLARE_INSTANCE_CHECKER(AcpiGedState, ACPI_GED,
#define ACPI_GED_EVT_SEL_OFFSET 0x0
#define ACPI_GED_EVT_SEL_LEN 0x4
+#define ACPI_GED_REG_SLEEP_CTL 0x00
+#define ACPI_GED_REG_SLEEP_STS 0x01
+#define ACPI_GED_REG_RESET 0x02
+#define ACPI_GED_REG_COUNT 0x03
+
+/* ACPI_GED_REG_RESET value for reset*/
+#define ACPI_GED_RESET_VALUE 0x42
+
+/* ACPI_GED_REG_SLEEP_CTL.SLP_TYP value for S5 (aka poweroff) */
+#define ACPI_GED_SLP_TYP_S5 0x05
+
#define GED_DEVICE "GED"
#define AML_GED_EVT_REG "EREG"
#define AML_GED_EVT_SEL "ESEL"
@@ -89,6 +100,7 @@ DECLARE_INSTANCE_CHECKER(AcpiGedState, ACPI_GED,
typedef struct GEDState {
MemoryRegion evt;
+ MemoryRegion regs;
uint32_t sel;
} GEDState;