I'm currently working on an x86_64 kernel as a personal project and I'm running into a page fault error when trying to write to memory. I've checked my code and I believe I've set up my paging structures correctly. However, I'm still running into this error and I'm not sure how to debug it further.
Here's a brief overview of my code:
I'm using a PageTableManager to manage my paging structures. I'm using the MapMemory function to map virtual memory addresses to physical memory addresses. I'm using the LockPages function to lock the kernel pages in memory. I've checked that my kernel code is running in the correct memory range. However, when I try to write to memory, I get a page fault error
I've also checked that the ReadWrite bit is set correctly in my paging structures, so I'm not sure what's causing this error.
If anyone has experience debugging page fault errors in an x86_64 kernel, I would greatly appreciate any advice or guidance. Thank you in advance!
this is the github repo where you can chek out the code