-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's mapped in the lower half? #470
Comments
That's probably the context switch function of the boot loader: Lines 235 to 260 in ea3f61a
These pages contain a function that switches to the kernel page tables and jumps to its entry point. You can safely unmap it. See also #240 |
If it turns out not to be context switch function, then I suppose I can safely unmap these addresses anyway? Why does the bootloader leave these things mapped? |
I'm pretty sure it's the context switch function. If it's not the context switch function, then it depends on the memory for whether it's safe to unmap.
The context switch function needs to do two things:
It needs to do these steps in that order. The problem is that if we don't map the context switch function into the kernel's page tables, we can't do the second step after switching the page tables.
The GDT can't be safely unmapped before switching to a new one. Some instructions like |
As the kernel of the upper half, I want nothing to be displayed in the lower half.
But TLB after loading looks like this:
I realized that 13ac000 belongs to GDT, I created my GDT and can now unmap that address.
But what is mapped in the first two addresses? Can I safely unmap them?
The text was updated successfully, but these errors were encountered: