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)
This commit is contained in:
parent
d10b5c1ba5
commit
f7822af269
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user