mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-05 17:01:47 +00:00
parent
68de550090
commit
d9420c618c
@ -228,6 +228,8 @@ Bootstrap::Platform::Board::Board()
|
|||||||
info.acpi_fadt = addr_t(table);
|
info.acpi_fadt = addr_t(table);
|
||||||
|
|
||||||
Hw::Acpi_fadt fadt(table);
|
Hw::Acpi_fadt fadt(table);
|
||||||
|
fadt.takeover_acpi();
|
||||||
|
|
||||||
Hw::Acpi_facs facs(fadt.facs());
|
Hw::Acpi_facs facs(fadt.facs());
|
||||||
facs.wakeup_vector(AP_BOOT_CODE_PAGE);
|
facs.wakeup_vector(AP_BOOT_CODE_PAGE);
|
||||||
|
|
||||||
|
@ -91,6 +91,9 @@ struct Hw::Acpi_fadt : Genode::Mmio<276>
|
|||||||
struct Fw_ctrl : Register < 0x24, 32> { };
|
struct Fw_ctrl : Register < 0x24, 32> { };
|
||||||
struct Fw_ctrl_ext : Register <FW_OFFSET_EXT, 64> { };
|
struct Fw_ctrl_ext : Register <FW_OFFSET_EXT, 64> { };
|
||||||
|
|
||||||
|
struct Smi_cmd : Register<0x30, 32> { };
|
||||||
|
struct Acpi_enable : Register<0x34, 8> { };
|
||||||
|
|
||||||
struct Pm1a_cnt_blk : Register < 64, 32> {
|
struct Pm1a_cnt_blk : Register < 64, 32> {
|
||||||
struct Slp_typ : Bitfield < 10, 3> { };
|
struct Slp_typ : Bitfield < 10, 3> { };
|
||||||
struct Slp_ena : Bitfield < 13, 1> { };
|
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}) { }
|
Acpi_fadt(Acpi_generic const * a) : Mmio({(char *)a, Mmio::SIZE}) { }
|
||||||
|
|
||||||
|
void takeover_acpi()
|
||||||
|
{
|
||||||
|
if (!read<Acpi_enable>() || !read<Smi_cmd>())
|
||||||
|
return;
|
||||||
|
|
||||||
|
asm volatile ("out %0, %w1" :: "a" (read<Acpi_enable>()),
|
||||||
|
"Nd" (read<Smi_cmd>()));
|
||||||
|
}
|
||||||
|
|
||||||
addr_t facs() const
|
addr_t facs() const
|
||||||
{
|
{
|
||||||
addr_t facs { };
|
addr_t facs { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user