APM shutdown has been covered at X86 instructions to power off computer in real mode?
How to reboot instead of shutting down the computer? Please quote and explain the relevant documentation / standard in your answer.
I've understood that APM and ACPI are the two main methods, and I'm interested in both. Let me know if there are others.
I have found the ACPI spec is at http://uefi.org/specifications but it's taking too much brainpower to parse it that I found it worthy of a question.
I could not find the URL for the APM spec, only a Google cache of a Microsoft RTF here.
If you need a way to test your answer, this minimal APM shutdown boot sector example may be a good starting point. The goal is to convert it to a reboot example instead.
I have read the Linux kernel 4.2 code at arch/x86/realmode/rm/reboot.S but I don't understand how it works, since I can't find the difference between those commands and my working shutdown example.
Related more generic on superuser: https://superuser.com/questions/294681/how-does-a-computer-restart-itself
Related question for protected mode: Rebooting in Protected Mode
ljmpw $0xFFFF, $0x0000
. Working minimal example. Linux kernel is doingljmpw $0xf000, $0xfff0
on the linked file, which also works. But why does it work? Where is it documented? – Kono