mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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:
parent
38edb514c9
commit
14404dd2d1
2 changed files with 56 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue