public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: system time issue
Date: 9 Jan 2002 15:35:05 -0800	[thread overview]
Message-ID: <a1ik39$heg$1@cesium.transmeta.com> (raw)
In-Reply-To: <3C3CA078.52242C57@didntduck.org> <Pine.LNX.3.95.1020109145747.144A-100000@chaos.analogic.com>

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>

      reply	other threads:[~2002-01-09 23:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 18:53 system time issue Sipos Ferenc
2002-01-09 19:45 ` Richard B. Johnson
2002-01-09 19:56   ` Brian Gerst
2002-01-09 20:08     ` Richard B. Johnson
2002-01-09 23:35       ` H. Peter Anvin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='a1ik39$heg$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox