public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BOOT_CS
@ 2004-02-21  5:47 H. Peter Anvin
  2004-02-21 12:43 ` BOOT_CS Coywolf Qi Hunt
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: H. Peter Anvin @ 2004-02-21  5:47 UTC (permalink / raw)
  To: linux-kernel

Anyone happen to know of any legitimate reason not to reload %cs in
head.S?  I think the following would be a lot cleaner, as well as a
lot safer (the jump and indirect branch aren't guaranteed to have the
proper effects, although technically neither should be required due to
the %cr0 write):

@@ -117,10 +147,7 @@
        movl %cr0,%eax
        orl $0x80000000,%eax
        movl %eax,%cr0          /* ..and set paging (PG) bit */
-       jmp 1f                  /* flush the prefetch-queue */
-1:
-       movl $1f,%eax
-       jmp *%eax               /* make sure eip is relocated */
+       ljmp $__BOOT_CS,$1f     /* Clear prefetch and normalize %eip
*/
 1:
        /* Set up the stack pointer */
        lss stack_start,%esp


I've been doing some cleanups in head.S after making the early page
tables dynamic.

	-hpa

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2004-02-24 11:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-21  5:47 BOOT_CS H. Peter Anvin
2004-02-21 12:43 ` BOOT_CS Coywolf Qi Hunt
2004-02-21 16:32   ` BOOT_CS Jamie Lokier
2004-02-23  4:43     ` [PATCH] BOOT_CS Coywolf Qi Hunt
2004-02-23 14:30       ` Jamie Lokier
2004-02-23 15:24         ` Rene Herman
2004-02-24  3:11         ` [PATCH] Remove the extra jmp Coywolf Qi Hunt
2004-02-24  3:30           ` Brian Gerst
2004-02-24 10:10             ` Coywolf Qi Hunt
2004-02-22 15:13 ` BOOT_CS Eric W. Biederman
2004-02-22 19:47   ` BOOT_CS H. Peter Anvin
2004-02-22 22:05     ` BOOT_CS Eric W. Biederman
2004-02-23 10:27 ` Does Flushing the Queue after PG REALLY a Necessity? Coywolf Qi Hunt
2004-02-23 15:18   ` Philippe Elie
2004-02-24  2:36     ` Coywolf Qi Hunt
2004-02-24  3:10       ` H. Peter Anvin
2004-02-24  4:55       ` Randy.Dunlap
2004-02-24  9:17         ` Coywolf Qi Hunt
2004-02-24 11:21           ` Herbert Poetzl
2004-02-24 11:33             ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox