Index: arch/amd64/src/boot/boot.S
===================================================================
--- arch/amd64/src/boot/boot.S	(revision 6f878b7f8f690c03fd4845753fceded48eb3a073)
+++ arch/amd64/src/boot/boot.S	(revision d0c30f72318e41cfdf35f06a1e4f76e9830d8211)
@@ -1,4 +1,4 @@
 #
-# Copyright (C) 2001-2004 Jakub Jermar
+# Copyright (C) 2001-2004 Ondrej Palkovsky
 # All rights reserved.
 #
@@ -27,5 +27,9 @@
 #
 
+#define __ASM__
+
+#include <arch/mm/page.h>	
 #include <arch/mm/ptl.h>
+#include <arch/pm.h>
 
 #define START_STACK     0x7c00	
@@ -52,9 +56,9 @@
 #	call memmap_arch_init
 	
-	mov $0x80000000, %eax  
+	movl $0x80000000, %eax  
 	cpuid
 	cmp $0x80000000, %eax 	# any function > 80000000h?
 	jbe no_long_mode
-	mov $0x80000001, %eax	# Extended function code 80000001
+	movl $0x80000001, %eax	# Extended function code 80000001
 	cpuid
 	bt $29, %edx 		# Test if long mode is supported.
@@ -69,5 +73,5 @@
 	movl %eax,%cr0			# switch to protected mode
 
-	jmpl $40, $now_in_prot
+	jmpl $selector(KTEXT32_DES), $now_in_prot
 
 no_long_mode:
@@ -79,5 +83,5 @@
 now_in_prot:  
 	# Set up stack & data descriptors
-	movw $16, %ax
+	movw $selector(KDATA_DES), %ax
 	movw %ax, %ds
 	movw %ax, %fs
@@ -107,5 +111,5 @@
 	
 	# At this point we are in compatibility mode
-	jmpl $8, $start64
+	jmpl $selector(KTEXT_DES), $start64
 
 .code64
@@ -150,9 +154,9 @@
 .global gdtr_inst				
 gdtr_inst:
-	.word 7*8  # GDT_ITEMS * 8
-	.long gdt + 0x80000000
+	.word selector(GDT_ITEMS)
+	.long KA2PA(gdt)
 
 .global idtr_inst
 idtr_inst:
 	.word 0
-	.long idt + 0x80000000
+	.long KA2PA(idt)
