Index: kernel/arch/amd64/Makefile.inc
===================================================================
--- kernel/arch/amd64/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/amd64/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -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 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -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 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -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 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
+++ kernel/arch/amd64/src/boot/memmap.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -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;
-}
-
-/** @}
- */
Index: kernel/arch/arm32/Makefile.inc
===================================================================
--- kernel/arch/arm32/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/arm32/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -89,5 +89,4 @@
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/mm/page_fault.c
 
Index: kernel/arch/arm32/include/mm/memory_init.h
===================================================================
--- kernel/arch/arm32/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * 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 arm32mm	
- * @{
- */
-/** @file
- *  @brief Memory information functions declarations.
- */
-
-#ifndef KERN_arm32_MEMORY_INIT_H_
-#define KERN_arm32_MEMORY_INIT_H_
-
-#include <config.h>
-
-size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/arm32/src/mm/frame.c
===================================================================
--- kernel/arch/arm32/src/mm/frame.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/arm32/src/mm/frame.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -36,4 +36,5 @@
 #include <mm/frame.h>
 #include <arch/mm/frame.h>
+#include <arch/machine.h>
 #include <config.h>
 #include <arch/debug/print.h>
@@ -46,7 +47,7 @@
 {
 	/* all memory as one zone */
-	zone_create(0, ADDR2PFN(config.memory_size),
+	zone_create(0, ADDR2PFN(machine_get_memory_size()),
 	    BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0);
-	last_frame = config.memory_size;
+	last_frame = machine_get_memory_size();
 
 	/* blacklist boot page table */
Index: kernel/arch/arm32/src/mm/memory_init.c
===================================================================
--- kernel/arch/arm32/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * 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 arm32mm	
- * @{
- */
-/** @file
- *  @brief Memory information functions.
- */
-
-#include <arch/mm/memory_init.h>
-#include <arch/mm/page.h>
-#include <arch/machine.h>
-
-/** Returns memory size.
- *
- * @return Memory size in bytes
- */
-size_t get_memory_size(void) 
-{
-	return  machine_get_memory_size();
-}
-
-/** @}
- */
Index: kernel/arch/ia32/Makefile.inc
===================================================================
--- kernel/arch/ia32/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -142,5 +142,4 @@
 	arch/$(ARCH)/src/mm/as.c \
 	arch/$(ARCH)/src/mm/frame.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
@@ -151,4 +150,5 @@
 	arch/$(ARCH)/src/drivers/vesa.c \
 	arch/$(ARCH)/src/boot/boot.S \
+	arch/$(ARCH)/src/boot/memmap.c \
 	arch/$(ARCH)/src/fpu_context.c \
 	arch/$(ARCH)/src/debugger.c
Index: kernel/arch/ia32/include/boot/memmap.h
===================================================================
--- kernel/arch/ia32/include/boot/memmap.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32/include/boot/memmap.h	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -66,5 +66,4 @@
 extern e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
 extern uint8_t e820counter; 
-extern uint32_t e801memorysize;         /**< Size of available memory in KB. */
 
 #endif
Index: kernel/arch/ia32/include/mm/memory_init.h
===================================================================
--- kernel/arch/ia32/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,44 +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 ia32mm	
- * @{
- */
-/** @file
- * @ingroup ia32mm, am64mm
- */
-
-#ifndef KERN_ia32_MEMORY_INIT_H_
-#define KERN_ia32_MEMORY_INIT_H_
-
-size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/ia32/src/boot/boot.S
===================================================================
--- kernel/arch/ia32/src/boot/boot.S	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32/src/boot/boot.S	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -110,6 +110,5 @@
 	je valid_boot
 		
-		xorl %ecx, %ecx							# no memory size or map available
-		movl %ecx, e801memorysize
+		xorl %ecx, %ecx							# no memory map available
 		movl %ecx, e820counter
 		
@@ -119,17 +118,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/ia32/src/boot/memmap.c
===================================================================
--- kernel/arch/ia32/src/boot/memmap.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
+++ kernel/arch/ia32/src/boot/memmap.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -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 ia32mm
+ * @{
+ */
+/** @file
+ */
+
+#include <arch/boot/memmap.h>
+
+uint8_t e820counter = 0xff;
+e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
+
+/** @}
+ */
Index: kernel/arch/ia32/src/ia32.c
===================================================================
--- kernel/arch/ia32/src/ia32.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32/src/ia32.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -55,5 +55,4 @@
 #include <arch/bios/bios.h>
 
-#include <arch/mm/memory_init.h>
 #include <interrupt.h>
 #include <ddi/irq.h>
Index: kernel/arch/ia32/src/mm/memory_init.c
===================================================================
--- kernel/arch/ia32/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 ia32mm	
- * @{
- */
-/** @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;
-}
-
-/** @}
- */
Index: kernel/arch/ia32xen/Makefile.inc
===================================================================
--- kernel/arch/ia32xen/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32xen/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -132,5 +132,4 @@
 	arch/$(ARCH)/src/mm/as.c \
 	arch/$(ARCH)/src/mm/frame.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
Index: kernel/arch/ia32xen/include/mm/memory_init.h
===================================================================
--- kernel/arch/ia32xen/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * 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 ia32xen_mm	
- * @{
- */
-/** @file
- * @ingroup ia32xen_mm
- */
-
-#ifndef KERN_ia32xen_MEMORY_INIT_H_
-#define KERN_ia32xen_MEMORY_INIT_H_
-
-#include <arch/types.h>
-
-size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/ia32xen/src/ia32xen.c
===================================================================
--- kernel/arch/ia32xen/src/ia32xen.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia32xen/src/ia32xen.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -54,5 +54,4 @@
 #include <arch/bios/bios.h>
 
-#include <arch/mm/memory_init.h>
 #include <interrupt.h>
 #include <arch/debugger.h>
Index: kernel/arch/ia32xen/src/mm/memory_init.c
===================================================================
--- kernel/arch/ia32xen/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * 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 ia32xen_mm	
- * @{
- */
-/** @file
- */
-
-#include <arch/mm/memory_init.h>
-#include <arch/mm/page.h>
-#include <print.h>
-#include <mm/frame.h>
-
-size_t get_memory_size(void) 
-{
-	return start_info.frames * PAGE_SIZE;
-}
-
-/** @}
- */
Index: kernel/arch/ia64/include/mm/memory_init.h
===================================================================
--- kernel/arch/ia64/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * 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 ia64mm	
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_ia64_MEMORY_INIT_H_
-#define KERN_ia64_MEMORY_INIT_H_
-
-#include <config.h>
-
-#define get_memory_size()	(512*1024*1024)		/* 512M */
-
-#endif
-
-/** @}
- */
Index: kernel/arch/ia64/src/mm/frame.c
===================================================================
--- kernel/arch/ia64/src/mm/frame.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ia64/src/mm/frame.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -42,15 +42,16 @@
  * for real ia64 systems that provide memory map.
  */
+#define MEMORY_SIZE	(512 * 1024 * 1024)
 #define ROM_BASE	0xa0000
-#define ROM_SIZE	(384*1024)
+#define ROM_SIZE	(384 * 1024)
 
 void frame_arch_init(void)
 {
-	zone_create(0, config.memory_size >> FRAME_WIDTH, 1, 0);
+	zone_create(0, SIZE2FRAMES(MEMORY_SIZE), 1, 0);
 	
 	/*
 	 * Blacklist ROM regions.
 	 */
-	frame_mark_unavailable(ADDR2PFN(ROM_BASE), ROM_SIZE >> FRAME_WIDTH);
+	frame_mark_unavailable(ADDR2PFN(ROM_BASE), SIZE2FRAMES(ROM_SIZE));
 }
 
Index: kernel/arch/mips32/include/mm/memory_init.h
===================================================================
--- kernel/arch/mips32/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * 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 mips32mm	
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_mips32_MEMORY_INIT_H_
-#define KERN_mips32_MEMORY_INIT_H_
-
-#include <config.h>
-
-/* When this function is called, we do not have ARC initiated
- * - provide some reasonable minimum and update it later
- */
-#define get_memory_size()	CONFIG_MEMORY_SIZE
-
-#endif
-
-/** @}
- */
Index: kernel/arch/mips32/src/drivers/arc.c
===================================================================
--- kernel/arch/mips32/src/drivers/arc.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/mips32/src/drivers/arc.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -221,5 +221,5 @@
 		}	
 	} else
-		printf("%#10x %#10x free\n", 0, config.memory_size);
+		printf("%#10x %#10x free\n", 0, CONFIG_MEMORY_SIZE);
 }
 
@@ -363,5 +363,4 @@
 	if (arc_enabled()) {
 		arc_memdescriptor_t *desc;
-		int total = 0;
 		uintptr_t base;
 		size_t basesize;
@@ -380,6 +379,4 @@
 				basesize = ALIGN_DOWN(basesize, FRAME_SIZE);
 	
-				total += basesize;
-				
 				zone_create(ADDR2PFN(base), SIZE2FRAMES(basesize),
 					    ADDR2PFN(base), 0);
@@ -388,5 +385,4 @@
 		}
 	
-		config.memory_size = total;
 		return true;
 	}
Index: kernel/arch/mips32/src/mm/frame.c
===================================================================
--- kernel/arch/mips32/src/mm/frame.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/mips32/src/mm/frame.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -47,5 +47,5 @@
 {
 	if (!arc_frame_init()) {
-		zone_create(0, ADDR2PFN(config.memory_size), 1, 0);
+		zone_create(0, ADDR2PFN(CONFIG_MEMORY_SIZE), 1, 0);
 		/*
 		 * Blacklist interrupt vector
Index: kernel/arch/ppc32/Makefile.inc
===================================================================
--- kernel/arch/ppc32/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc32/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -80,5 +80,4 @@
 	arch/$(ARCH)/src/mm/as.c \
 	arch/$(ARCH)/src/mm/frame.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
Index: kernel/arch/ppc32/include/mm/memory_init.h
===================================================================
--- kernel/arch/ppc32/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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 ppc32mm	
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_ppc32_MEMORY_INIT_H_
-#define KERN_ppc32_MEMORY_INIT_H_
-
-size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/ppc32/src/mm/frame.c
===================================================================
--- kernel/arch/ppc32/src/mm/frame.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc32/src/mm/frame.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -35,5 +35,4 @@
 #include <arch/boot/boot.h>
 #include <arch/mm/frame.h>
-#include <arch/mm/memory_init.h>
 #include <mm/frame.h>
 #include <align.h>
Index: kernel/arch/ppc32/src/mm/memory_init.c
===================================================================
--- kernel/arch/ppc32/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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 ppc32mm	
- * @{
- */
-/** @file
- */
-
-#include <arch/boot/boot.h>
-#include <arch/mm/memory_init.h>
-#include <print.h>
-
-
-size_t get_memory_size(void) 
-{
-	return bootinfo.memmap.total;
-}
-
-/** @}
- */
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -37,5 +37,4 @@
 #include <arch/boot/boot.h>
 #include <arch/drivers/cuda.h>
-#include <arch/mm/memory_init.h>
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
Index: kernel/arch/ppc64/Makefile.inc
===================================================================
--- kernel/arch/ppc64/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc64/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -68,5 +68,4 @@
 	arch/$(ARCH)/src/mm/as.c \
 	arch/$(ARCH)/src/mm/frame.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
Index: kernel/arch/ppc64/include/mm/memory_init.h
===================================================================
--- kernel/arch/ppc64/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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 ppc64mm	
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_ppc64_MEMORY_INIT_H_
-#define KERN_ppc64_MEMORY_INIT_H_
-
-size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/ppc64/src/mm/frame.c
===================================================================
--- kernel/arch/ppc64/src/mm/frame.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc64/src/mm/frame.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -35,5 +35,4 @@
 #include <arch/boot/boot.h>
 #include <arch/mm/frame.h>
-#include <arch/mm/memory_init.h>
 #include <mm/frame.h>
 #include <align.h>
Index: kernel/arch/ppc64/src/mm/memory_init.c
===================================================================
--- kernel/arch/ppc64/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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 ppc64mm	
- * @{
- */
-/** @file
- */
-
-#include <arch/boot/boot.h>
-#include <arch/mm/memory_init.h>
-#include <print.h>
-
-
-size_t get_memory_size(void) 
-{
-	return bootinfo.memmap.total;
-}
-
-
-/** @}
- */
Index: kernel/arch/ppc64/src/ppc64.c
===================================================================
--- kernel/arch/ppc64/src/ppc64.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/ppc64/src/ppc64.c	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -35,5 +35,4 @@
 #include <arch.h>
 #include <arch/boot/boot.h>
-#include <arch/mm/memory_init.h>
 #include <arch/interrupt.h>
 #include <genarch/fb/fb.h>
Index: kernel/arch/sparc64/Makefile.inc
===================================================================
--- kernel/arch/sparc64/Makefile.inc	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ kernel/arch/sparc64/Makefile.inc	(revision 71eef11b8afe2eec0d0ac48ea6fce51144cb5b0c)
@@ -90,5 +90,4 @@
 	arch/$(ARCH)/src/mm/page.c \
 	arch/$(ARCH)/src/mm/tlb.c \
-	arch/$(ARCH)/src/mm/memory_init.c \
 	arch/$(ARCH)/src/sparc64.c \
 	arch/$(ARCH)/src/start.S \
Index: kernel/arch/sparc64/include/mm/memory_init.h
===================================================================
--- kernel/arch/sparc64/include/mm/memory_init.h	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * 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 sparc64mm	
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_sparc64_MEMORY_INIT_H_
-#define KERN_sparc64_MEMORY_INIT_H_
-
-#include <arch/types.h>
-
-extern size_t get_memory_size(void);
-
-#endif
-
-/** @}
- */
Index: kernel/arch/sparc64/src/mm/memory_init.c
===================================================================
--- kernel/arch/sparc64/src/mm/memory_init.c	(revision 0b5f9fa8f85b747067b6791c2924eaa4a3965b76)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * 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 sparc64mm	
- * @{
- */
-/** @file
- */
-
-#include <arch/mm/memory_init.h>
-#include <arch/boot/boot.h>
-
-/** Return total size of available memory in bytes.
- *
- * @return Size of available memory in bytes.
- */
-size_t get_memory_size(void)
-{
-	return bootinfo.memmap.total;
-}
-
-/** @}
- */
