Index: kernel/arch/ia32/src/mm/frame.c
===================================================================
--- kernel/arch/ia32/src/mm/frame.c	(revision fc81981cb868cb75a16a2c5601de08457995187c)
+++ kernel/arch/ia32/src/mm/frame.c	(revision cae54046b82d245b0cf3dad7ced8e4d5d09d006e)
@@ -47,4 +47,6 @@
 #include <print.h>
 
+#define PHYSMEM_LIMIT  0x7C000000
+
 size_t hardcoded_unmapped_ktext_size = 0;
 size_t hardcoded_unmapped_kdata_size = 0;
@@ -55,5 +57,5 @@
 {
 	unsigned int i;
-
+	
 	for (i = 0; i < e820counter; i++) {
 		uint64_t base = e820table[i].base_address;
@@ -61,13 +63,29 @@
 		
 #ifdef __32_BITS__
-		/* Ignore physical memory above 4 GB */
-		if ((base >> 32) != 0)
+		/*
+		 * 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
+		 * arbitrary constant which allows to have at
+		 * least 64 MB in the kernel address space to
+		 * map hardware resources.
+		 *
+		 * The kernel uses fixed 1:1 identity mapping
+		 * of the physical memory with 2:2 GB split.
+		 * This is a severe limitation of the current
+		 * kernel memory management.
+		 *
+		 */
+		
+		if (base > PHYSMEM_LIMIT)
 			continue;
 		
-		/* Clip regions above 4 GB */
-		if (((base + size) >> 32) != 0)
-			size = 0xffffffff - base;
+		if (base + size > PHYSMEM_LIMIT)
+			size = PHYSMEM_LIMIT - base;
 #endif
-
+		
 		pfn_t pfn;
 		size_t count;
