Page 1 of 1

Why use higher half kernel?

Posted: Wed Jul 01, 2009 2:35 pm
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

Re: Why use higher half kernel?

Posted: Wed Jul 01, 2009 3:46 pm
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.

Re: Why use higher half kernel?

Posted: Wed Jul 01, 2009 4:44 pm
by Fencer
okay, thanks for your reply.
:)