Rev 831 | Rev 967 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 831 | Rev 832 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | 42 | ||
43 | /* |
43 | /* |
44 | * Implementation of generic 4-level page table interface. |
44 | * Implementation of generic 4-level page table interface. |
45 | * IA-32 has 2-level page tables, so PTL1 and PTL2 are left out. |
45 | * IA-32 has 2-level page tables, so PTL1 and PTL2 are left out. |
46 | */ |
46 | */ |
- | 47 | #define PTL0_ENTRIES_ARCH 1024 |
|
- | 48 | #define PTL1_ENTRIES_ARCH 0 |
|
- | 49 | #define PTL2_ENTRIES_ARCH 0 |
|
- | 50 | #define PTL3_ENTRIES_ARCH 1024 |
|
- | 51 | ||
47 | #define PTL0_INDEX_ARCH(vaddr) (((vaddr)>>22)&0x3ff) |
52 | #define PTL0_INDEX_ARCH(vaddr) (((vaddr)>>22)&0x3ff) |
48 | #define PTL1_INDEX_ARCH(vaddr) 0 |
53 | #define PTL1_INDEX_ARCH(vaddr) 0 |
49 | #define PTL2_INDEX_ARCH(vaddr) 0 |
54 | #define PTL2_INDEX_ARCH(vaddr) 0 |
50 | #define PTL3_INDEX_ARCH(vaddr) (((vaddr)>>12)&0x3ff) |
55 | #define PTL3_INDEX_ARCH(vaddr) (((vaddr)>>12)&0x3ff) |
51 | 56 | ||
Line 68... | Line 73... | ||
68 | #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x)) |
73 | #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x)) |
69 | #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
74 | #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
70 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
75 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
71 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
76 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
72 | 77 | ||
- | 78 | #define PTE_VALID_ARCH(p) (*((__u32 *) (p)) != 0) |
|
- | 79 | ||
73 | #ifndef __ASM__ |
80 | #ifndef __ASM__ |
74 | 81 | ||
75 | #include <mm/page.h> |
82 | #include <mm/page.h> |
76 | #include <arch/types.h> |
83 | #include <arch/types.h> |
77 | #include <arch/mm/frame.h> |
84 | #include <arch/mm/frame.h> |