Commit Graph

63 Commits

Author SHA1 Message Date
Justin C. Miller
9128bfc5f1 Switch to clang and improve cpprt 2018-05-09 01:17:18 -07:00
Justin C. Miller
0f54630725 Move memory_manager and assert into kutil. 2018-05-08 01:11:03 -07:00
Justin C. Miller
b3e49590a7 Add logging framework 2018-04-28 19:18:53 -07:00
Justin C. Miller
25b9625635 paging finally works 2018-04-25 19:53:22 -07:00
Justin C. Miller
bed882f41c Enable paging WIP 2018-04-25 10:48:14 -07:00
Justin C. Miller
1113164505 Join page_block insert methods into one 2018-04-22 23:27:15 -07:00
Justin C. Miller
1de73de2e3 Move page table allocation to top 256GiB.
I forgot to account for tracking page table physical addresses, so
this is a bit of an overhaul. Major changes:
- Refactor bootstrap code into more functions and:
  - Only allocate 32 pages of scratch space
  - Remap remaining space into top 256GiB, the "page table space"
- Use the page table space to directly offset-map page table pages
  from their physical addresses, to avoid tracking overhead.
- Refactor page_block list functions into static functions to better
  handle null/empty lists
2018-04-22 21:52:59 -07:00
Justin C. Miller
95d52b87f4 Initialize page_manager.
Page manager now:
- Caches mapped pages and page_block structs
- Can unmap memory ranges
- Unmaps extra kernel memory during it's init
2018-04-22 02:48:45 -07:00
Justin C. Miller
07fd3abe2c Move page size and higher half offset to constants 2018-04-21 20:58:58 -07:00
Justin C. Miller
5dedd2e0e0 Finish memory bootstrap sequence.
Now we're setting up all our own page tables, and handing off to
page_manager's init function. (Which is still NYI.)
2018-04-21 19:32:39 -07:00
Justin C. Miller
57abb03deb Rearrange memory manager into two classes.
page_manager and memory_manager are now separate, and are also pre
allocated in the kernel so they don't have to allocate themselves.
2018-04-21 17:34:33 -07:00
Justin C. Miller
4a38a74b16 Refactor memory code.
Break out some more bootstrap code into functions. Add the start of
some Doxygen doc comments to help organize my thoughts.
2018-04-21 16:49:39 -07:00
Justin C. Miller
da404f520d Rearrange memory bootstrapping code.
Move EFI-related code and initial memory manager bootstrap code
to memory_bootstrap.cpp, move memory page structs to their own
memory_page.h/cpp files.
2018-04-21 02:52:52 -07:00