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.
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++)