-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stage2 and low memory cleanup (#959)
* alteration to id heap interface to allow allocating within a specified range (id_heap_alloc_subrange()); move wrap-around alloc for random and next-fit allocations to id and out of bitmap * stage2 cleanup: set up heaps and page tables before loading kernel elf, allocate a much larger working heap off of the physical region heap (which will be unmapped and released in stage3) to accomodate extensive tfs meta, cleanup various cruft and aggregate memory-related defines into uniboot.h * mapping the allocated stage2 working heap wasn't necessary; return it as well as any trimmed phys mem above the kernel map to the pool of physical memory for stage3 * correct filesystem sizes throughout (size of volume if fixed, infinity otherwise) * shrink early working heap area to 1K, move from extended mem to bss; allocate expanded area before switching to new stack * communicate the complete extent of the identity-mapped page table region from stage2 to stage3 and ultimately unix mmap setup so that it's properly protected from user mappings; open up high 2gb of 32-bit space for MMAP_32BIT mappings * add unit test for id_heap_alloc_subrange(); fix incorrect handling of start and end boundaries in bitmap_alloc_internal; change byte ranges to page ranges in id heap * mmap: use p->virtual32 to track the entirety of 32-bit address space, change localized closure uses to stack closures; fix erroneous process virtual area which overlapped tagged region, reserve tagged regions (kernel and user) in virtual_huge * stage2: reduce wasted address space by reordering physical allocations such that only the identity map remains below the kernel, stash stage2 stack as region to be unmapped/reclaimed in stage3; exec: clean up and move address space constants to unix_internal.h, clean up ASLR computation, compute stack ASLR manually rather than using randomized heap which would force stack length sized alignment
- Loading branch information
Showing
15 changed files
with
300 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.