diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 5dbb5ee17043..e009b181e43b 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -162,8 +162,9 @@ static void powerpc_ofw_shutdown(void *junk, int howto) { if (howto & RB_HALT) { - OF_exit(); + OF_halt(); } + OF_reboot(); } static void diff --git a/sys/powerpc/aim/ofw_machdep.c b/sys/powerpc/aim/ofw_machdep.c index b7027df27ad7..6216045455d5 100644 --- a/sys/powerpc/aim/ofw_machdep.c +++ b/sys/powerpc/aim/ofw_machdep.c @@ -173,6 +173,24 @@ ppc_boot(str) OF_boot(str); } +void +OF_halt() +{ + int retval; /* dummy, this may not be needed */ + + OF_interpret("shut-down", 1, &retval); + for (;;); /* just in case */ +} + +void +OF_reboot() +{ + int retval; /* dummy, this may not be needed */ + + OF_interpret("reset-all", 1, &retval); + for (;;); /* just in case */ +} + void OF_getetheraddr(device_t dev, u_char *addr) { diff --git a/sys/powerpc/include/powerpc.h b/sys/powerpc/include/powerpc.h index aa27c6f1ffd1..1f7992c9e107 100644 --- a/sys/powerpc/include/powerpc.h +++ b/sys/powerpc/include/powerpc.h @@ -48,6 +48,8 @@ void mem_regions(struct mem_region **, int *, struct mem_region **, int *); * Not sure whether boot itself should be implementation dependent instead. XXX */ void ppc_exit(void); +void OF_halt(void); +void OF_reboot(void); void ppc_boot(char *bootspec); int dk_match(char *name); diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 5dbb5ee17043..e009b181e43b 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -162,8 +162,9 @@ static void powerpc_ofw_shutdown(void *junk, int howto) { if (howto & RB_HALT) { - OF_exit(); + OF_halt(); } + OF_reboot(); } static void diff --git a/sys/powerpc/powerpc/ofw_machdep.c b/sys/powerpc/powerpc/ofw_machdep.c index b7027df27ad7..6216045455d5 100644 --- a/sys/powerpc/powerpc/ofw_machdep.c +++ b/sys/powerpc/powerpc/ofw_machdep.c @@ -173,6 +173,24 @@ ppc_boot(str) OF_boot(str); } +void +OF_halt() +{ + int retval; /* dummy, this may not be needed */ + + OF_interpret("shut-down", 1, &retval); + for (;;); /* just in case */ +} + +void +OF_reboot() +{ + int retval; /* dummy, this may not be needed */ + + OF_interpret("reset-all", 1, &retval); + for (;;); /* just in case */ +} + void OF_getetheraddr(device_t dev, u_char *addr) {