summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/ofw_machdep.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2003-12-09 14:45:39 +0000
committergallatin <gallatin@FreeBSD.org>2003-12-09 14:45:39 +0000
commitf7822af26903862bdd06c1515749a157115510b7 (patch)
treebdcd80b24c21cc78cfd767d6586c25076ed51ca5 /sys/powerpc/aim/ofw_machdep.c
parentd10b5c1ba50e744c47dd549f21fbfa5fde2e1d4d (diff)
downloadFreeBSD-src-f7822af26903862bdd06c1515749a157115510b7.zip
FreeBSD-src-f7822af26903862bdd06c1515749a157115510b7.tar.gz
Use the "shut-down" and "reset-all" Forth procedures to halt and
reboot, as calling OF_exit() just hangs a mac. FreeBSD on my G4 800Mhz mac behaves identically to OSX for halt and reboot now. Reviewed by: grehan (who also supplied the concept and sample code)
Diffstat (limited to 'sys/powerpc/aim/ofw_machdep.c')
-rw-r--r--sys/powerpc/aim/ofw_machdep.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/powerpc/aim/ofw_machdep.c b/sys/powerpc/aim/ofw_machdep.c
index b7027df..6216045 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;
OpenPOWER on IntegriCloud