summaryrefslogtreecommitdiff
path: root/src/paging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/paging.c')
-rw-r--r--src/paging.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/paging.c b/src/paging.c
new file mode 100644
index 0000000..539b26a
--- /dev/null
+++ b/src/paging.c
@@ -0,0 +1,12 @@
+#include "aplos.h"
+
+bool
+page_fault_handler(uint32_t code)
+{
+ int write = code&0x2;
+
+ uint64_t addr = get_cr2();
+ print(u8"Page fault trying to %s %p\n", write ? u8"write to" : u8"read from", addr);
+
+ return false; /* We didn't actually handle it */
+}