Index: kernel/arch/amd64/Makefile.inc
===================================================================
--- kernel/arch/amd64/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/amd64/Makefile.inc	(revision 75c426b4f00b6c7154cd6d7a5c14dcbcf7d0fde9)
@@ -88,4 +88,5 @@
 	arch/$(ARCH)/src/fpu_context.c \
 	arch/$(ARCH)/src/boot/boot.S \
+	arch/$(ARCH)/src/boot/memmap.c \
 	arch/$(ARCH)/src/pm.c \
 	arch/$(ARCH)/src/context.S \
@@ -104,5 +105,4 @@
 	arch/$(ARCH)/src/mm/tlb.c \
 	arch/$(ARCH)/src/asm_utils.S \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/cpu/cpu.c \
 	arch/$(ARCH)/src/proc/scheduler.c \
Index: kernel/arch/amd64/include/mm/memory_init.h
===================================================================
--- kernel/arch/amd64/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../ia32/include/mm/memory_init.h
Index: kernel/arch/amd64/src/amd64.c
===================================================================
--- kernel/arch/amd64/src/amd64.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/amd64/src/amd64.c	(revision 75c426b4f00b6c7154cd6d7a5c14dcbcf7d0fde9)
@@ -51,5 +51,4 @@
 
 #include <arch/bios/bios.h>
-#include <arch/mm/memory_init.h>
 #include <arch/cpu.h>
 #include <print.h>
Index: kernel/arch/amd64/src/boot/boot.S
===================================================================
--- kernel/arch/amd64/src/boot/boot.S	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/amd64/src/boot/boot.S	(revision 75c426b4f00b6c7154cd6d7a5c14dcbcf7d0fde9)
@@ -183,5 +183,4 @@
 		
 		xorl %ecx, %ecx					# no memory size or map available
-		movl %ecx, e801memorysize
 		movl %ecx, e820counter
 		
@@ -191,17 +190,4 @@
 		
 		movl (%ebx), %eax				# ebx = physical address of struct multiboot_info
-		
-		bt $0, %eax					# mbi->flags[0] (mem_lower, mem_upper valid)
-		jc mem_valid
-			
-			xorl %ecx, %ecx
-			jmp mem_invalid
-			
-		mem_valid:
-		movl 4(%ebx), %ecx				# mbi->mem_lower
-		addl 8(%ebx), %ecx				# mbi->mem_upper
-		
-		mem_invalid:
-		movl %ecx, e801memorysize
 		
 		bt $3, %eax					# mbi->flags[3] (mods_count, mods_addr valid)
Index: kernel/arch/amd64/src/boot/memmap.c
===================================================================
--- kernel/arch/amd64/src/boot/memmap.c	(revision 75c426b4f00b6c7154cd6d7a5c14dcbcf7d0fde9)
+++ kernel/arch/amd64/src/boot/memmap.c	(revision 75c426b4f00b6c7154cd6d7a5c14dcbcf7d0fde9)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2005 Josef Cejka
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup amd64mm	
+ * @{
+ */
+/** @file
+ */
+
+#include <arch/boot/memmap.h>
+
+uint8_t e820counter = 0xff;
+e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
+
+/** @}
+ */
Index: kernel/arch/amd64/src/mm/memory_init.c
===================================================================
--- kernel/arch/amd64/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2005 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup amd64mm	
- * @{
- */
-/** @file
- */
-
-#include <arch/boot/memmap.h>
-#include <arch/mm/memory_init.h>
-#include <arch/mm/page.h>
-#include <print.h>
-
-uint8_t e820counter = 0xff;
-e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
-uint32_t e801memorysize;
-
-size_t get_memory_size(void) 
-{
-	return e801memorysize * 1024;
-}
-
-/** @}
- */
