Rev 1776 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1776 | Rev 1780 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | 39 | ||
40 | #define PAGE_WIDTH FRAME_WIDTH |
40 | #define PAGE_WIDTH FRAME_WIDTH |
41 | #define PAGE_SIZE FRAME_SIZE |
41 | #define PAGE_SIZE FRAME_SIZE |
42 | 42 | ||
43 | #ifndef __ASM__ |
43 | #ifndef __ASM__ |
44 | # define KA2PA(x) (((__address) (x)) - 0x80000000) |
44 | # define KA2PA(x) (((uintptr_t) (x)) - 0x80000000) |
45 | # define PA2KA(x) (((__address) (x)) + 0x80000000) |
45 | # define PA2KA(x) (((uintptr_t) (x)) + 0x80000000) |
46 | #else |
46 | #else |
47 | # define KA2PA(x) ((x) - 0x80000000) |
47 | # define KA2PA(x) ((x) - 0x80000000) |
48 | # define PA2KA(x) ((x) + 0x80000000) |
48 | # define PA2KA(x) ((x) + 0x80000000) |
49 | #endif |
49 | #endif |
50 | 50 | ||
Line 98... | Line 98... | ||
98 | #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x)) |
98 | #define SET_PTL1_FLAGS_ARCH(ptl0, i, x) set_pt_flags((pte_t *)(ptl0), (index_t)(i), (x)) |
99 | #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
99 | #define SET_PTL2_FLAGS_ARCH(ptl1, i, x) |
100 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
100 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) |
101 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
101 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
102 | 102 | ||
103 | #define PTE_VALID_ARCH(pte) (*((__u32 *) (pte)) != 0) |
103 | #define PTE_VALID_ARCH(pte) (*((uint32_t *) (pte)) != 0) |
104 | #define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) |
104 | #define PTE_PRESENT_ARCH(pte) ((pte)->p != 0) |
105 | #define PTE_GET_FRAME_ARCH(pte) ((pte)->pfn<<12) |
105 | #define PTE_GET_FRAME_ARCH(pte) ((pte)->pfn<<12) |
106 | #define PTE_WRITABLE_ARCH(pte) ((pte)->w != 0) |
106 | #define PTE_WRITABLE_ARCH(pte) ((pte)->w != 0) |
107 | #define PTE_EXECUTABLE_ARCH(pte) 1 |
107 | #define PTE_EXECUTABLE_ARCH(pte) 1 |
108 | 108 |