Rev 1888 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1888 | Rev 2007 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | #include <arch/mm/frame.h> |
39 | #include <arch/mm/frame.h> |
40 | 40 | ||
41 | #define PAGE_SIZE FRAME_SIZE |
41 | #define PAGE_SIZE FRAME_SIZE |
42 | #define PAGE_WIDTH FRAME_WIDTH |
42 | #define PAGE_WIDTH FRAME_WIDTH |
43 | 43 | ||
- | 44 | #define PAGE_COLOR_BITS 0 /* dummy */ |
|
44 | 45 | ||
45 | #ifdef KERNEL |
46 | #ifdef KERNEL |
46 | 47 | ||
47 | /** Bit width of the TLB-locked portion of kernel address space. */ |
48 | /** Bit width of the TLB-locked portion of kernel address space. */ |
48 | #define KERNEL_PAGE_WIDTH 28 /* 256M */ |
49 | #define KERNEL_PAGE_WIDTH 28 /* 256M */ |
49 | 50 | ||
50 | #define PPN_SHIFT 12 |
51 | #define PPN_SHIFT 12 |
51 | 52 | ||
52 | #define VRN_SHIFT 61 |
53 | #define VRN_SHIFT 61 |
53 | #define VRN_MASK (7LL << VRN_SHIFT) |
54 | #define VRN_MASK (7LL << VRN_SHIFT) |
Line 62... | Line 63... | ||
62 | #define REGION_REGISTERS 8 |
63 | #define REGION_REGISTERS 8 |
63 | 64 | ||
64 | #define KA2PA(x) ((uintptr_t) (x-(VRN_KERNEL<<VRN_SHIFT))) |
65 | #define KA2PA(x) ((uintptr_t) (x-(VRN_KERNEL<<VRN_SHIFT))) |
65 | #define PA2KA(x) ((uintptr_t) (x+(VRN_KERNEL<<VRN_SHIFT))) |
66 | #define PA2KA(x) ((uintptr_t) (x+(VRN_KERNEL<<VRN_SHIFT))) |
66 | 67 | ||
67 | #define VHPT_WIDTH 20 /* 1M */ |
68 | #define VHPT_WIDTH 20 /* 1M */ |
68 | #define VHPT_SIZE (1 << VHPT_WIDTH) |
69 | #define VHPT_SIZE (1 << VHPT_WIDTH) |
69 | 70 | ||
70 | #define PTA_BASE_SHIFT 15 |
71 | #define PTA_BASE_SHIFT 15 |
71 | 72 | ||
72 | /** Memory Attributes. */ |
73 | /** Memory Attributes. */ |