public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de
Subject: Re: [PATCH] fix i486 boot failure due to stale %ds
Date: Sun, 04 Nov 2007 14:20:47 -0800	[thread overview]
Message-ID: <472E45BF.3070003@zytor.com> (raw)
In-Reply-To: <200711042158.lA4Lwv9S014628@harpo.it.uu.se>

Mikael Pettersson wrote:
> 
> Maybe not. I had a look in Intel's SDM Vol3, and the
> section "switching to protected mode" specifies that
> a move to %cr0 that sets PE should immediately be
> followed by a far jmp or call. They write that "random
> failures can occur if other instructions exist between
> [the move to %cr0] and [the far jmp/call]". The current
> version of pmjump.S does exactly that: it executes
> a bunch of moves to segment registers in that window.
> 
> (Section 9.9.1 in the Sept. 2005 revision I have in
> front of me.)
> 
> Similarly, section "serializing instructions" writes
> that a move to %cr0 that enables or disables paging
> should be followed by a jump. They write that this isn't
> required in P4 or P6 family processors, but is required
> for compatibility with other ia32 processors. Reading
> between the lines, they imply that older ia32 processors
> don't treat %cr0 writes as completely serializing.
> 
> (Section 7.4 in the Sept. 2005 revision.)
> 

The problem is that Intel has a tendency to exaggerate in their 
documentation; in particular, they tend not to remove restrictions that 
are long-since obsolete.  However, it sounds like you have actually 
found a CPU for which this restriction is motivated.

	-hpa

  reply	other threads:[~2007-11-04 22:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-04 21:58 [PATCH] fix i486 boot failure due to stale %ds Mikael Pettersson
2007-11-04 22:20 ` H. Peter Anvin [this message]
2007-11-04 23:05 ` Andi Kleen
2007-11-04 23:07 ` Jeremy Fitzhardinge
2007-11-04 23:12   ` H. Peter Anvin
2007-11-04 23:50   ` H. Peter Anvin
2007-11-05  0:15     ` Linus Torvalds
2007-11-05  0:23       ` Linus Torvalds
2007-11-04 23:51   ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2007-11-05  1:18 Mikael Pettersson
2007-11-04 19:38 Mikael Pettersson
2007-11-04 19:41 ` H. Peter Anvin
2007-11-04 16:44 Mikael Pettersson
2007-11-04 18:29 ` H. Peter Anvin
2007-11-04 19:00   ` H. Peter Anvin

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=472E45BF.3070003@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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