toaruos
toaruos copied to clipboard
x86_64: Use ud2 instruction as reboot method
This is more reliable on modern hardware than a keyboard reset. Using the ud2 instruction without an IDT is almost guaranteed to cause a triple fault and a "keyboard reset" is not, and is also way simpler. The keyboard reset and return methods are included as fallback, even though they're unlikely to be used.
Are you actually experiencing a failure to reboot that this resolves?
Since we're already loading an empty IDT, plenty of other things are effectively guaranteed to happen, such as the local timer interrupt.
I don't. I simply believe this is a cleaner and faster way to reboot.