Changeset 679 for trunk/hal/tsar_mips32/core/hal_gpt.c
- Timestamp:
- Nov 20, 2020, 12:30:31 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_gpt.c
r658 r679 152 152 153 153 // check page size 154 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , "the TSAR page size must be 4 Kbytes\n" );154 assert( __FUNCTION__, (CONFIG_PPM_PAGE_SIZE == 4096) , "the TSAR page size must be 4 Kbytes\n" ); 155 155 156 156 // allocates 2 physical pages for PT1 … … 423 423 424 424 // check PTE1 : only small and mapped pages can be locked 425 assert( (pte1 & (TSAR_PTE_SMALL | TSAR_PTE_MAPPED)) , "cannot lock a big or unmapped page\n");425 assert( __FUNCTION__, (pte1 & (TSAR_PTE_SMALL | TSAR_PTE_MAPPED)) , "cannot lock a big or unmapped page\n"); 426 426 427 427 #if DEBUG_HAL_GPT_LOCK_PTE … … 537 537 pte1 = hal_remote_l32( pte1_xp ); 538 538 539 assert( ((pte1 & TSAR_PTE_MAPPED) != 0),539 assert( __FUNCTION__, ((pte1 & TSAR_PTE_MAPPED) != 0), 540 540 "PTE1 for vpn %x in cluster %x is unmapped / pte1 = %x\n", vpn, gpt_cxy, pte1 ); 541 541 542 assert( ((pte1 & TSAR_PTE_SMALL ) != 0),542 assert( __FUNCTION__, ((pte1 & TSAR_PTE_SMALL ) != 0), 543 543 "PTE1 for vpn %x in cluster %x is not small / pte1 = %x\n", vpn, gpt_cxy, pte1 ); 544 544 … … 553 553 pte2_attr = hal_remote_l32( pte2_xp ); 554 554 555 assert( ((pte2_attr & TSAR_PTE_LOCKED) != 0),555 assert( __FUNCTION__, ((pte2_attr & TSAR_PTE_LOCKED) != 0), 556 556 "PTE2 for vpn %x in cluster %x is unlocked / pte2_attr = %x\n", vpn, gpt_cxy, pte2_attr ); 557 557 … … 630 630 631 631 // check PT1 entry not mapped 632 assert( (pte1 == 0) , "try to set a big page in an already mapped PTE1\n" );632 assert( __FUNCTION__, (pte1 == 0) , "try to set a big page in an already mapped PTE1\n" ); 633 633 634 634 // check VPN aligned 635 assert( (ix2 == 0) , "illegal vpn for a big page\n" );635 assert( __FUNCTION__, (ix2 == 0) , "illegal vpn for a big page\n" ); 636 636 637 637 // check PPN aligned 638 assert( ((ppn & 0x1FF) == 0) , "illegal ppn for a big page\n" );638 assert( __FUNCTION__, ((ppn & 0x1FF) == 0) , "illegal ppn for a big page\n" ); 639 639 640 640 // set the PTE1 value in PT1 … … 654 654 655 655 // PTE1 must be mapped because PTE2 must be locked 656 assert( (pte1 & TSAR_PTE_MAPPED),656 assert( __FUNCTION__, (pte1 & TSAR_PTE_MAPPED), 657 657 "PTE1 for vpn %x in cluster %x must be mapped / pte1 = %x\n", vpn, gpt_cxy, pte1 ); 658 658 … … 669 669 670 670 // PTE2 must be locked 671 assert( (pte2_attr & TSAR_PTE_LOCKED),671 assert( __FUNCTION__, (pte2_attr & TSAR_PTE_LOCKED), 672 672 "PTE2 for vpn %x in cluster %x must be locked / pte2_attr = %x\n", vpn, gpt_cxy, pte2_attr ); 673 673 … … 894 894 895 895 // check src_pt1 and dst_pt1 existence 896 assert( (src_pt1 != NULL) , "src_pt1 does not exist\n");897 assert( (dst_pt1 != NULL) , "dst_pt1 does not exist\n");896 assert( __FUNCTION__, (src_pt1 != NULL) , "src_pt1 does not exist\n"); 897 assert( __FUNCTION__, (dst_pt1 != NULL) , "dst_pt1 does not exist\n"); 898 898 899 899 // compute SRC indexes … … 1143 1143 1144 1144 // check MAPPED, SMALL, and not LOCKED in attr argument 1145 assert( ((attr & GPT_MAPPED) != 0), "attribute MAPPED must be set in new attributes\n" );1146 assert( ((attr & GPT_SMALL ) != 0), "attribute SMALL must be set in new attributes\n" );1147 assert( ((attr & GPT_LOCKED) == 0), "attribute LOCKED must not be set in new attributes\n" );1145 assert( __FUNCTION__, ((attr & GPT_MAPPED) != 0), "attribute MAPPED must be set in new attributes\n" ); 1146 assert( __FUNCTION__, ((attr & GPT_SMALL ) != 0), "attribute SMALL must be set in new attributes\n" ); 1147 assert( __FUNCTION__, ((attr & GPT_LOCKED) == 0), "attribute LOCKED must not be set in new attributes\n" ); 1148 1148 1149 1149 // get cluster and local pointer on remote GPT … … 1162 1162 1163 1163 // check MAPPED and SMALL in target PTE1 1164 assert( ((pte1 & TSAR_PTE_MAPPED) != 0), "attribute MAPPED must be set in target PTE1\n" );1165 assert( ((pte1 & TSAR_PTE_SMALL ) != 0), "attribute SMALL must be set in target PTE1\n" );1164 assert( __FUNCTION__, ((pte1 & TSAR_PTE_MAPPED) != 0), "attribute MAPPED must be set in target PTE1\n" ); 1165 assert( __FUNCTION__, ((pte1 & TSAR_PTE_SMALL ) != 0), "attribute SMALL must be set in target PTE1\n" ); 1166 1166 1167 1167 // get PT2 base … … 1175 1175 1176 1176 // check MAPPED in target PTE2 1177 assert( ((hal_remote_l32(pte2_attr_xp) & TSAR_PTE_MAPPED) != 0),1177 assert( __FUNCTION__, ((hal_remote_l32(pte2_attr_xp) & TSAR_PTE_MAPPED) != 0), 1178 1178 "attribute MAPPED must be set in target PTE2\n" ); 1179 1179
Note: See TracChangeset
for help on using the changeset viewer.