summaryrefslogtreecommitdiff
path: root/src/paging.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2025-07-27 16:53:54 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2025-07-27 16:53:54 +0200
commit82585d70771bbac69f95127b003446486623c07a (patch)
treeb6162eaee76f5683e5f81753adc13f28bec8d904 /src/paging.c
parentefb1cf0895d6c5019f5a88fa14b59afd030fefca (diff)
Tweaks to the interrupt handler mechanism
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 */
+}