mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Mikael Petterson <mikpe@it.uu.se>,
	Eric Biederman <ebiederm@xmission.com>,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [GIT PULL] x86 setup: correct booting on 486 (revised)
Date: Mon, 5 Nov 2007 10:12:59 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.0.999.0711051006060.15101@woody.linux-foundation.org> (raw)
In-Reply-To: <472F5941.2060507@zytor.com>



On Mon, 5 Nov 2007, H. Peter Anvin wrote:
> 
> Well, we *could* do a 16-bit PM segment (and do two far jumps), but that seems
> rather silly.  We'd have to patch the GDT for the base in that case, anyway.

Yeah, there is no point in having two far jumps. One is enough.

The point being that since apparently the new boot standards say that the 
32-bit code is entered with segments etc set to specific values, then we 
shouldn't do the jump to that 32-bit standard with a far jump: we should 
do it as a regular jump, because we'd want to to set up the segments etc 
in 32-bit mode anyway.

> This is more or less the same code I had for the first version of the patch,
> modulo moving the short jump of course.  I do like making the 32-bit code a
> separate function, but it really should be "movl %ecx,..." in the 32-bit code.

At least my assembler does the right thing with just the plain "mov" for 
segments, but yes, there may be old assemblers that add a useless data 
size override. So "movl %ecx,%*s" is probably the right thing to do to 
make sure they don't do anything stupid..

Btw, on that same kind of thread: I think we should move the clearing of 
the registers into the 32-bit mode too, since that makes the instructions 
shorter (no operand size override), and makes more sense anyway (then we 
can also clean %edx/%ecx.

Final comment: shouldn't we set up %esp to be correct for the new %ss too?

			Linus

  reply	other threads:[~2007-11-05 18:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-05  2:16 H. Peter Anvin
2007-11-05  3:58 ` H. Peter Anvin
2007-11-05 17:15   ` Linus Torvalds
2007-11-05 17:56     ` H. Peter Anvin
2007-11-05 18:12       ` Linus Torvalds [this message]
2007-11-05 18:32         ` H. Peter Anvin
2007-11-05 18:36           ` Linus Torvalds
2007-11-05 20:21             ` Eric W. Biederman
2007-11-05 20:31               ` H. Peter Anvin
2007-11-05 20:51                 ` Jeremy Fitzhardinge
2007-11-05 21:06                   ` H. Peter Anvin
2007-11-06  0:59                     ` Jeremy Fitzhardinge
2007-11-06  1:11                       ` H. Peter Anvin
2007-11-06  1:18                         ` Jeremy Fitzhardinge
2007-11-06  1:31                           ` H. Peter Anvin
2007-11-06 16:17                             ` Jeremy Fitzhardinge
2007-11-06 16:27                               ` H. Peter Anvin
2007-11-06 16:55                                 ` Jeremy Fitzhardinge
2007-11-06 17:00                                   ` H. Peter Anvin
2007-11-06 17:09                                     ` Eric W. Biederman
2007-11-06 17:57                                       ` H. Peter Anvin
2007-11-06 18:27                                         ` Eric W. Biederman
2007-11-06 18:41                                           ` H. Peter Anvin
2007-11-06 17:04                                 ` Eric W. Biederman
2007-11-05 21:14                 ` Eric W. Biederman
2007-11-05 21:28                   ` H. Peter Anvin
2007-11-05 21:58                     ` Eric W. Biederman

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=alpine.LFD.0.999.0711051006060.15101@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --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

all inboxes | Powered by JetHome®