Halt/restart support for MIPS
PATCH 1/1 Halt/restart support for MIPS
Hello All,
This adds halt/restart support via a magic page. There is no real standard way to do this for MIPS systems, a patch for the MIPS Qemu kernels to add this support was also proposed.
Thiemo
target-mips/helper.c +13 -0
@@ -103,6 +103,19 @@ *prot =PAGE_READ |PAGE_WRITE ; }else if (address <0xC0000000UL ) {/* kseg1 */ +#ifndef CONFIG_USER_ONLY +/* Check magic system control page. */ +switch (address) { +case 0xBFBF0000 :/* restart */ +qemu_system_reset_request (); +break ; +case 0xBFBF0004 :/* halt */ +qemu_system_shutdown_request (); +break ; +default : +break ; + } +#endif /* XXX: check supervisor mode */ *physical = address -0xA0000000UL ; *prot =PAGE_READ |PAGE_WRITE ;