zoukankan      html  css  js  c++  java
  • [转]强制重启N种法

    无意中看到一种通过控制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);
        }

  • 相关阅读:
    sklearn库学习笔记1——preprocessing库
    juypter notetbook
    信用卡欺诈
    matplotlib1
    python一行输入多个数
    pandas数据预处理
    pandas基础用法
    numpy简单用法2
    numpy 简单用法
    简单循环
  • 原文地址:https://www.cnblogs.com/adylee/p/2548842.html
Copyright © 2011-2022 走看看