Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reboot the system

318 views
Skip to first unread message

danil...@gmail.com

unread,
Mar 22, 2007, 4:46:39 PM3/22/07
to
How to make the system reboot?
Does the system has an I/O port for rebooting?

Matt

unread,
Mar 22, 2007, 5:02:07 PM3/22/07
to
danil...@gmail.com wrote:
> How to make the system reboot?
> Does the system has an I/O port for rebooting?
>

Easiest way is to cause a triple fault!

Matt

Rod Pemberton

unread,
Mar 22, 2007, 7:36:29 PM3/22/07
to

<danil...@gmail.com> wrote in message
news:1174596399.7...@n59g2000hsh.googlegroups.com...

> How to make the system reboot?
> Does the system has an I/O port for rebooting?
>

I'm pretty sure I posted these before... Anyway, these are the methods I
know of. They all require either 1) port access privilege or 2) Ring 0
privilege. If someone knows of others, please post.

1) Intel lidt method:
a) disable NMI, (write 0x8D to port 0x70 (privileged), read port 0x71
(privileged) using 'in' and 'out' instructions)
b) disable interrupts ('cli' instruction)
c) lidt a null'd idt (write all 0's to idt and reload with 'lidt'
instruction, Ring 0 privilege)
d) enable interrupts ('sti' instruction)
e) call an interrupt (not using 'into' instruction, 64-bit obsolete)

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 (privileged)
(This method won't work for boards without a keyboard controller.)

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

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

5) call BIOS
a) switch cpu to RM (Ring 0 privilege)
b) far call to FFFF:0000h.
c) This may require setting values at 0472h and/or CMOS 0Fh.

6) Int 0x19
a) switch cpu to RM (Ring 0 privilege)
b) 'int 0x19' instruction
(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 RM (Ring 0 privilege)
b) 'int 0x18' instruction
(Some BIOS' will reset the computer via a call to this interrupt.)

Rod Pemberton


danil...@gmail.com

unread,
Mar 23, 2007, 5:44:24 PM3/23/07
to
On Mar 22, 9:36 pm, "Rod Pemberton" <do_not_h...@bitfoad.cmm> wrote:
> <danilod...@gmail.com> wrote in message

Thank you!

Maxim S. Shatskih

unread,
Mar 25, 2007, 11:15:01 PM3/25/07
to
Reverse-engineer the Windows HAL's HalReturnToFirmware routine.

I think that on modern machines, this is done by executing the bytecode of
some ACPI method.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma...@storagecraft.com
http://www.storagecraft.com

<danil...@gmail.com> wrote in message
news:1174596399.7...@n59g2000hsh.googlegroups.com...

0 new messages