Index: arch/amd64/include/pm.h
===================================================================
--- arch/amd64/include/pm.h	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ arch/amd64/include/pm.h	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -117,4 +117,9 @@
 } __attribute__ ((packed));
 
+struct ptr_16_32 {
+	__u16 limit;
+	__u32 base;
+} __attribute__ ((packed));
+
 struct tss {
 	__u32 reserve1;
@@ -141,4 +146,6 @@
 
 extern struct ptr_16_64 gdtr;
+extern struct ptr_16_32 bsp_bootstrap_gdtr;
+extern struct ptr_16_32 ap_bootstrap_gdtr;
 
 extern void pm_init(void);
Index: arch/amd64/src/boot/boot.S
===================================================================
--- arch/amd64/src/boot/boot.S	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ arch/amd64/src/boot/boot.S	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -67,8 +67,5 @@
 
 	# Load gdtr, idtr
-	lgdt gdtr_inst
-	# Load idtr, but it contains mess - we should not get interrupt
-	# anyway
-	lidt idtr_inst
+	lgdt bsp_bootstrap_gdtr
 	
 	movl %cr0,%eax
@@ -155,10 +152,10 @@
 
 .global gdtr_inst				
-gdtr_inst:
+bsp_bootstrap_gdtr:
 	.word gdtselector(GDT_ITEMS)
 	.long KA2PA(gdt)
 
-.global idtr_inst
-idtr_inst:
-	.word idtselector(IDT_ITEMS)
-	.long KA2PA(idt)
+.global ap_bootstrap_gdtr
+ap_bootstrap_gdtr:
+	.word gdtselector(GDT_ITEMS)
+	.long KA2PA(gdt)
Index: arch/ia32/include/smp/mps.h
===================================================================
--- arch/ia32/include/smp/mps.h	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ arch/ia32/include/smp/mps.h	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -41,5 +41,5 @@
 struct mps_fs {
 	__u32 signature;
-	struct mps_ct *configuration_table;
+	__u32 configuration_table;
 	__u8 length;
 	__u8 revision;
@@ -59,8 +59,8 @@
 	__u8 oem_id[8];
 	__u8 product_id[12];
-	__u8 *oem_table;
+	__u32 oem_table;
 	__u16 oem_table_size;
 	__u16 entry_count;
-	__u32 *l_apic;
+	__u32 l_apic;
 	__u16 ext_table_length;
 	__u8 ext_table_checksum;
@@ -90,5 +90,5 @@
 	__u8 io_apic_version;
 	__u8 io_apic_flags;
-	__u32 *io_apic;
+	__u32 io_apic;
 } __attribute__ ((packed));
 
Index: arch/ia32/src/smp/mps.c
===================================================================
--- arch/ia32/src/smp/mps.c	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ arch/ia32/src/smp/mps.c	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -162,5 +162,5 @@
 void mps_init(void)
 {
-	__u8 *addr[2] = { NULL, (__u8 *) 0xf0000 };
+	__u8 *addr[2] = { NULL, (__u8 *) PA2KA(0xf0000) };
 	int i, j, length[2] = { 1024, 64*1024 };
 	
@@ -173,5 +173,5 @@
 	 */
 
-	addr[0] = (__u8 *) (ebda ? ebda : 639 * 1024);
+	addr[0] = (__u8 *) PA2KA(ebda ? ebda : 639 * 1024);
 	for (i = 0; i < 2; i++) {
 		for (j = 0; j < length[i]; j += 16) {
@@ -196,5 +196,5 @@
 		}
 
-		ct = fs->configuration_table;
+		ct = (struct mps_ct *)PA2KA((__address)fs->configuration_table);
 		frame_not_free((__address) ct);
 		config.cpu_count = configure_via_ct();
@@ -224,5 +224,5 @@
 	}
 	
-	l_apic = ct->l_apic;
+	l_apic = (__u32 *)PA2KA((__address)ct->l_apic);
 
 	cnt = 0;
@@ -334,5 +334,5 @@
 	}
 	
-	io_apic = ioa->io_apic;
+	io_apic = (__u32 *)PA2KA((__address)ioa->io_apic);
 }
 
Index: arch/ia32/src/smp/smp.c
===================================================================
--- arch/ia32/src/smp/smp.c	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ arch/ia32/src/smp/smp.c	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -63,6 +63,9 @@
 
 	if (config.cpu_count > 1) {
-		map_page_to_frame((__address) l_apic, (__address) l_apic, PAGE_NOT_CACHEABLE, 0);
-		map_page_to_frame((__address) io_apic, (__address) io_apic, PAGE_NOT_CACHEABLE, 0);
+		map_page_to_frame((__address)l_apic, KA2PA((__address)l_apic), 
+				  PAGE_NOT_CACHEABLE, 0);
+		map_page_to_frame((__address) io_apic, 
+				  KA2PA((__address) io_apic), 
+				  PAGE_NOT_CACHEABLE, 0);
         }
 
Index: src/Makefile.config
===================================================================
--- src/Makefile.config	(revision 5e2455ab71113160c1e2923cc751c703ba776ab4)
+++ src/Makefile.config	(revision 776c91a7127e18d9afb8dc8910bfaf527da701f3)
@@ -6,5 +6,5 @@
 
 # Support for symetric multiprocessors
-SMP=__SMP__
+#SMP=__SMP__
 
 # Improved support for hyperthreading
