Index: kernel/arch/ia32/src/mm/frame.c
===================================================================
--- kernel/arch/ia32/src/mm/frame.c	(revision 720db0cb39d8d5d31bf09f36c79eb82c68f03d68)
+++ kernel/arch/ia32/src/mm/frame.c	(revision 68667ce251475e56b598e8d4f25c20a87dc24b15)
@@ -47,5 +47,6 @@
 #include <print.h>
 
-#define PHYSMEM_LIMIT  0x7C000000ull
+#define PHYSMEM_LIMIT32  0x7c000000ull
+#define PHYSMEM_LIMIT64  0xe0000000ull
 
 size_t hardcoded_unmapped_ktext_size = 0;
@@ -66,8 +67,8 @@
 		 * XXX FIXME:
 		 *
-		 * Ignore zones which start above PHYSMEM_LIMIT
-		 * or clip zones which go beyond PHYSMEM_LIMIT.
-		 *
-		 * The PHYSMEM_LIMIT (2 GB - 64 MB) is a rather
+		 * Ignore zones which start above PHYSMEM_LIMIT32
+		 * or clip zones which go beyond PHYSMEM_LIMIT32.
+		 *
+		 * The PHYSMEM_LIMIT32 (2 GB - 64 MB) is a rather
 		 * arbitrary constant which allows to have at
 		 * least 64 MB in the kernel address space to
@@ -81,9 +82,29 @@
 		 */
 		
-		if (base > PHYSMEM_LIMIT)
+		if (base > PHYSMEM_LIMIT32)
 			continue;
 		
-		if (base + size > PHYSMEM_LIMIT)
-			size = PHYSMEM_LIMIT - base;
+		if (base + size > PHYSMEM_LIMIT32)
+			size = PHYSMEM_LIMIT32 - base;
+#endif
+		
+#ifdef __64_BITS__
+		/*
+		 * XXX FIXME:
+		 *
+		 * Ignore zones which start above PHYSMEM_LIMIT64
+		 * or clip zones which go beyond PHYSMEM_LIMIT64.
+		 *
+		 * The limit PHYSMEM_LIMIT64 (3.5 GB) is caused
+		 * by various limitations of the current kernel
+		 * memory management.
+		 *
+		 */
+		
+		if (base > PHYSMEM_LIMIT64)
+			continue;
+		
+		if (base + size > PHYSMEM_LIMIT64)
+			size = PHYSMEM_LIMIT64 - base;
 #endif
 		
