/* * Halt a cpu. */ void halt_cpu(void) { #ifdef MACH_HYP hyp_halt(); #else /* MACH_HYP */ asm volatile("cli"); while (TRUE) machine_idle (cpu_number ()); #endif /* MACH_HYP */ }
/* * Set system power */ void machine_setpower(int state) { irq_lock(); #ifdef DEBUG printf("The system is halted. You can turn off power."); #endif for (;;) machine_idle(); }
/* * Halt the system or reboot. */ void halt_all_cpus(boolean_t reboot) { if (reboot) { #ifdef MACH_HYP hyp_reboot(); #endif /* MACH_HYP */ kdreboot(); } else { rebootflag = TRUE; #ifdef MACH_HYP hyp_halt(); #endif /* MACH_HYP */ grub_acpi_halt(); printf("In tight loop: hit ctl-alt-del to reboot\n"); (void) spl0(); } while (TRUE) machine_idle (cpu_number ()); }