blog_os
blog_os copied to clipboard
Steps to divide the address space in kernel space and user space
Great blog, I have followed all the articles so far from the blog os post, I was thinking about how to divide the address spaces. What modifications are needed to divide the virtual memory into kernel space and user space and how context switch can be done.
Thank you
Here's an article about how to get to usermode (a.k.a Ring 3 on x86): https://wiki.osdev.org/Getting_to_Ring_3
For moving the kernel to the higher half, it should be enough to instruct the linker to use a different base address. You can do this through a linker script or by passing an --image-base
argument.