Re: system time issue

H. Peter Anvin (hpa@zytor.com)
9 Jan 2002 15:35:05 -0800


Followup to: <Pine.LNX.3.95.1020109145747.144A-100000@chaos.analogic.com>
By author: "Richard B. Johnson" <root@chaos.analogic.com>
In newsgroup: linux.dev.kernel
>
> Kernel version 2.4.1 through 17 (last I checked 17) used a bunch of
> ways including the keyboard controller, the aux control port, then
> finaly a transition to 16-bit address space with direct execution
> of the reset vector. I found that the only reason the transition
> to 16-bits "worked" was because of coding errors which caused the
> processor reset.
>

That is only invoked *IF REQUESTED BY USERSPACE*.

This is the real termination:

if(!reboot_thru_bios) {
/* rebooting needs to touch the page at absolute addr
0 */
*((unsigned short *)__va(0x472)) = reboot_mode;
for (;;) {
int i;
for (i=0; i<100; i++) {
kb_wait();
udelay(50);
outb(0xfe,0x64); /* pulse reset low */
udelay(50);
}
/* That didn't work - force a triple fault.. */
__asm__ __volatile__("lidt %0": :"m" (no_idt));
__asm__ __volatile__("int3");
}
}

Zero the IDT and force an interrupt -> triple fault.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/