From efc583c13e3e671fcd5988752fd15d6ba54197ef Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Thu, 18 Feb 2021 16:35:03 +0800 Subject: [PATCH] acpi: AArch64: Enable PSCI in FADT This commit enables the PSCI (Power State Coordination Interface) for the AArch64 platform, which allows the VMM to manage the power status of the guest. Also, multiple vCPUs can be brought up using PSCI. Signed-off-by: Henry Wang --- vmm/src/acpi.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vmm/src/acpi.rs b/vmm/src/acpi.rs index d82b6929d..5d96c970e 100644 --- a/vmm/src/acpi.rs +++ b/vmm/src/acpi.rs @@ -145,6 +145,11 @@ fn create_facp_table(dsdt_offset: GuestAddress) -> Sdt { facp.write(256, GenericAddress::io_port_address::(0x3c0)); } + // aarch64 specific fields + #[cfg(target_arch = "aarch64")] + // ARM_BOOT_ARCH: enable PSCI with HVC enable-method + facp.write(129, 3u16); + // Architecture common fields // HW_REDUCED_ACPI, RESET_REG_SUP, TMR_VAL_EXT let fadt_flags: u32 = 1 << 20 | 1 << 10 | 1 << 8;