Skip to content

CPU reset methods

Marco Bortolin edited this page Apr 13, 2019 · 1 revision
  1. LIDT method:
    a) disable NMI (write 0x8D to port 0x70, read port 0x71)
    b) disable interrupts (CLI)
    c) LIDT a null'd idt (write all 0's to idt and reload with LIDT)
    d) enable interrupts (STI)
    e) call an interrupt (not INTO)

  2. IBM 8042 keyboard controller:
    a) disable NMI
    b) disable interrupts (a and b are required to maintain a valid keyboard controller state since BIOS doesn't reset keyboard controller logic)
    c) wait for keyboard controller ready (read port 0x64, wait for bit 1 to clear)
    d) write 0xFE to port 0x64

  3. IBM PS/2 fast reset:
    a) disable NMI
    b) disable interrupts
    c) write 0x01 to port 0x92 (0x03 fails on some machines)

  4. Intel PCI chipset reset:
    a) disable NMI
    b) disable interrupts
    c) write 0x02 to port 0xcf9
    d) write 0x06 to port 0xcf9

  5. call BIOS:
    a) switch CPU to Real Mode
    b) far call to F000:FFF0h
    c) this may require setting values at 0472h and/or CMOS 0Fh.

  6. Int 0x19:
    a) switch CPU to Real Mode
    b) INT 0x19 (this interrupt is supposed to restart the BIOS bootstrap loader, but it usually doesn't work because it has been revectored by the OS or other "mystery" reasons.)

  7. Int 0x18:
    a) switch CPU to Real Mode
    b) INT 0x18 (some BIOS' will reset the computer via a call to this interrupt.)

Source: https://groups.google.com/d/msg/alt.os.development/raY7nOqF2bA/LB6-wDVm_y8J

Clone this wiki locally