- Timestamp:
- Jul 5, 2017, 3:14:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_gpt.c
r147 r148 63 63 void hal_gpt_bootstrap_reset() 64 64 { 65 size_t npages = (va_avail - (CLUSTER_MIN_VA(0) + KERNEL_VA_SIZE)) / PAGE_SIZE; 66 hal_gpt_leave_range(CLUSTER_MIN_VA(0) + KERNEL_VA_SIZE, npages); 65 /* 66 * Re-enter cluster0's space, because we altered it when mapping the ACPI 67 * tables. 68 */ 69 hal_gpt_enter_range(CLUSTER_MIN_VA(0), 0, CLUSTER_PA_SIZE / PAGE_SIZE); 70 67 71 va_avail = CLUSTER_MIN_VA(0) + KERNEL_VA_SIZE; 68 72 } … … 124 128 * enter these addresses to physical locations. 125 129 * 126 * This function sis a bit complicated, and may need to be revisited.130 * This function is a bit complicated, and may need to be revisited. 127 131 */ 128 132 void hal_gpt_maptree_area(vaddr_t va_start, vaddr_t va_end) … … 226 230 227 231 /* Create cluster0's page tree */ 228 hal_gpt_maptree_area(CLUSTER_MIN_VA(0), CLUSTER_MAX_VA(0)); 229 230 /* Manually enter cluster0's kimg */ 231 hal_gpt_enter_range(CLUSTER_MIN_VA(0), kimg_min_pa, kimg_size / PAGE_SIZE); 232 233 /* Manually enter cluster0's heap */ 234 hal_gpt_enter_range(CLUSTER_MIN_VA(0) + kimg_size, kimg_max_pa, 235 (CLUSTER_VA_SIZE - kimg_size) / PAGE_SIZE); 232 hal_gpt_maptree_area(CLUSTER_MIN_VA(0), CLUSTER_MIN_VA(0) + CLUSTER_PA_SIZE); 233 234 /* Enter cluster0's space */ 235 hal_gpt_enter_range(CLUSTER_MIN_VA(0), 0, CLUSTER_PA_SIZE / PAGE_SIZE); 236 236 237 237 /* Unmap the area below the kernel */
Note: See TracChangeset
for help on using the changeset viewer.