diff options
author | Ian Moffett <ian@osmora.org> | 2024-05-19 22:37:00 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-05-19 22:37:00 -0400 |
commit | 9cff7866d58bfd48cad3f32882b957499c06a649 (patch) | |
tree | d1360ef0d12717c319791c219a24186a3a040e0c /sys/arch | |
parent | d13ff179e6c1fc418891e6f55943313f1cf2bdc8 (diff) |
kernel: Add reboot() and reboot syscall
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 9 |
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 */ |