Damien Zammit
2018-11-24 23:48:39 UTC
Hi all,
I have written a new RPC that is called from startup for shutting down
the pc. It has been tested on QEMU and successfully powers off the
machine causing the qemu window to disappear without manually closing it
when you type "halt" as root and it goes through the proper shutdown
sequence first.
In summary, the startup translator does its shutdown sequence, then
calls the shutdown translator which calls into the ACPI translator to
fetch the ACPI registers for shutdown and values to write, then writes
the correct shutdown sequence to the IO.
The reason for all the indirection is that the acpi tables can be reused
for other purposes than just shutdown, and it makes sense to put the
shutdown sequence as a separate RPC so that other machine specific
shutdown sequences can be added later, not just for x86.
Please see attached 3 patches for a complete working implementation.
Thanks,
Damien
I have written a new RPC that is called from startup for shutting down
the pc. It has been tested on QEMU and successfully powers off the
machine causing the qemu window to disappear without manually closing it
when you type "halt" as root and it goes through the proper shutdown
sequence first.
In summary, the startup translator does its shutdown sequence, then
calls the shutdown translator which calls into the ACPI translator to
fetch the ACPI registers for shutdown and values to write, then writes
the correct shutdown sequence to the IO.
The reason for all the indirection is that the acpi tables can be reused
for other purposes than just shutdown, and it makes sense to put the
shutdown sequence as a separate RPC so that other machine specific
shutdown sequences can be added later, not just for x86.
Please see attached 3 patches for a complete working implementation.
Thanks,
Damien