hw/loongarch/virt: add system_powerdown hmp command support

For loongarch virt machine, add powerdown notification callback
and send ACPI_POWER_DOWN_STATUS event by acpi ged. Also add
acpi dsdt table for ACPI_POWER_BUTTON_DEVICE device in this
patch.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20230303010548.295580-1-gaosong@loongson.cn>
This commit is contained in:
Song Gao 2023-01-10 11:29:16 +08:00
parent c77432d0ef
commit 0d588c4f99
No known key found for this signature in database
GPG key ID: 40A2FFF239263EDF
3 changed files with 14 additions and 0 deletions

View file

@ -45,6 +45,7 @@ struct LoongArchMachineState {
/* State for other subsystems/APIs: */
FWCfgState *fw_cfg;
Notifier machine_done;
Notifier powerdown_notifier;
OnOffAuto acpi;
char *oem_id;
char *oem_table_id;