OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 2:37 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 10:03 am 
Offline

Joined: Fri Oct 19, 2018 9:59 am
Posts: 3
I want to make an higher halv kernel with 4kb pages instead of MB ones. Can you help me? I don't especially understand the part where BootPageDirectory is filled...


Top
 Profile  
 
 Post subject: Re: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 10:12 am 
Offline
Member
Member

Joined: Wed Jun 17, 2015 9:40 am
Posts: 501
Location: Athens, Greece
Hi,


Could you please link to the guide you are following?

However, I'd suggest you read the theory behind paging first. :-)


Regards,
glauxosdever


Top
 Profile  
 
 Post subject: Re: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 10:51 am 
Offline

Joined: Fri Oct 19, 2018 9:59 am
Posts: 3
Oh sorry, sure https://wiki.osdev.org/Higher_Half_x86_Bare_Bones I've read theory but to actually code it I didn't have any idea so it helped me


Top
 Profile  
 
 Post subject: Re: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 1:03 pm 
Offline
User avatar

Joined: Tue May 15, 2012 10:11 am
Posts: 8
Usually the page tables you setup in your pre-main initialization routine is just a preliminary mapping.
You will want to setup a proper mapping later anyways and you can use 4KiB pages to map your kernel if you want.
Also using 2MiB pages does not exclude using 4KiB pages for other things.

_________________
Current project: https://github.com/reinixOS/microsphere/


Top
 Profile  
 
 Post subject: Re: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 2:48 pm 
Offline

Joined: Fri Oct 19, 2018 9:59 am
Posts: 3
Oh man, didn't understand that! Now I have only one question. When does I have to create a new page directory or a new page directory and where should I put those?


Top
 Profile  
 
 Post subject: Re: Making 4kb higher half kernel
PostPosted: Fri Oct 19, 2018 3:34 pm 
Offline
User avatar

Joined: Tue May 15, 2012 10:11 am
Posts: 8
It largely depends on how you plan to structure your memory management...
You propably want a way to allocate physical pages before setting up your new tables.
You can then use a recursive mapping to access the allocated tables (PD, PT) in virtual memory.

_________________
Current project: https://github.com/reinixOS/microsphere/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 63 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