Hi!
I have a secondary boot loader which sets up a gdt, basic idt, and paging. It then loads my kernel from the grub modules and jumps to 0xC0000000(where it mapped my real kernel to). But once in that kernel, I need to allocate pages to user-space apps. The problem is that i need to allocate a page table for my index for my allocator, index the pages, and then i also have to make sure i mark pages with modules in it as used. If you have any ideas on how to do this please please post them here. I am really puzzled about this issue.
Thanks.
Memory management in microkernel with modules from grub
Your bootloader should map everything to kernel space what is needed, at least the page directory and some space for page tables ( the simplest idea is to reserve 4 mb for page tables, but of course you could use less. You simply have to make sure that you have at least access to one unused page table so you can (at least) temporally map physical space to virtual space ).
You have to decide how you use your virtual and physcial space. If your allocator needs some space for itself, you have to reserve some pages for it before you use your allocator
You have to decide how you use your virtual and physcial space. If your allocator needs some space for itself, you have to reserve some pages for it before you use your allocator