diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index bf19fc8ebd..1668f9b0a8 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -228,6 +228,8 @@ Bootstrap::Platform::Board::Board() info.acpi_fadt = addr_t(table); Hw::Acpi_fadt fadt(table); + fadt.takeover_acpi(); + Hw::Acpi_facs facs(fadt.facs()); facs.wakeup_vector(AP_BOOT_CODE_PAGE); diff --git a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h index bda6053968..0f853ec962 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h @@ -91,6 +91,9 @@ struct Hw::Acpi_fadt : Genode::Mmio<276> struct Fw_ctrl : Register < 0x24, 32> { }; struct Fw_ctrl_ext : Register { }; + struct Smi_cmd : Register<0x30, 32> { }; + struct Acpi_enable : Register<0x34, 8> { }; + struct Pm1a_cnt_blk : Register < 64, 32> { struct Slp_typ : Bitfield < 10, 3> { }; struct Slp_ena : Bitfield < 13, 1> { }; @@ -176,6 +179,15 @@ struct Hw::Acpi_fadt : Genode::Mmio<276> Acpi_fadt(Acpi_generic const * a) : Mmio({(char *)a, Mmio::SIZE}) { } + void takeover_acpi() + { + if (!read() || !read()) + return; + + asm volatile ("out %0, %w1" :: "a" (read()), + "Nd" (read())); + } + addr_t facs() const { addr_t facs { };