Re: software reset

H. Peter Anvin
2003-04-30T23:09:06Z

Followup to: <p73vfwx2uw8.fsf@oldwotan.suse.de>
By author: Andi Kleen <ak@suse.de>
In newsgroup: linux.dev.kernel
>
> joe briggs <jbriggs@briggsmedia.com> writes:
>
> > Can anyone tell me how to absolutely force a reset on a i386? Specifically,
> > is there a system call that will call the assembly instruction to assert the
> > RESET bus line? I try to use the "reboot(LINUX_REBOOT_CMD_RESTART,0,0,NULL)"
> > call, but it will not always work. Occassionally, I experience a "missed
> > interrupt" on a Promise IDE controller, and while I can telnet into the
> > system, I can't reset it. Any help greatly appreciated! Since these systems
> > are 1000's of miles away, the need to remotely reset it paramont.
>
> The most reliable way is to force a triple fault; load zero into
> the IDT register and then trigger an exception. The linux kernel
> does that in fact for reboot and so far I haven't seen any machine failing
> to reset yet.
>

Except that isn't actually a reset -- it's an INIT, which isn't quite
the same thing; for one thing, the hardware isn't forcibly reset.

On *MOST*, but definitely not ALL, chipsets you can force a "true"
reset by writing 0x06 to I/O port 0x0CF9.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64