Map all physical memory into the higher half instead of using recursive mapping #23
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "map-physical-world"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Recursive mapping seemed like a neat idea, but it has its shortcomings. Namely, to edit an address space you must switch to it. Which is NOT CONVENIENT AT ALL when you're trying to manage two address spaces at once, like in fork().
This patch makes it so that x86_64's MMU maps the entire physical address space at 0xffff8000'00000000 (beginning of the higher half on x86_64) and then uses that mapping to perform further virtual memory operations.
This still has a few problems. Notably, we are not using huge pages for this mapping, which would be a lot more efficient.
Right now, used memory is 8.1 MiB at boot for a 256MiB system.
But after improving it, this system will be much better than recursive mapping.
There we go, we're now using 188KiB out of 256MiB on boot.
WIP: Map all physical memory into the higher half instead of using recursive mappingto Map all physical memory into the higher half instead of using recursive mapping