Index: arch/amd64/Makefile.inc
===================================================================
--- arch/amd64/Makefile.inc	(revision c832cc0a825039a5a4787d1046ba3d79f6332334)
+++ arch/amd64/Makefile.inc	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
@@ -28,3 +28,6 @@
 	arch/amd64.c \
 	arch/bios/bios.c \
-	arch/interrupt.c
+	arch/interrupt.c \
+	arch/mm/frame.c \
+	arch/mm/page.c \
+	arch/mm/tlb.c
Index: arch/amd64/include/asm.h
===================================================================
--- arch/amd64/include/asm.h	(revision c832cc0a825039a5a4787d1046ba3d79f6332334)
+++ arch/amd64/include/asm.h	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
@@ -140,4 +140,27 @@
 static inline __u32 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; }
 
+/** Write CR3
+ *
+ * Write value to CR3.
+ *
+ * @param v Value to be written.
+ */
+static inline void write_cr3(__u64 v) { __asm__ volatile ("movq %0,%%cr3\n" : : "r" (v)); }
+
+/** Read CR3
+ *
+ * Return value in CR3
+ *
+ * @return Value read.
+ */
+static inline __u32 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; }
+
+/** Set priority level low
+ *
+ * Enable interrupts and return previous
+ * value of EFLAGS.
+ */
+
+
 
 extern size_t interrupt_handler_size;
Index: arch/amd64/include/mm/memory_init.h
===================================================================
--- arch/amd64/include/mm/memory_init.h	(revision c832cc0a825039a5a4787d1046ba3d79f6332334)
+++ 	(revision )
@@ -1,36 +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.
- */
-
-#ifndef __amd64_MEMORY_INIT_H__
-#define __amd64_MEMORY_INIT_H__
-
-#include <config.h>
-
-size_t get_memory_size(void);
-
-#endif
Index: arch/amd64/src/boot/memmap.S
===================================================================
--- arch/amd64/src/boot/memmap.S	(revision c832cc0a825039a5a4787d1046ba3d79f6332334)
+++ arch/amd64/src/boot/memmap.S	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
@@ -120,6 +120,6 @@
 
 e820counter:
-	.byte 0xff
+	.byte 0x0
 
 e820table:
-	.space  (32*E820_RECORD_SIZE),0xff # space for 32 records, each E820_RECORD_SIZE bytes long
+	.space  (32*E820_RECORD_SIZE),0x0 # space for 32 records, each E820_RECORD_SIZE bytes long
Index: arch/amd64/src/dummy.s
===================================================================
--- arch/amd64/src/dummy.s	(revision c832cc0a825039a5a4787d1046ba3d79f6332334)
+++ arch/amd64/src/dummy.s	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
@@ -36,10 +36,7 @@
 .global cpu_sleep
 .global cpu_print_report
-.global get_memory_size
 .global arch_late_init
 .global calibrate_delay_loop
 .global cpu_halt
-.global page_arch_init
-.global frame_arch_init
 .global dummy
 .global rdtsc
@@ -49,4 +46,10 @@
 .global interrupt_handler_size
 .global interrupt_handlers
+.global memory_print_map
+.global get_memory_size
+
+get_memory_size:
+	movq $4*1024*1024, %rax
+	ret
 
 interrupt_handler_size:
@@ -61,12 +64,10 @@
 cpu_sleep:
 cpu_print_report:
-get_memory_size:
 arch_late_init:
 calibrate_delay_loop:
 cpu_halt:
-page_arch_init:
-frame_arch_init:
 reset_TS_flag:
-fpu_init:	
+fpu_init:
+memory_print_map:	
 	
 dummy:
Index: arch/amd64/src/mm/page.c
===================================================================
--- arch/amd64/src/mm/page.c	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
+++ arch/amd64/src/mm/page.c	(revision f9447155de20c5cfd68a01025fa1a2b19595bcdd)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2001-2004 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.
+ */
+
+#include <mm/page.h>
+#include <arch/mm/page.h>
+
+void page_arch_init(void)
+{
+}
