summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-10 13:46:33 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-28 16:22:33 +0100
commitfc56ed063e52cca89e42b56f472d40796df28471 (patch)
tree478475fd8d834dffcebfe1523763ad619889911a
parentf60877e9393b6e345b3490d947843f754843d001 (diff)
gdt: 64bit Variant
There is no segmentation in 64bit mode. * i386/i386/gdt.c (gdt_init): Do not load segments on 64bit.
-rw-r--r--i386/i386/gdt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index c895eb3a..bc36031b 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -94,6 +94,7 @@ gdt_init(void)
We must load ds and es with 0 before loading them with KERNEL_DS
because some processors will "optimize out" the loads
if the previous selector values happen to be the same. */
+#ifndef __x86_64__
asm volatile("ljmp %0,$1f\n"
"1:\n"
"movw %w2,%%ds\n"
@@ -105,6 +106,7 @@ gdt_init(void)
"movw %w1,%%es\n"
"movw %w1,%%ss\n"
: : "i" (KERNEL_CS), "r" (KERNEL_DS), "r" (0));
+#endif
#ifdef MACH_PV_PAGETABLES
#if VM_MIN_KERNEL_ADDRESS != LINEAR_MIN_KERNEL_ADDRESS
/* things now get shifted */