diff options
Diffstat (limited to 'src/sys')
-rw-r--r-- | src/sys/arch/amd64/conf/GENERIC | 5 | ||||
-rw-r--r-- | src/sys/arch/amd64/os/os_reboot.c | 16 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/sys/arch/amd64/conf/GENERIC b/src/sys/arch/amd64/conf/GENERIC index cc5fe35..93919d8 100644 --- a/src/sys/arch/amd64/conf/GENERIC +++ b/src/sys/arch/amd64/conf/GENERIC @@ -1 +1,4 @@ -// GENERIC AMD64 +// Controls if an i8042 reboot would be attempted +// as a method. Some firmware (e.g., on some laptops) +// may not handle these well and hang. +option I8042_REBOOT yes 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 |