Fix layout issues for printed version
This commit is contained in:
parent
15997d5849
commit
e25b74ca80
7 changed files with 55 additions and 57 deletions
12
mmu.h
12
mmu.h
|
|
@ -118,13 +118,13 @@ struct segdesc {
|
|||
#define PGADDR(d, t, o) ((uint)((d) << PDXSHIFT | (t) << PTXSHIFT | (o)))
|
||||
|
||||
// Page directory and page table constants.
|
||||
#define NPDENTRIES 1024 // page directory entries per page directory
|
||||
#define NPTENTRIES 1024 // page table entries per page table
|
||||
#define PGSIZE 4096 // bytes mapped by a page
|
||||
#define NPDENTRIES 1024 // # directory entries per page directory
|
||||
#define NPTENTRIES 1024 // # PTEs per page table
|
||||
#define PGSIZE 4096 // bytes mapped by a page
|
||||
|
||||
#define PGSHIFT 12 // log2(PGSIZE)
|
||||
#define PTXSHIFT 12 // offset of PTX in a linear address
|
||||
#define PDXSHIFT 22 // offset of PDX in a linear address
|
||||
#define PGSHIFT 12 // log2(PGSIZE)
|
||||
#define PTXSHIFT 12 // offset of PTX in a linear address
|
||||
#define PDXSHIFT 22 // offset of PDX in a linear address
|
||||
|
||||
#define PGROUNDUP(sz) (((sz)+PGSIZE-1) & ~(PGSIZE-1))
|
||||
#define PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue