The kmem_* layer must handle pmap updates itself, since vm_map_remove()
won't update the kernel pmap for us. Thus, modify kmem_bootstrap_free()
to remove the KVA range from kernel_pmap and add it to kernel_arena.
For this to work, we must support demotion of the bootstrapped kernel
page tables. It suffices to ensure that PG_A is set on the PDEs (i386
already does this) and to insert the shadowed PTPs into the kernel
pmap's radix tree when initializing them in pmap_init().
Details
Details
- Reviewers
alc kib royger - Commits
- rS336764: Fix handling of KVA in kmem_bootstrap_free().
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 18303 Build 18028: arc lint + arc unit
Event Timeline
sys/i386/i386/pmap.c | ||
---|---|---|
665 | Oops, this change isn't needed. |
sys/amd64/amd64/pmap.c | ||
---|---|---|
1339 | KERNend could be in the midst of a 2 MB page mapping. Are you sure that you want to use trunc here? |
sys/amd64/amd64/pmap.c | ||
---|---|---|
1339 | Indeed, this doesn't match the loop in create_pagetables() which creates the 2MB mappings of the kernel. |
sys/amd64/amd64/pmap.c | ||
---|---|---|
983 | Is there a reason for placing this assignment here? At this point, create_pagetables() has allocated some, but not all, of the pages that it's going to allocate. Why not do this assignment in pmap_bootstrap(), before create_pagetables() is called? | |
1013 | As an aside, I wish there was a way to easily use the up to 1.99... MB of memory that we are wasting here as UMA boot pages. | |
sys/i386/i386/pmap.c | ||
941–945 | While we are here, can you please merge r329171 from amd64. |