Index: kernel/arch/ia32/src/mm/page.c
===================================================================
--- kernel/arch/ia32/src/mm/page.c	(revision 7e752b2a0d66c871748e5fa9e8bbe3a27c70a202)
+++ kernel/arch/ia32/src/mm/page.c	(revision 9d4e1704695fcf4bdd0d097a2dc12155e07a840f)
@@ -49,4 +49,5 @@
 #include <print.h>
 #include <interrupt.h>
+#include <macros.h>
 
 void page_arch_init(void)
@@ -55,23 +56,29 @@
 	int flags;
 	
-	if (config.cpu_active == 1) {
-		page_mapping_operations = &pt_mapping_operations;
+	if (config.cpu_active > 1) {
+		/* Fast path for non-boot CPUs */
+		write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
+		paging_on();
+		return;
+	}
+
+	page_mapping_operations = &pt_mapping_operations;
 	
-		/*
-		 * PA2KA(identity) mapping for all frames until last_frame.
-		 */
-		page_table_lock(AS_KERNEL, true);
-		for (cur = 0; cur < last_frame; cur += FRAME_SIZE) {
-			flags = PAGE_CACHEABLE | PAGE_WRITE;
-			if ((PA2KA(cur) >= config.base) && (PA2KA(cur) < config.base + config.kernel_size))
-				flags |= PAGE_GLOBAL;
-			page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
-		}
-		page_table_unlock(AS_KERNEL, true);
+	/*
+	 * PA2KA(identity) mapping for all frames until last_frame.
+	 */
+	page_table_lock(AS_KERNEL, true);
+	for (cur = 0; cur < min(config.identity_size, last_frame);
+	    cur += FRAME_SIZE) {
+		flags = PAGE_CACHEABLE | PAGE_WRITE;
+		if ((PA2KA(cur) >= config.base) && (PA2KA(cur) <
+		    config.base + config.kernel_size))
+			flags |= PAGE_GLOBAL;
+		page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
+	}
+	page_table_unlock(AS_KERNEL, true);
 		
-		exc_register(14, "page_fault", true, (iroutine_t) page_fault);
-		write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
-	} else
-		write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
+	exc_register(14, "page_fault", true, (iroutine_t) page_fault);
+	write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
 	
 	paging_on();
