AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
reboot.c
Go to the documentation of this file.
1
4
5#include <core/system.h>
6#include <core/arch.h>
7#include <platform/misc.h>
8#include <dev/i8042.h>
9
13{
14#ifdef CONFIG_DEV_I8042
16#endif
17}
18
19/* Restarts the machine. */
20void arch_reboot(void)
21{
23}
24
25/* Stops the CPU, with interrupts off, for good. */
26void arch_halt(void)
27{
28 for (;;) {
30 asm volatile ("hlt");
31 }
32}
33
34/* Powers the machine off with ACPI; without ACPI, it stays halted. */
35void arch_poweroff(void)
36{
39
40 arch_halt();
41}
static void arch_interrupts_disable(void)
Masks IRQs.
Definition arch.h:77
void platform_reboot(void)
Restarts the machine, through the keyboard controller, which can reset the CPU.
Definition reboot.c:12
void i8042_reboot(void)
Resets the CPU, through the controller's output line: this reboots the PC.
Definition i8042.c:123
void x86_acpi_poweroff(void)
Powers the machine off, by entering ACPI's S5 sleep state.
Definition acpi.c:265
void arch_reboot(void)
Restarts the machine.
Definition psci.c:25
void arch_halt(void)
Stops the CPU for good, with interrupts off.
Definition psci.c:38
void arch_poweroff(void)
Powers the machine off, or halts it if it can't be powered off.
Definition psci.c:31