diff options
| author | Andrew Gallatin <gallatin@FreeBSD.org> | 2003-12-09 14:45:39 +0000 |
|---|---|---|
| committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2003-12-09 14:45:39 +0000 |
| commit | eaa53cc8fcc94d98e00073793953c03dc294434b (patch) | |
| tree | bdcd80b24c21cc78cfd767d6586c25076ed51ca5 /sys | |
| parent | 67e945bab95d04b3cda8368a909e4b11771c86d8 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/powerpc/aim/machdep.c | 3 | ||||
| -rw-r--r-- | sys/powerpc/aim/ofw_machdep.c | 18 | ||||
| -rw-r--r-- | sys/powerpc/include/powerpc.h | 2 | ||||
| -rw-r--r-- | sys/powerpc/powerpc/machdep.c | 3 | ||||
| -rw-r--r-- | sys/powerpc/powerpc/ofw_machdep.c | 18 |
5 files changed, 42 insertions, 2 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 5dbb5ee170435..e009b181e43b6 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 b7027df27ad7f..6216045455d52 100644 --- a/sys/powerpc/aim/ofw_machdep.c +++ b/sys/powerpc/aim/ofw_machdep.c @@ -174,6 +174,24 @@ ppc_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) { phandle_t node; diff --git a/sys/powerpc/include/powerpc.h b/sys/powerpc/include/powerpc.h index aa27c6f1ffd1e..1f7992c9e107b 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 5dbb5ee170435..e009b181e43b6 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 b7027df27ad7f..6216045455d52 100644 --- a/sys/powerpc/powerpc/ofw_machdep.c +++ b/sys/powerpc/powerpc/ofw_machdep.c @@ -174,6 +174,24 @@ ppc_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) { phandle_t node; |
