- Timestamp:
- Jul 18, 2017, 10:29:58 AM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_boot.h
r193 r224 144 144 (CLUSTER_MIN_VA(n) + CLUSTER_VA_SIZE) 145 145 146 /* Macros indicating the VA ranges for the local cluster*/ 147 #define LOCAL_CLUSTER_MIN_VA HAL_VA_LOCAL_CLUSTER 148 #define LOCAL_CLUSTER_MAX_VA (LOCAL_CLUSTER_MIN_VA + CLUSTER_VA_SIZE) 149 -
trunk/hal/x86_64/core/hal_gpt.c
r150 r224 224 224 XASSERT(kimg_size % PAGE_SIZE == 0); 225 225 226 /* Create cluster0's page tree */ 226 /* 227 * Create cluster0's page tree, enter the space, and unmap the area 228 * below the kernel. 229 */ 227 230 hal_gpt_maptree_area(CLUSTER_MIN_VA(0), CLUSTER_MIN_VA(0) + CLUSTER_PA_SIZE); 228 229 /* Enter cluster0's space */230 231 hal_gpt_enter_range(CLUSTER_MIN_VA(0), 0, CLUSTER_PA_SIZE / PAGE_SIZE); 231 232 /* Unmap the area below the kernel */233 232 hal_gpt_leave_range(CLUSTER_MIN_VA(0), (KERNTEXTOFF - KERNBASE) / PAGE_SIZE); 233 234 /* 235 * Do the same, but now in the local cluster map. 236 */ 237 hal_gpt_maptree_area(LOCAL_CLUSTER_MIN_VA, LOCAL_CLUSTER_MIN_VA + CLUSTER_PA_SIZE); 238 hal_gpt_enter_range(LOCAL_CLUSTER_MIN_VA, 0, CLUSTER_PA_SIZE / PAGE_SIZE); 239 hal_gpt_leave_range(LOCAL_CLUSTER_MIN_VA, (KERNTEXTOFF - KERNBASE) / PAGE_SIZE); 234 240 } 235 241 -
trunk/hal/x86_64/core/hal_init.c
r203 r224 300 300 x86_printf("[+] cput_tls_init called\n"); 301 301 302 mytest = 0; 302 303 x86_printf("-> mytest = %z\n", mytest); 303 304 void *hoho = &init_x86_64; -
trunk/hal/x86_64/core/hal_types.h
r145 r224 196 196 197 197 /* virtual */ 198 #define HAL_VA_LOCAL_CLUSTER 0xffffe00000000000ULL 198 199 #define HAL_VA_BASE 0xffff800000000000ULL 199 200 #define PTR_MASK 0x0000000FFFFFFFFFULL … … 201 202 #define PTR_SHIFT 36 202 203 #define GET_CXY(xp) ((cxy_t)(((xp) & CXY_MASK) >> PTR_SHIFT)) 203 #define GET_PTR(xp) ((void*)( (xp) & PTR_MASK))204 #define GET_PTR(xp) ((void*)(HAL_VA_LOCAL_CLUSTER | ((xp) & PTR_MASK))) 204 205 #define XPTR(cxy,ptr) ((uint64_t)HAL_VA_BASE | \ 205 206 ((uint64_t)(cxy) << PTR_SHIFT) | \
Note: See TracChangeset
for help on using the changeset viewer.