[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0711051006060.15101@woody.linux-foundation.org>
Date: Mon, 5 Nov 2007 10:12:59 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: "H. Peter Anvin" <hpa@...or.com>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Mikael Petterson <mikpe@...uu.se>,
Eric Biederman <ebiederm@...ssion.com>,
Jeremy Fitzhardinge <jeremy@...p.org>
Subject: Re: [GIT PULL] x86 setup: correct booting on 486 (revised)
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists