Rev 793 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 793 | Rev 832 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #include <arch/types.h> |
38 | #include <arch/types.h> |
39 | #include <typedefs.h> |
39 | #include <typedefs.h> |
40 | #include <mm/page.h> |
40 | #include <mm/page.h> |
41 | 41 | ||
42 | /* |
42 | /* |
- | 43 | * Number of entries in each level. |
|
- | 44 | */ |
|
- | 45 | #define PTL0_ENTRIES PTL0_ENTRIES_ARCH |
|
- | 46 | #define PTL1_ENTRIES PTL1_ENTRIES_ARCH |
|
- | 47 | #define PTL2_ENTRIES PTL2_ENTRIES_ARCH |
|
- | 48 | #define PTL3_ENTRIES PTL3_ENTRIES_ARCH |
|
- | 49 | ||
- | 50 | /* |
|
43 | * These macros process vaddr and extract those portions |
51 | * These macros process vaddr and extract those portions |
44 | * of it that function as indices to respective page tables. |
52 | * of it that function as indices to respective page tables. |
45 | */ |
53 | */ |
46 | #define PTL0_INDEX(vaddr) PTL0_INDEX_ARCH(vaddr) |
54 | #define PTL0_INDEX(vaddr) PTL0_INDEX_ARCH(vaddr) |
47 | #define PTL1_INDEX(vaddr) PTL1_INDEX_ARCH(vaddr) |
55 | #define PTL1_INDEX(vaddr) PTL1_INDEX_ARCH(vaddr) |
Line 82... | Line 90... | ||
82 | #define SET_PTL1_FLAGS(ptl0, i, x) SET_PTL1_FLAGS_ARCH(ptl0, i, x) |
90 | #define SET_PTL1_FLAGS(ptl0, i, x) SET_PTL1_FLAGS_ARCH(ptl0, i, x) |
83 | #define SET_PTL2_FLAGS(ptl1, i, x) SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
91 | #define SET_PTL2_FLAGS(ptl1, i, x) SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
84 | #define SET_PTL3_FLAGS(ptl2, i, x) SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
92 | #define SET_PTL3_FLAGS(ptl2, i, x) SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
85 | #define SET_FRAME_FLAGS(ptl3, i, x) SET_FRAME_FLAGS_ARCH(ptl3, i, x) |
93 | #define SET_FRAME_FLAGS(ptl3, i, x) SET_FRAME_FLAGS_ARCH(ptl3, i, x) |
86 | 94 | ||
- | 95 | /* |
|
- | 96 | * Determine whether the mapping is valid. |
|
- | 97 | */ |
|
- | 98 | #define PTE_VALID(p) PTE_VALID_ARCH((p)) |
|
- | 99 | ||
87 | extern page_mapping_operations_t pt_mapping_operations; |
100 | extern page_mapping_operations_t pt_mapping_operations; |
88 | 101 | ||
89 | extern void page_mapping_insert_pt(as_t *as, __address page, __address frame, int flags); |
102 | extern void page_mapping_insert_pt(as_t *as, __address page, __address frame, int flags); |
90 | extern pte_t *page_mapping_find_pt(as_t *as, __address page); |
103 | extern pte_t *page_mapping_find_pt(as_t *as, __address page); |
91 | 104 |