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
This commit is contained in:
Gerd Hoffmann 2020-09-15 14:08:52 +02:00
parent 38edb514c9
commit 14404dd2d1
2 changed files with 56 additions and 0 deletions

View file

@ -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;