Changeset 316 for trunk/hal/x86_64/core/hal_gpt.c
- Timestamp:
- Aug 3, 2017, 12:01:19 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_gpt.c
r272 r316 257 257 { 258 258 page_t *page; 259 xptr_t page_xp; 259 260 260 261 /* check page size */ … … 276 277 } 277 278 279 /* 280 * XXX XXX XXX: can kmem_alloc allocate the page in a remote cluster?? 281 */ 282 page_xp = XPTR(local_cxy, page); 283 278 284 /* populate the kernel entries */ 279 285 pt_entry_t *L4src, *L4dst; … … 281 287 vaddr_t L4vaddr = L4paddr + KERNBASE; // XXX 282 288 L4src = (pt_entry_t *)L4vaddr; 283 L4dst = (pt_entry_t *)ppm_page2 vaddr(page);289 L4dst = (pt_entry_t *)ppm_page2base(page_xp); 284 290 memcpy(&L4dst[256], &L4src[256], 256 * sizeof(pt_entry_t)); 285 L4dst[L4_SLOT_PTE] = (ppm_page2ppn(page ) >> CONFIG_PPM_PAGE_SHIFT) |291 L4dst[L4_SLOT_PTE] = (ppm_page2ppn(page_xp) >> CONFIG_PPM_PAGE_SHIFT) | 286 292 PG_V | PG_KW | PG_NX; 287 293 288 294 /* initialize generic page table descriptor */ 289 gpt->ptr = ppm_page2vaddr(page);290 gpt->ppn = ppm_page2ppn(page );291 gpt->page = page;295 gpt->ptr = GET_PTR(ppm_page2base(page_xp)); 296 gpt->ppn = ppm_page2ppn(page_xp); 297 gpt->page = GET_PTR(page_xp); 292 298 293 299 /* initialize PTE entries attributes masks */
Note: See TracChangeset
for help on using the changeset viewer.