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)
This commit is contained in:
Frans Kaashoek 2011-08-09 21:37:35 -04:00
parent 3a03810643
commit 66ba8079c7
9 changed files with 1101 additions and 103 deletions

5
defs.h
View file

@ -62,7 +62,7 @@ extern uchar ioapicid;
void ioapicinit(void);
// kalloc.c
char* pgalloc(void);
char* boot_alloc(void);
char* kalloc(void);
void kfree(char*);
void kinit(void);
@ -161,11 +161,10 @@ void uartintr(void);
void uartputc(int);
// vm.c
void pginit(char* (*alloc)());
void seginit(void);
void kvmalloc(void);
void vmenable(void);
pde_t* setupkvm(void);
pde_t* setupkvm(char* (*alloc)());
char* uva2ka(pde_t*, char*);
int allocuvm(pde_t*, uint, uint);
int deallocuvm(pde_t*, uint, uint);