Go to the source code of this file.
|
#define | FL_CF 0x00000001 |
|
#define | FL_PF 0x00000004 |
|
#define | FL_AF 0x00000010 |
|
#define | FL_ZF 0x00000040 |
|
#define | FL_SF 0x00000080 |
|
#define | FL_TF 0x00000100 |
|
#define | FL_IF 0x00000200 |
|
#define | FL_DF 0x00000400 |
|
#define | FL_OF 0x00000800 |
|
#define | FL_IOPL_MASK 0x00003000 |
|
#define | FL_IOPL_0 0x00000000 |
|
#define | FL_IOPL_1 0x00001000 |
|
#define | FL_IOPL_2 0x00002000 |
|
#define | FL_IOPL_3 0x00003000 |
|
#define | FL_NT 0x00004000 |
|
#define | FL_RF 0x00010000 |
|
#define | FL_VM 0x00020000 |
|
#define | FL_AC 0x00040000 |
|
#define | FL_VIF 0x00080000 |
|
#define | FL_VIP 0x00100000 |
|
#define | FL_ID 0x00200000 |
|
#define | CR0_PE 0x00000001 |
|
#define | CR0_MP 0x00000002 |
|
#define | CR0_EM 0x00000004 |
|
#define | CR0_TS 0x00000008 |
|
#define | CR0_ET 0x00000010 |
|
#define | CR0_NE 0x00000020 |
|
#define | CR0_WP 0x00010000 |
|
#define | CR0_AM 0x00040000 |
|
#define | CR0_NW 0x20000000 |
|
#define | CR0_CD 0x40000000 |
|
#define | CR0_PG 0x80000000 |
|
#define | CR4_PSE 0x00000010 |
|
#define | SEG_KCODE 1 |
|
#define | SEG_KDATA 2 |
|
#define | SEG_KCPU 3 |
|
#define | SEG_UCODE 4 |
|
#define | SEG_UDATA 5 |
|
#define | SEG_TSS 6 |
|
#define | SEG(type, base, lim, dpl) |
|
#define | SEG16(type, base, lim, dpl) |
|
#define | DPL_USER 0x3 |
|
#define | STA_X 0x8 |
|
#define | STA_E 0x4 |
|
#define | STA_C 0x4 |
|
#define | STA_W 0x2 |
|
#define | STA_R 0x2 |
|
#define | STA_A 0x1 |
|
#define | STS_T16A 0x1 |
|
#define | STS_LDT 0x2 |
|
#define | STS_T16B 0x3 |
|
#define | STS_CG16 0x4 |
|
#define | STS_TG 0x5 |
|
#define | STS_IG16 0x6 |
|
#define | STS_TG16 0x7 |
|
#define | STS_T32A 0x9 |
|
#define | STS_T32B 0xB |
|
#define | STS_CG32 0xC |
|
#define | STS_IG32 0xE |
|
#define | STS_TG32 0xF |
|
#define | PDX(va) (((uint)(va) >> PDXSHIFT) & 0x3FF) |
|
#define | PTX(va) (((uint)(va) >> PTXSHIFT) & 0x3FF) |
|
#define | PGADDR(d, t, o) ((uint)((d) << PDXSHIFT | (t) << PTXSHIFT | (o))) |
|
#define | NPDENTRIES 1024 |
|
#define | NPTENTRIES 1024 |
|
#define | PGSIZE 4096 |
|
#define | PGSHIFT 12 |
|
#define | PTXSHIFT 12 |
|
#define | PDXSHIFT 22 |
|
#define | PGROUNDUP(sz) (((sz)+PGSIZE-1) & ~(PGSIZE-1)) |
|
#define | PGROUNDDOWN(a) (((a)) & ~(PGSIZE-1)) |
|
#define | PTE_P 0x001 |
|
#define | PTE_W 0x002 |
|
#define | PTE_U 0x004 |
|
#define | PTE_PWT 0x008 |
|
#define | PTE_PCD 0x010 |
|
#define | PTE_A 0x020 |
|
#define | PTE_D 0x040 |
|
#define | PTE_PS 0x080 |
|
#define | PTE_MBZ 0x180 |
|
#define | PTE_ADDR(pte) ((uint)(pte) & ~0xFFF) |
|
#define | PTE_FLAGS(pte) ((uint)(pte) & 0xFFF) |
|
#define | SETGATE(gate, istrap, sel, off, d) |
|
#define CR0_AM 0x00040000 |
Definition at line 35 of file mmu.h.
#define CR0_CD 0x40000000 |
Definition at line 37 of file mmu.h.
#define CR0_EM 0x00000004 |
Definition at line 30 of file mmu.h.
#define CR0_ET 0x00000010 |
Definition at line 32 of file mmu.h.
#define CR0_MP 0x00000002 |
Definition at line 29 of file mmu.h.
#define CR0_NE 0x00000020 |
Definition at line 33 of file mmu.h.
#define CR0_NW 0x20000000 |
Definition at line 36 of file mmu.h.
#define CR0_PE 0x00000001 |
Definition at line 28 of file mmu.h.
#define CR0_PG 0x80000000 |
Definition at line 38 of file mmu.h.
#define CR0_TS 0x00000008 |
Definition at line 31 of file mmu.h.
#define CR0_WP 0x00010000 |
Definition at line 34 of file mmu.h.
#define CR4_PSE 0x00000010 |
Definition at line 40 of file mmu.h.
Definition at line 79 of file mmu.h.
Definition at line 22 of file mmu.h.
Definition at line 7 of file mmu.h.
Definition at line 5 of file mmu.h.
Definition at line 12 of file mmu.h.
Definition at line 25 of file mmu.h.
Definition at line 11 of file mmu.h.
#define FL_IOPL_0 0x00000000 |
Definition at line 15 of file mmu.h.
#define FL_IOPL_1 0x00001000 |
Definition at line 16 of file mmu.h.
#define FL_IOPL_2 0x00002000 |
Definition at line 17 of file mmu.h.
#define FL_IOPL_3 0x00003000 |
Definition at line 18 of file mmu.h.
#define FL_IOPL_MASK 0x00003000 |
Definition at line 14 of file mmu.h.
Definition at line 19 of file mmu.h.
Definition at line 13 of file mmu.h.
Definition at line 6 of file mmu.h.
Definition at line 20 of file mmu.h.
Definition at line 9 of file mmu.h.
Definition at line 10 of file mmu.h.
#define FL_VIF 0x00080000 |
Definition at line 23 of file mmu.h.
#define FL_VIP 0x00100000 |
Definition at line 24 of file mmu.h.
Definition at line 21 of file mmu.h.
Definition at line 8 of file mmu.h.
#define PGROUNDDOWN |
( |
|
a) | |
(((a)) & ~(PGSIZE-1)) |
#define PTE_ADDR |
( |
|
pte) | |
((uint)(pte) & ~0xFFF) |
#define PTE_FLAGS |
( |
|
pte) | |
((uint)(pte) & 0xFFF) |
#define SEG |
( |
|
type, |
|
|
|
base, |
|
|
|
lim, |
|
|
|
dpl |
|
) |
| |
Value:
{ ((lim) >> 12) & 0xffff, (
uint)(base) & 0xffff, \
(
uint)(lim) >> 28, 0, 0, 1, 1, (
uint)(base) >> 24 }
Definition at line 69 of file mmu.h.
#define SEG16 |
( |
|
type, |
|
|
|
base, |
|
|
|
lim, |
|
|
|
dpl |
|
) |
| |
Value:
{ (lim) & 0xffff, (
uint)(base) & 0xffff, \
(
uint)(lim) >> 16, 0, 0, 1, 0, (
uint)(base) >> 24 }
Definition at line 73 of file mmu.h.
Definition at line 42 of file mmu.h.
Definition at line 44 of file mmu.h.
Definition at line 43 of file mmu.h.
Definition at line 47 of file mmu.h.
Definition at line 45 of file mmu.h.
Definition at line 46 of file mmu.h.
#define SETGATE |
( |
|
gate, |
|
|
|
istrap, |
|
|
|
sel, |
|
|
|
off, |
|
|
|
d |
|
) |
| |
Value:{ \
(gate).off_15_0 = (
uint)(off) & 0xffff; \
(gate).cs = (sel); \
(gate).args = 0; \
(gate).rsv1 = 0; \
(gate).s = 0; \
(gate).dpl = (d); \
(gate).p = 1; \
(gate).off_31_16 = (
uint)(off) >> 16; \
}
Definition at line 213 of file mmu.h.
Definition at line 87 of file mmu.h.
Definition at line 84 of file mmu.h.
Definition at line 83 of file mmu.h.
Definition at line 86 of file mmu.h.
Definition at line 85 of file mmu.h.
Definition at line 82 of file mmu.h.
Definition at line 93 of file mmu.h.
Definition at line 99 of file mmu.h.
Definition at line 95 of file mmu.h.
Definition at line 91 of file mmu.h.
Definition at line 90 of file mmu.h.
Definition at line 92 of file mmu.h.
Definition at line 97 of file mmu.h.
Definition at line 98 of file mmu.h.
Definition at line 94 of file mmu.h.
Definition at line 96 of file mmu.h.