4 ms·
Except the 'reboot' command? I'm always curious how it works.
by marmaduke 7y ago
Except the 'reboot' command? I'm always curious how it works.
- deleted 7y ago[deleted]
- monocasa 7y agoNormally you'd ask the chipset so that it can reset all the peripherals at the same time. On Intel you can also intentionally "triple fault" the CPU and that'll cause it to reset. The way that works is you tell the CPU that it doesn't have interrupt handlers anymore, then cause a software interrupt. Then the CPU will first try to call your interrupt handler (but that'll fail because you told it there are no handlers), then errors during an interrupt cause a "double fault" interrupt that's supposed to handle those errors (but once again, there's no handlers), so now you're in a "triple fault" condition and the only way to recover is to reset, so that's what the CPU does.