Commit f5fa837e authored by Pablo de Oliveira's avatar Pablo de Oliveira Committed by Ben Pfaff
Browse files

Add ACPI shutdown sequence

On QEMU emulator version 1.7.0, the previous shutdown sequence (writing
`shutdown` to 0x8900), is not working properly.

This patch adds support for the ACPI shutdown code which works on qemu
1.7.0 and preserves the old sequence for compatibility.
parent 231e61ee
......@@ -99,6 +99,9 @@ shutdown_power_off (void)
printf ("Powering off...\n");
serial_flush ();
/* ACPI power-off */
outw (0xB004, 0x2000);
/* This is a special power-off sequence supported by Bochs and
QEMU, but not by physical hardware. */
for (p = s; *p != '\0'; p++)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment