OSDev.org

The Place to Start for Operating System Developers
It is currently Tue May 07, 2024 10:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Paging design, Lower half kernel, potential problems?
PostPosted: Sat Mar 21, 2009 11:25 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
Sounds good to me.

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
 Post subject: Re: Paging design, Lower half kernel, potential problems?
PostPosted: Sun Mar 22, 2009 4:58 am 
Offline
Member
Member

Joined: Mon Feb 23, 2009 6:53 am
Posts: 110
So where do you recommend that I put my kernel then? I need the last 4 MB of my virtual memory to the self-mapping of my page directory, but should the kernel end just before those 4 MB?


Top
 Profile  
 
 Post subject: Re: Paging design, Lower half kernel, potential problems?
PostPosted: Sun Mar 22, 2009 9:21 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
You don't actually need to self-map your page directory right at the end of the address space. You can do it wherever you want. Mine is self-mapped 12MB after my kernel code in the virtual address space.

Where to put your kernel really depends on what kind of kernel it is. Higher "half" is not necessarily to be taken literally. If your kernel is monolithic, you'll need more address space dedicated to the kernel. If it's a microkernel, you'll need less. Mine is a microkernel, and my kernel space starts at 0xE0000000 for example. My kernel code starts at 0xE0100000, and the current page directory is self-mapped such that all the page tables start at 0xE1000000. Where you choose to put things depends on how your own kernel is going to use memory, but in general I suggest keeping big contiguous regions of virtual address space free for kernel use.

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group