[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/22] acpi: fadt: add hw-reduced sleep register support
From: |
Gerd Hoffmann |
Subject: |
[PATCH v3 08/22] acpi: fadt: add hw-reduced sleep register support |
Date: |
Wed, 20 May 2020 15:19:49 +0200 |
Add fields to struct AcpiFadtData and update build_fadt() to properly
generate sleep register entries.
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
---
include/hw/acpi/acpi-defs.h | 2 ++
hw/acpi/aml-build.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index c13327fa7867..3be9ab504968 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -88,6 +88,8 @@ typedef struct AcpiFadtData {
struct AcpiGenericAddress pm_tmr; /* PM_TMR_BLK */
struct AcpiGenericAddress gpe0_blk; /* GPE0_BLK */
struct AcpiGenericAddress reset_reg; /* RESET_REG */
+ struct AcpiGenericAddress sleep_ctl; /* SLEEP_CONTROL_REG */
+ struct AcpiGenericAddress sleep_sts; /* SLEEP_STATUS_REG */
uint8_t reset_val; /* RESET_VALUE */
uint8_t rev; /* Revision */
uint32_t flags; /* Flags */
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 3681ec6e3d88..a894e2581fa2 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1865,9 +1865,9 @@ void build_fadt(GArray *tbl, BIOSLinker *linker, const
AcpiFadtData *f,
}
/* SLEEP_CONTROL_REG */
- build_append_gas(tbl, AML_AS_SYSTEM_MEMORY, 0 , 0, 0, 0);
+ build_append_gas_from_struct(tbl, &f->sleep_ctl);
/* SLEEP_STATUS_REG */
- build_append_gas(tbl, AML_AS_SYSTEM_MEMORY, 0 , 0, 0, 0);
+ build_append_gas_from_struct(tbl, &f->sleep_sts);
/* TODO: extra fields need to be added to support revisions above rev5 */
assert(f->rev == 5);
--
2.18.4
- [PATCH v3 00/22] microvm: add acpi support, Gerd Hoffmann, 2020/05/20
- [PATCH v3 03/22] [testing] seabios: update config & build rules, Gerd Hoffmann, 2020/05/20
- [PATCH v3 02/22] [testing] seabios: update submodule to master snapshot, Gerd Hoffmann, 2020/05/20
- [PATCH v3 08/22] acpi: fadt: add hw-reduced sleep register support,
Gerd Hoffmann <=
- [PATCH v3 07/22] acpi: madt: skip pci override on pci-less systems., Gerd Hoffmann, 2020/05/20
- [PATCH v3 15/22] microvm: make virtio irq base runtime configurable, Gerd Hoffmann, 2020/05/20
[PATCH v3 06/22] acpi: create acpi-common.c and move madt code, Gerd Hoffmann, 2020/05/20
[PATCH v3 12/22] acpi: move acpi_dsdt_add_power_button() to ged, Gerd Hoffmann, 2020/05/20