diff options
author | Frans Kaashoek <kaashoek@42.sub-75-251-87.myvzw.com> | 2011-08-09 21:37:35 -0400 |
---|---|---|
committer | Frans Kaashoek <kaashoek@42.sub-75-251-87.myvzw.com> | 2011-08-09 21:37:35 -0400 |
commit | 66ba8079c7e376c189ccb3367b8d13825141b8ec (patch) | |
tree | 93343a9d7c9ea75a02c05e4ce078ef2d4a48e2da /kalloc.c | |
parent | 3a038106431314c85a5950c473b113a7037ac1aa (diff) | |
download | xv6-labs-66ba8079c7e376c189ccb3367b8d13825141b8ec.tar.gz xv6-labs-66ba8079c7e376c189ccb3367b8d13825141b8ec.tar.bz2 xv6-labs-66ba8079c7e376c189ccb3367b8d13825141b8ec.zip |
Use static page table for boot, mapping first 4Mbyte; no more segment trick
Allocate proper kernel page table immediately in main using boot allocator
Remove pginit
Simplify address space layout a tiny bit
More to come (e.g., superpages to simplify static table)
Diffstat (limited to 'kalloc.c')
-rw-r--r-- | kalloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -23,11 +23,13 @@ char *newend; // simple page allocator to get off the ground during boot char * -pgalloc(void) +boot_alloc(void) { if (newend == 0) newend = end; + if ((uint) newend >= KERNBASE + 0x400000) + panic("only first 4Mbyte are mapped during boot"); void *p = (void*)PGROUNDUP((uint)newend); memset(p, 0, PGSIZE); newend = newend + PGSIZE; |