Ignore:
Timestamp:
Nov 20, 2020, 12:30:31 AM (4 years ago)
Author:
alain
Message:

Mainly cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_gpt.c

    r658 r679  
    152152
    153153// check page size
    154 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , "the TSAR page size must be 4 Kbytes\n" );
     154assert( __FUNCTION__, (CONFIG_PPM_PAGE_SIZE == 4096) , "the TSAR page size must be 4 Kbytes\n" );
    155155
    156156    // allocates 2 physical pages for PT1
     
    423423 
    424424// 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");
     425assert( __FUNCTION__, (pte1 & (TSAR_PTE_SMALL | TSAR_PTE_MAPPED)) , "cannot lock a big or unmapped page\n");
    426426
    427427#if DEBUG_HAL_GPT_LOCK_PTE
     
    537537    pte1 = hal_remote_l32( pte1_xp );
    538538
    539 assert( ((pte1 & TSAR_PTE_MAPPED) != 0),
     539assert( __FUNCTION__, ((pte1 & TSAR_PTE_MAPPED) != 0),
    540540"PTE1 for vpn %x in cluster %x is unmapped / pte1 = %x\n", vpn, gpt_cxy, pte1 );
    541541
    542 assert( ((pte1 & TSAR_PTE_SMALL ) != 0),
     542assert( __FUNCTION__, ((pte1 & TSAR_PTE_SMALL ) != 0),
    543543"PTE1 for vpn %x in cluster %x is not small / pte1 = %x\n", vpn, gpt_cxy, pte1 );
    544544
     
    553553    pte2_attr = hal_remote_l32( pte2_xp );
    554554
    555 assert( ((pte2_attr & TSAR_PTE_LOCKED) != 0),
     555assert( __FUNCTION__, ((pte2_attr & TSAR_PTE_LOCKED) != 0),
    556556"PTE2 for vpn %x in cluster %x is unlocked / pte2_attr = %x\n", vpn, gpt_cxy, pte2_attr );
    557557
     
    630630
    631631// check PT1 entry not mapped
    632 assert( (pte1 == 0) , "try to set a big page in an already mapped PTE1\n" );
     632assert( __FUNCTION__, (pte1 == 0) , "try to set a big page in an already mapped PTE1\n" );
    633633
    634634// check VPN aligned
    635 assert( (ix2 == 0) , "illegal vpn for a big page\n" );
     635assert( __FUNCTION__, (ix2 == 0) , "illegal vpn for a big page\n" );
    636636
    637637// check PPN aligned
    638 assert( ((ppn & 0x1FF) == 0) , "illegal ppn for a big page\n" );
     638assert( __FUNCTION__, ((ppn & 0x1FF) == 0) , "illegal ppn for a big page\n" );
    639639
    640640        // set the PTE1 value in PT1
     
    654654
    655655// PTE1 must be mapped because PTE2 must be locked
    656 assert( (pte1 & TSAR_PTE_MAPPED),
     656assert( __FUNCTION__, (pte1 & TSAR_PTE_MAPPED),
    657657"PTE1 for vpn %x in cluster %x must be mapped / pte1 = %x\n", vpn, gpt_cxy, pte1 );
    658658
     
    669669
    670670// PTE2 must be locked
    671 assert( (pte2_attr & TSAR_PTE_LOCKED),
     671assert( __FUNCTION__, (pte2_attr & TSAR_PTE_LOCKED),
    672672"PTE2 for vpn %x in cluster %x must be locked / pte2_attr = %x\n", vpn, gpt_cxy, pte2_attr );
    673673 
     
    894894
    895895    // 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");
    898898
    899899    // compute SRC indexes
     
    11431143
    11441144// 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" );
     1145assert( __FUNCTION__, ((attr & GPT_MAPPED) != 0), "attribute MAPPED must be set in new attributes\n" );
     1146assert( __FUNCTION__, ((attr & GPT_SMALL ) != 0), "attribute SMALL  must be set in new attributes\n" );
     1147assert( __FUNCTION__, ((attr & GPT_LOCKED) == 0), "attribute LOCKED must not be set in new attributes\n" );
    11481148
    11491149    // get cluster and local pointer on remote GPT
     
    11621162
    11631163// 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" );
     1164assert( __FUNCTION__, ((pte1 & TSAR_PTE_MAPPED) != 0), "attribute MAPPED must be set in target PTE1\n" );
     1165assert( __FUNCTION__, ((pte1 & TSAR_PTE_SMALL ) != 0), "attribute SMALL  must be set in target PTE1\n" );
    11661166
    11671167    // get PT2 base
     
    11751175   
    11761176// check MAPPED in target PTE2
    1177 assert( ((hal_remote_l32(pte2_attr_xp) & TSAR_PTE_MAPPED) != 0),
     1177assert( __FUNCTION__, ((hal_remote_l32(pte2_attr_xp) & TSAR_PTE_MAPPED) != 0),
    11781178"attribute MAPPED must be set in target PTE2\n" );
    11791179
Note: See TracChangeset for help on using the changeset viewer.