Force Restart N Methods
2015-12-24 17:19 146 people read Comments (0) favorite reports This article has been included in: Classification:Drive Development Learning
(458) Author of similar articles
X
1.
Inadvertently saw a control 92H port bit0 bit, put it to implement a restart method, just tested, the effect is really good
mov al, 01
Out 92H, AL
2.
Another, the reset of the analog keyboard
mov al, 0xFE
Out 0x64, AL
Note
i8042: Keyboard Controller
8042 of the ports in the CPU's IO space address are as follows:
Port----Read/write-----Function
0x60----Read----------read Input Buffer
0x60----Write---------write Output Buffer
0x64----Read----------read Status Register
0x64----Write---------Send Command
Furthermore
3.
Status=zwinitiatepoweraction (Poweractionshutdown,
Powersystemshutdown,
0,
TRUE
);
Furthermore
4.
Halreturntofirmware (Halrebootroutine);
The driver directly uses the Halreturntofirmware function exported by the Hal.dll to implement shutdown, which is the last API that the system calls at normal shutdown, and the most effective API, which calls the Bois routine directly, and then the system shuts down.
Furthermore
5.
Kebugcheck (power_failure_simulate);
Maybe you'll think it's bugcheck, then you're wrong, and it's not going to trigger bugcheck.
This will actually call the Halreturntofirmware (halrebootmachine)
When the bugcheck callback is executed, no BSOD, no crash dump, only very clean, simple and direct restart
Realize the source code for
/* Check If this is power failure simulation */
if (Bugcheckcode = = power_failure_simulate)
{
/* Call the Callbacks and reboot */;
Kidobugcheckcallbacks ();
Halreturntofirmware (Halrebootroutine);
}
Force Restart N Methods