Index: Makefile.config
===================================================================
--- Makefile.config	(revision cc205f1f38b5517610765fe3a34396d52e75eca2)
+++ Makefile.config	(revision fd3c9e5af0393a52856c957f60f69f9554078b4b)
Index: arch/mips32/src/mm/tlb.c
===================================================================
--- arch/mips32/src/mm/tlb.c	(revision cc205f1f38b5517610765fe3a34396d52e75eca2)
+++ arch/mips32/src/mm/tlb.c	(revision fd3c9e5af0393a52856c957f60f69f9554078b4b)
@@ -87,6 +87,13 @@
 	__address badvaddr;
 	pte_t *pte;
-	
+
+// debug	
+	entry_hi_t hi;
+
 	badvaddr = cp0_badvaddr_read();
+
+// debug
+	hi.value = cp0_entry_hi_read();
+	printf("TLB Refill: hi.vnp2=%X\n", hi.vpn2);
 	
 	spinlock_lock(&VM->lock);		
Index: arch/mips32/src/mm/vm.c
===================================================================
--- arch/mips32/src/mm/vm.c	(revision cc205f1f38b5517610765fe3a34396d52e75eca2)
+++ arch/mips32/src/mm/vm.c	(revision fd3c9e5af0393a52856c957f60f69f9554078b4b)
@@ -49,5 +49,5 @@
 	spinlock_lock(&vm->lock);
 	hi.asid = vm->asid;
-	cp0_entry_hi_write(*((__u32 *) &hi));	
+	cp0_entry_hi_write(hi.value);	
 	spinlock_lock(&vm->unlock);
 	cpu_priority_restore(pri);
Index: test/mm/mapping1/test.c
===================================================================
--- test/mm/mapping1/test.c	(revision cc205f1f38b5517610765fe3a34396d52e75eca2)
+++ test/mm/mapping1/test.c	(revision fd3c9e5af0393a52856c957f60f69f9554078b4b)
@@ -53,22 +53,22 @@
 	*((__u32 *) frame1) = VALUE1;
 	
-	printf("Mapping %X to %X.\n", PAGE0, KA2PA(frame0));
+	printf("Mapping %P to %P.\n", PAGE0, KA2PA(frame0));
 	map_page_to_frame(PAGE0, KA2PA(frame0), PAGE_PRESENT, 0);
-	printf("Mapping %X to %X.\n", PAGE1, KA2PA(frame1));	
+	printf("Mapping %P to %P.\n", PAGE1, KA2PA(frame1));	
 	map_page_to_frame(PAGE1, KA2PA(frame1), PAGE_PRESENT, 0);
 	
-	printf("Value at %X is %X.\n", PAGE0, v0 = *((__u32 *) PAGE0));
-	printf("Value at %X is %X.\n", PAGE1, v1 = *((__u32 *) PAGE1));
+	printf("Value at %P is %L.\n", PAGE0, v0 = *((__u32 *) PAGE0));
+	printf("Value at %P is %L.\n", PAGE1, v1 = *((__u32 *) PAGE1));
 	
 	ASSERT(v0 == VALUE0);
 	ASSERT(v1 == VALUE1);
 
-	printf("Writing 0 to %X.\n", PAGE0);
+	printf("Writing 0 to %P.\n", PAGE0);
 	*((__u32 *) PAGE0) = 0;
-	printf("Writing 0 to %X.\n", PAGE1);
+	printf("Writing 0 to %P.\n", PAGE1);
 	*((__u32 *) PAGE1) = 0;	
 	
-	printf("Value at %X is %X.\n", PAGE0, v0 = *((__u32 *) PAGE0));	
-	printf("Value at %X is %X.\n", PAGE1, v1 = *((__u32 *) PAGE1));
+	printf("Value at %P is %L.\n", PAGE0, v0 = *((__u32 *) PAGE0));	
+	printf("Value at %P is %L.\n", PAGE1, v1 = *((__u32 *) PAGE1));
 
 	ASSERT(v0 == 0);
