Changeset 47 for trunk/hal/x86_64/hal_boot.h
- Timestamp:
- Jun 26, 2017, 11:48:28 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/hal_boot.h
r44 r47 24 24 #define PGSHIFT 12 25 25 26 #define KERNBASE 0xfffff fff8000000027 #define KERNBASE_HI 0xfffff fff28 #define KERNBASE_LO 0x 8000000026 #define KERNBASE 0xfffff00000000000 27 #define KERNBASE_HI 0xfffff000 28 #define KERNBASE_LO 0x00000000 29 29 30 #define KERNTEXTOFF 0xfffff fff8020000031 #define KERNTEXTOFF_HI 0xfffff fff32 #define KERNTEXTOFF_LO 0x 8020000030 #define KERNTEXTOFF 0xfffff00000200000 31 #define KERNTEXTOFF_HI 0xfffff000 32 #define KERNTEXTOFF_LO 0x00200000 33 33 34 34 /* -------------------------------------------------------------------------- */ … … 109 109 110 110 #define L4_SLOT_PTE 255 111 #define L4_SLOT_KERN 256 112 #define L4_SLOT_KERNBASE 511 111 #define L4_SLOT_KERNBASE 480 113 112 114 113 /* … … 116 115 * L2 = (KERNBASE % NBPD_L3) / NBPD_L2 117 116 */ 118 #define L3_SLOT_KERNBASE 510117 #define L3_SLOT_KERNBASE 0 119 118 #define L2_SLOT_KERNBASE 0 120 119 121 #define PDIR_SLOT_KERN L4_SLOT_KERN122 120 #define PDIR_SLOT_PTE L4_SLOT_PTE 123 121 … … 132 130 /* -------------------------------------------------------------------------- */ 133 131 134 /* 135 * There are two arrays: one for the heap, one for the kernel image. They are 136 * separated by 64TB of VA, which is more than enough to avoid collision. 137 */ 138 #define CLUSTERS_HEAP_BASE_VA 0xffff800000000000 139 #define CLUSTERS_KIMG_BASE_VA 0xffffc00000000000 132 #define KERNEL_VA_SIZE (NKL2_KIMG_ENTRIES * NBPD_L2) 133 #define CLUSTERS_BASE_VA 0xffff800000000000 140 134 141 135 /* These parameters are configurable. */ 142 #define CLUSTER_ HEAP_VA_SIZE 0x100000000 /* 4GB */143 #define CLUSTER_ HEAP_PA_SIZE 0x200000000 /* 8GB */136 #define CLUSTER_VA_SIZE 0x100000000 /* 4GB */ 137 #define CLUSTER_PA_SIZE 0x200000000 /* 8GB */ 144 138 145 /* These parameters are *not* configurable. */ 146 #define CLUSTER_KIMG_VA_SIZE 0x80000000 /* 2GB */ 139 /* Macros to get the VA ranges for a cluster */ 140 #define CLUSTER_MIN_VA(n) \ 141 (CLUSTERS_BASE_VA + n * CLUSTER_VA_SIZE) 142 #define CLUSTER_MAX_VA(n) \ 143 (CLUSTER_MIN_VA(n) + CLUSTER_VA_SIZE) 147 144 148 /* Macros to get the heap/kimg ranges for a cluster */149 #define CLUSTER_HEAP_MIN_VA(n) \150 (CLUSTERS_HEAP_BASE_VA + n * CLUSTER_HEAP_VA_SIZE)151 #define CLUSTER_HEAP_MAX_VA(n) \152 (CLUSTER_HEAP_MIN_VA(n) + CLUSTER_HEAP_VA_SIZE)153 #define CLUSTER_KIMG_MIN_VA(n) \154 (CLUSTERS_KIMG_BASE_VA + n * CLUSTER_KIMG_VA_SIZE)155 #define CLUSTER_KIMG_MAX_VA(n) \156 (CLUSTER_KIMG_MIN_VA(n) + CLUSTER_KIMG_VA_SIZE)157
Note: See TracChangeset
for help on using the changeset viewer.