toaruos icon indicating copy to clipboard operation
toaruos copied to clipboard

x86_64: Use ud2 instruction as reboot method

Open vl-prokopenko opened this issue 3 months ago • 2 comments

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.

vl-prokopenko avatar Sep 21 '25 21:09 vl-prokopenko

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.

klange avatar Sep 24 '25 00:09 klange

I don't. I simply believe this is a cleaner and faster way to reboot.

vl-prokopenko avatar Sep 24 '25 09:09 vl-prokopenko