Example #1
0
kern_return_t
host_reboot(
	host_priv_t		host_priv,
	int				options)
{
	if (host_priv == HOST_PRIV_NULL)
		return (KERN_INVALID_HOST);

	assert(host_priv == &realhost);

#if DEVELOPMENT || DEBUG
	if (options & HOST_REBOOT_DEBUGGER) {
		Debugger("Debugger");
		return (KERN_SUCCESS);
	}
#endif

    if (options & HOST_REBOOT_UPSDELAY) {
        // UPS power cutoff path
        PEHaltRestart( kPEUPSDelayHaltCPU );
    } else {
       halt_all_cpus(!(options & HOST_REBOOT_HALT));
    }

	return (KERN_SUCCESS);
}
Example #2
0
void
kdp_machine_reboot(void)
{
	printf("Attempting system restart...");
	/* Call the platform specific restart*/
	if (PE_halt_restart) 
		(*PE_halt_restart)(kPERestartCPU);
	/* If we do reach this, give up */
	halt_all_cpus(TRUE);
}
Example #3
0
kern_return_t
host_reboot(
	host_t	host,
	int	options)
{
	if (host == HOST_NULL)
		return (KERN_INVALID_HOST);

	if (options & HOST_REBOOT_DEBUGGER) {
		Debugger("Debugger");
	} else {
		halt_all_cpus(!(options & HOST_REBOOT_HALT));
	}
	return (KERN_SUCCESS);
}
Example #4
0
/*
 * system reboot
 */
void db_reboot(
	db_expr_t	addr,
	boolean_t	have_addr,
	db_expr_t	count,
	char		*modif)
{
	boolean_t	reboot = TRUE;
	char		*cp, c;
	
	cp = modif;
	while ((c = *cp++) != 0) {
		if (c == 'r')	/* reboot */
			reboot = TRUE;
		if (c == 'h')	/* halt */
			reboot = FALSE;
	}
	halt_all_cpus(reboot);
}
Example #5
0
void db_reset_cpu(void)
{
	halt_all_cpus(1);
}
Example #6
0
void db_halt_cpu(void)
{
	halt_all_cpus(0);
}
Example #7
0
void exit(int rc)
{
	halt_all_cpus(0);
}