Reboot: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Line 7:
== ACPI reset command ==
ACPI 2.0+ defines a "reset register" that can be used to reset the PC. According to the ACPI specification, ''' ''all'' ''' hardware must be reset after using this mechanism.
In the FADT, there are several General Address Structures. Take a look at the [http://wiki.osdev.org/[FADT#GenericAddressStructure |FADT]] page for details. The FADT structure contains a generic address structure called ResetReg, followed by a byte called ResetValue. This is an optional feature and software must check support for it by checking if the FADT is version 2 or newer, and then testing if bit 10 of the Flags field in the FADT is set.
After that, software can reset the system by writing the value in ResetValue into the area pointed to by ResetReg. ACPI says the ResetReg can only be located in I/O bus, PCI bus or memory-mapped. If it is in the I/O bus, simply do:
<source lang="c">