Index: arch/ia32/src/boot/boot.S
===================================================================
--- arch/ia32/src/boot/boot.S	(revision 15bfc788324f68eff262f792145060e9a66863c0)
+++ arch/ia32/src/boot/boot.S	(revision 229d5fc19f8017e3ffae67e31565100b6e986570)
@@ -41,7 +41,11 @@
 kernel_image_start:
 	cli
-	call memmap_arch_init
 	xorw %ax,%ax
 	movw %ax,%ds
+	movw %ax,%ss			# initialize stack segment register
+	movl $0x7c00,%esp		# initialize stack pointer
+	
+	call memmap_arch_init
+	
 	lgdt gdtr
 	movl %cr0,%eax
@@ -58,5 +62,4 @@
 	movw %ax,%ds			# kernel data + stack
 	movw %ax,%ss
-	movl $0x7c00,%esp
 
 	lidt idtr
