X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fdevices%2Fshutdown.c;h=61c76f7b060d2746ae6fa1763feede4f895db200;hp=42b67df57bc533b1681d1afb964dc1634e3b0930;hb=f5fa837e313d018a945eaedd28352e7f24e5b1a6;hpb=94618414d6e0e051cf95e900c63ed2835ed16a82 diff --git a/src/devices/shutdown.c b/src/devices/shutdown.c index 42b67df..61c76f7 100644 --- a/src/devices/shutdown.c +++ b/src/devices/shutdown.c @@ -10,7 +10,7 @@ #include "userprog/exception.h" #endif #ifdef FILESYS -#include "devices/disk.h" +#include "devices/block.h" #include "filesys/filesys.h" #endif @@ -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++) @@ -121,7 +124,7 @@ print_stats (void) timer_print_stats (); thread_print_stats (); #ifdef FILESYS - disk_print_stats (); + block_print_stats (); #endif console_print_stats (); kbd_print_stats ();