无意中看到一种通过控制92H端口bit0位,将其置1来实现重启的方法,刚才测试了一下,效果真好
mov al, 01
out 92h, al
另一种,模拟键盘的reset
mov al, 0xfe
out 0x64, al
注
i8042 :键盘控制器
8042的端口在cpu的io空间地址如下:
port----Read/Write-----Function
0x60----Read----------Read Input Buffer
0x60----Write---------Write Output Buffer
0x64----Read----------Read Status Register
0x64----Write---------Send Command
再者
status=ZwInitiatePowerAction(PowerActionShutdown,
PowerSystemShutdown,
0,
TRUE
);
再者
HalReturnToFirmware(HalRebootRoutine);
再者
KeBugCheck(POWER_FAILURE_SIMULATE);
实际上调用的是HalReturnToFirmware, 实现源码为
/* Check if this is power failure simulation */
if (BugCheckCode == POWER_FAILURE_SIMULATE)
{
/* Call the Callbacks and reboot */;
KiDoBugCheckCallbacks();
HalReturnToFirmware(HalRebootRoutine);
}