Changeset 53 for trunk/hal/tsar_mips32/hal_gpt.c
- Timestamp:
- Jun 26, 2017, 4:22:00 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/hal_gpt.c
r50 r53 121 121 122 122 // initialize generic page table descriptor 123 gpt->ptr = ppm_page2 base( page );123 gpt->ptr = ppm_page2vaddr( page ); 124 124 gpt->ppn = ppm_page2ppn( page ); 125 125 gpt->page = page; … … 193 193 // get pointer on PT2 194 194 pt2_ppn = TSAR_MMU_PTBA_FROM_PTE1( pte1 ); 195 pt2 = ppm_ppn2 base( pt2_ppn );195 pt2 = ppm_ppn2vaddr( pt2_ppn ); 196 196 197 197 // scan the PT2 to release all entries VALID and USER if reference cluster … … 212 212 // release the PT2 213 213 req.type = KMEM_PAGE; 214 req.ptr = ppm_ base2page( pt2 );214 req.ptr = ppm_vaddr2page( pt2 ); 215 215 kmem_free( &req ); 216 216 } … … 220 220 // release the PT1 221 221 req.type = KMEM_PAGE; 222 req.ptr = ppm_ base2page( pt1 );222 req.ptr = ppm_vaddr2page( pt1 ); 223 223 kmem_free( &req ); 224 224 … … 255 255 { 256 256 pt2_ppn = TSAR_MMU_PTBA_FROM_PTE1( pte1 ); 257 pt2 = ppm_ppn2 base( pt2_ppn );257 pt2 = ppm_ppn2vaddr( pt2_ppn ); 258 258 259 259 // scan the PT2 … … 339 339 } 340 340 pt2_ppn = ppm_page2ppn( page ); 341 pt2 = ppm_page2 base( page );341 pt2 = ppm_page2vaddr( page ); 342 342 343 343 // try to atomicaly set a PTD1 in the PT1 entry … … 361 361 362 362 // compute pointer on PT2 base 363 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );363 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 364 364 } 365 365 } … … 378 378 379 379 // compute pointer on PT2 base 380 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );380 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 381 381 } 382 382 … … 424 424 // compute PT2 base address 425 425 pt2_ppn = TSAR_MMU_PTBA_FROM_PTE1( pte1 ); 426 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );426 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 427 427 428 428 *ppn = pt2[2*ix2+1] & ((1<<TSAR_MMU_PPN_WIDTH)-1); … … 478 478 // compute PT2 base address 479 479 pt2_ppn = TSAR_MMU_PTBA_FROM_PTE1( pte1 ); 480 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );480 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 481 481 482 482 // get PPN … … 548 548 549 549 pt2_ppn = ppm_page2ppn( page ); 550 pt2 = ppm_page2 base( page );550 pt2 = ppm_page2vaddr( page ); 551 551 552 552 // try to set the PT1 entry … … 568 568 // get the PT2 base address 569 569 pt2_ppn = TSAR_MMU_PPN_FROM_PTE1( pte1 ); 570 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );570 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 571 571 } 572 572 } … … 585 585 586 586 // compute pointer on PT2 base 587 pt2 = (uint32_t*)ppm_ppn2 base( pt2_ppn );587 pt2 = (uint32_t*)ppm_ppn2vaddr( pt2_ppn ); 588 588 } 589 589 … … 645 645 // get pointer on PT2 base 646 646 pt2_ppn = TSAR_MMU_PPN_FROM_PTE1( pte1 ); 647 pt2 = ppm_ppn2 base( pt2_ppn );647 pt2 = ppm_ppn2vaddr( pt2_ppn ); 648 648 649 649 // get pointer on PTE2 … … 722 722 723 723 // get pointer on new PT2 in DST_GPT 724 dst_pt2 = (uint32_t *)ppm_page2 base( page );724 dst_pt2 = (uint32_t *)ppm_page2vaddr( page ); 725 725 726 726 // set a new PTD1 in DST_GPT … … 730 730 // get pointer on PT2 in SRC_GPT 731 731 src_pt2_ppn = (ppn_t)TSAR_MMU_PTBA_FROM_PTE1( pte1 ); 732 src_pt2 = (uint32_t *)ppm_ppn2 base( src_pt2_ppn );732 src_pt2 = (uint32_t *)ppm_ppn2vaddr( src_pt2_ppn ); 733 733 734 734 // scan the SRC_PT2
Note: See TracChangeset
for help on using the changeset viewer.