-
Notifications
You must be signed in to change notification settings - Fork 20
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
General improvements and cleanup to page tables handling #309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need invlpg_safe() as it's simply trying to handle a case that's no longer relevant (no i386 or even IA-32 support in KTF anyways).
They have to be mapped in the new kernel page tables anyway. This is needed to get rid of initial map_used_memory(). Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
The multiboot areas are used to determine invalid physical addresses and MFNs. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
This is mainly refactoring cleanup. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
This is mainly refactoring cleanup. Boot stack is part of .bss.init section and as such is mapped. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Since all necessary pages have been mapped, no need to map anything else. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Rename it to more correct tmp_map_mfn() and make it an inline function. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Instead of doing full page table walk to obtain PTE of the temp. mapping location, cache it in _tmp_mapping_entry variable. The variable needs to be set once before construction of the page tables begins and updated once before the switch to new page tables (the virtual address of the PTE changes). Also, there is no need to map in all levels of the page tables for the _tmp_mappings, since the entry address is cached. Map only the last level page table. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
Use INVLPG instead. Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a few more nits...
This is needed to implement #308 properly.