summaryrefslogtreecommitdiff
path: root/src/arch/x86/assembly_entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/assembly_entry.S')
-rw-r--r--src/arch/x86/assembly_entry.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 0d8307bb1f..31670c29b6 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -15,12 +15,22 @@
#define _STACK_TOP _ecar_stack
#endif
+#ifdef __x86_64__
+.code64
+#else
+.code32
+#endif
+
.section ".text._start", "ax", @progbits
.global _start
_start:
/* Migrate GDT to this text segment */
+#ifdef __x86_64__
+ call gdt_init64
+#else
call gdt_init
+#endif
/* reset stack pointer to CAR/EARLYRAM stack */
mov $_STACK_TOP, %esp