summaryrefslogtreecommitdiff
path: root/src/sys/arch/amd64/os
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-12 15:50:10 -0400
committerIan Moffett <ian@osmora.org>2025-10-12 15:51:46 -0400
commit170d6bb02ef06bc878cbf3450432ea508e6a0510 (patch)
treef228677462b12e9cae2803371bf541994ca8d358 /src/sys/arch/amd64/os
parent5ad6058bf94f953462aab91ede6c15d4d5784d82 (diff)
kern/amd64: reboot: Add I8042_REBOOT option
Adds I8042_REBOOT config option for the AMD64 port as a workaround against certain hardware that doesn't support the i8042 reset Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/arch/amd64/os')
-rw-r--r--src/sys/arch/amd64/os/os_reboot.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/sys/arch/amd64/os/os_reboot.c b/src/sys/arch/amd64/os/os_reboot.c
index e414822..3ed82af 100644
--- a/src/sys/arch/amd64/os/os_reboot.c
+++ b/src/sys/arch/amd64/os/os_reboot.c
@@ -33,6 +33,12 @@
#include <os/reboot.h>
#include <machine/pio.h>
+#if defined(__I8042_REBOOT)
+#define I8042_REBOOT __I8042_REBOOT
+#else
+#define I8042_REBOOT 0
+#endif /* __I8042_REBOOT */
+
/*
* Actual reboot core
*/
@@ -42,11 +48,13 @@ __reboot(void)
void *dmmy_null = NULL;
/*
- * Try to be gentle and simply put the CPU into a
- * reboot cycle through the i8042 reset line, though
- * some chipsets may not like this.
+ * Use the i8042 to reboot the system if we can, this
+ * might be disabled in some L5 kernels.
*/
- outb(0x64, 0xFE);
+ if (I8042_REBOOT) {
+ outb(0x64, 0xFE);
+ }
+
/*
* If somehow nothing we've tried worked, be very