Making 4kb higher half kernel
Making 4kb higher half kernel
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...
-
- Member
- Posts: 501
- Joined: Wed Jun 17, 2015 9:40 am
- Libera.chat IRC: glauxosdever
- Location: Athens, Greece
Re: Making 4kb higher half kernel
Hi,
Could you please link to the guide you are following?
However, I'd suggest you read the theory behind paging first.
Regards,
glauxosdever
Could you please link to the guide you are following?
However, I'd suggest you read the theory behind paging first.
Regards,
glauxosdever
Re: Making 4kb higher half kernel
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
Re: Making 4kb higher half kernel
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.
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/
Re: Making 4kb higher half kernel
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?
Re: Making 4kb higher half kernel
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.
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/