Hi, do you have any resources for writing a higher-half kernel? Do I have to enable paging before calling my kernel?
thank you.
Higher-half kernel
How about the Higher Half Bare Bones in the wiki...
Every good solution is obvious once you've found it.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
If you can't come up with more specific questions, then there's little we can do (or have the time to do) to help you. Perhaps you need more background information...?
Here's at least a bit of info to get you started: HigherHalfBareBones gets the kernel up and running in the higher half with paging enabled. It sets up a page directory and a single 4MB page for the kernel (this means it requires the CPU to support PSE). The page directory itself should be accessible in the kernel's virtual address space, so you can mess around with it to your heart's content once main() starts running. The only real gotcha about HigherHalfBareBones is that it passes the physical address of the multiboot info structure to main(), not the virtual address (in fact it does nothing to make sure that the multiboot info structure is even within the kernel's 4MB page, although it probably is).
Does this help?
Here's at least a bit of info to get you started: HigherHalfBareBones gets the kernel up and running in the higher half with paging enabled. It sets up a page directory and a single 4MB page for the kernel (this means it requires the CPU to support PSE). The page directory itself should be accessible in the kernel's virtual address space, so you can mess around with it to your heart's content once main() starts running. The only real gotcha about HigherHalfBareBones is that it passes the physical address of the multiboot info structure to main(), not the virtual address (in fact it does nothing to make sure that the multiboot info structure is even within the kernel's 4MB page, although it probably is).
Does this help?
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
yes a lot. it tells me what i have to do. I will have to map the rest of the memory like the video memory and the multiboot header too. And knowing that i could access the page table is good too. Because the page table in this tutorial is so small, can I change the page table in my main function? What do I have to take care of for this to work?
OK, OK, OK... I see where I went wrong.
I'd suggest you get a copy of the Intel Manuals, as, basically, all the information is in there.
Then, I'd strongly suggest you try your hands on a very simplistic "toy" kernel first. If you ask us whether you "could" expand the page table "in my main function", that points to some not-understandings that are more basic than HigherHalf kernels. Having a look at the FAQ wiki might help, too.
I'd suggest you get a copy of the Intel Manuals, as, basically, all the information is in there.
Then, I'd strongly suggest you try your hands on a very simplistic "toy" kernel first. If you ask us whether you "could" expand the page table "in my main function", that points to some not-understandings that are more basic than HigherHalf kernels. Having a look at the FAQ wiki might help, too.
Every good solution is obvious once you've found it.