Index: arch/ia32/include/interrupt.h
===================================================================
--- arch/ia32/include/interrupt.h	(revision 5f0c6643967448c838890152eb1df49a68d76c45)
+++ arch/ia32/include/interrupt.h	(revision b31d18860feb425f02434cc29cf3afa379e0ef8f)
@@ -93,4 +93,5 @@
 extern void (* eoi_function)(void);
 
+extern void PRINT_INFO_ERRCODE(istate_t *istate);
 extern void null_interrupt(int n, istate_t *istate);
 extern void gp_fault(int n, istate_t *istate);
@@ -98,5 +99,4 @@
 extern void ss_fault(int n, istate_t *istate);
 extern void simd_fp_exception(int n, istate_t *istate);
-extern void page_fault(int n, istate_t *istate);
 extern void syscall(int n, istate_t *istate);
 extern void tlb_shootdown_ipi(int n, istate_t *istate);
Index: arch/ia32/include/mm/page.h
===================================================================
--- arch/ia32/include/mm/page.h	(revision 5f0c6643967448c838890152eb1df49a68d76c45)
+++ arch/ia32/include/mm/page.h	(revision b31d18860feb425f02434cc29cf3afa379e0ef8f)
@@ -91,4 +91,18 @@
 #include <typedefs.h>
 
+/* Page fault error codes. */
+
+/** When bit on this position is 0, the page fault was caused by a not-present page. */
+#define PFERR_CODE_P		(1<<0)
+
+/** When bit on this position is 1, the page fault was caused by a write. */
+#define PFERR_CODE_RW		(1<<1)
+
+/** When bit on this position is 1, the page fault was caused in user mode. */
+#define PFERR_CODE_US		(1<<2)
+
+/** When bit on this position is 1, a reserved bit was set in page directory. */ 
+#define PFERR_CODE_RSVD		(1<<3)	
+
 /** Page Table Entry. */
 struct page_specifier {
@@ -139,4 +153,5 @@
 
 extern void page_arch_init(void);
+extern void page_fault(int n, istate_t *istate);
 
 #endif /* __ASM__ */
