aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-19 22:37:00 -0400
committerIan Moffett <ian@osmora.org>2024-05-19 22:37:00 -0400
commit9cff7866d58bfd48cad3f32882b957499c06a649 (patch)
treed1360ef0d12717c319791c219a24186a3a040e0c /sys/arch/amd64/amd64
parentd13ff179e6c1fc418891e6f55943313f1cf2bdc8 (diff)
kernel: Add reboot() and reboot syscall
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index 6a24232..34bea11 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -331,6 +331,15 @@ processor_switch_to(struct proc *old_td, struct proc *new_td)
}
void
+cpu_reset(void)
+{
+ for (;;) {
+ /* Pulse the reset line */
+ outb(0x64, 0xFE);
+ }
+}
+
+void
processor_init(void)
{
/* Indicates what doesn't need to be init anymore */