Line | |
---|
1 | /*
|
---|
2 | sys/vm.h
|
---|
3 | */
|
---|
4 |
|
---|
5 | #define PAGE_SIZE 4096
|
---|
6 |
|
---|
7 | /* MIOCMAP */
|
---|
8 | struct mapreq
|
---|
9 | {
|
---|
10 | void *base;
|
---|
11 | size_t size;
|
---|
12 | off_t offset;
|
---|
13 | int readonly;
|
---|
14 | };
|
---|
15 |
|
---|
16 | /* i386 paging constants */
|
---|
17 | #define I386_VM_PRESENT 0x001 /* Page is present */
|
---|
18 | #define I386_VM_WRITE 0x002 /* Read/write access allowed */
|
---|
19 | #define I386_VM_USER 0x004 /* User access allowed */
|
---|
20 | #define I386_VM_PWT 0x008 /* Write through */
|
---|
21 | #define I386_VM_PCD 0x010 /* Cache disable */
|
---|
22 | #define I386_VM_ADDR_MASK 0xFFFFF000 /* physical address */
|
---|
23 |
|
---|
24 | #define I386_VM_PT_ENT_SIZE 4 /* Size of a page table entry */
|
---|
25 | #define I386_VM_DIR_ENTRIES 1024 /* Number of entries in a page dir */
|
---|
26 | #define I386_VM_DIR_ENT_SHIFT 22 /* Shift to get entry in page dir. */
|
---|
27 | #define I386_VM_PT_ENT_SHIFT 12 /* Shift to get entry in page table */
|
---|
28 | #define I386_VM_PT_ENT_MASK 0x3FF /* Mask to get entry in page table */
|
---|
29 |
|
---|
30 | #define I386_CR0_PG 0x80000000 /* Enable paging */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.