Force Restart N Methods

Source: Internet
Author: User

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

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.