Why use higher half kernel?

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Fencer
Posts: 9
Joined: Sun Jan 18, 2009 11:31 am

Why use higher half kernel?

Post by Fencer »

hi everyone,

i've got 2 points:

1. At the moment I'm not sure what's the advantage in mapping the kernel code in every process. But as it is used widely used I think there should be one :D

2. Is the following procedure for mapping an higher half kernel correct?

a) identity map the kernel memory at the moment when paging is enabled
b) also map the kernel to the higher half
c) for every new process copy the page entries/tables from b) to the new page directory.

greetings fencer
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Why use higher half kernel?

Post by Combuster »

What do you think would happen when you make an error, the processor traps into kernel land, and there is no kernel there? </rhetoric question>

Your approach looks fine. You might want to consider to remove the identity mapped version when you are in the higher half - you won't be accidentally messing things up there if you forget about it.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Fencer
Posts: 9
Joined: Sun Jan 18, 2009 11:31 am

Re: Why use higher half kernel?

Post by Fencer »

okay, thanks for your reply.
:)
Post Reply