Index: arch/amd64/src/boot/boot.S
===================================================================
--- arch/amd64/src/boot/boot.S	(revision 8fc0d4553a1a8e382979ca225a7ae2d3e376d1a2)
+++ arch/amd64/src/boot/boot.S	(revision cd95d7841b3abc438711416dfdf6551b51f15bb4)
@@ -67,4 +67,6 @@
 	# Load gdtr, idtr
 	lgdt gdtr_inst
+	# Load idtr, but it contains mess - we should not get interrupt
+	# anyway
 	lidt idtr_inst
 	
@@ -73,5 +75,5 @@
 	movl %eax,%cr0			# switch to protected mode
 
-	jmpl $selector(KTEXT32_DES), $now_in_prot
+	jmpl $gdtselector(KTEXT32_DES), $now_in_prot
 
 no_long_mode:
@@ -83,5 +85,5 @@
 now_in_prot:  
 	# Set up stack & data descriptors
-	movw $selector(KDATA_DES), %ax
+	movw $gdtselector(KDATA_DES), %ax
 	movw %ax, %ds
 	movw %ax, %fs
@@ -111,5 +113,5 @@
 	
 	# At this point we are in compatibility mode
-	jmpl $selector(KTEXT_DES), $start64
+	jmpl $gdtselector(KTEXT_DES), $start64
 
 .code64
@@ -117,13 +119,12 @@
 	movq START_STACK_64, %rsp
 	
-	lidt idtr_inst
-	
 	call main_bsp   # never returns
 1:
 	jmp 1b
-			
-
+				
 .section K_DATA_START
 .align 4096
+
+# Identical mapping of first 16MB and the same of -2GB -> 0	
 .global ptl_2
 ptl_2:	
@@ -154,9 +155,9 @@
 .global gdtr_inst				
 gdtr_inst:
-	.word selector(GDT_ITEMS)
+	.word gdtselector(GDT_ITEMS)
 	.long KA2PA(gdt)
 
 .global idtr_inst
 idtr_inst:
-	.word 0
+	.word idtselector(IDT_ITEMS)
 	.long KA2PA(idt)
