Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (4 years ago)
Author:
alain
Message:

Fix bugs in exec

File:
1 edited

Legend:

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

    r408 r409  
    131131        page_t   * page;
    132132    xptr_t     page_xp;
    133     vpn_t      vpn;
    134     error_t    error;
    135     uint32_t   attr;
    136133
    137134gpt_dmsg("\n[DBG] %s : core[%x,%d] enter\n",
     
    159156        gpt->ptr  = GET_PTR( ppm_page2base( page_xp ) );
    160157        gpt->ppn  = ppm_page2ppn( page_xp );
    161 
    162     // identity map the kentry_vseg (must exist for all processes)
    163     attr = GPT_MAPPED | GPT_SMALL | GPT_EXECUTABLE | GPT_CACHABLE | GPT_GLOBAL;
    164     for( vpn = CONFIG_VMM_KENTRY_BASE;
    165          vpn < (CONFIG_VMM_KENTRY_BASE + CONFIG_VMM_KENTRY_SIZE); vpn++ )
    166     {
    167 
    168 gpt_dmsg("\n[DBG] %s : identity map vpn %d\n", __FUNCTION__ , vpn );
    169 
    170         error = hal_gpt_set_pte( gpt,
    171                                  vpn,
    172                                  attr,
    173                                  (local_cxy<<20) | (vpn & 0xFFFFF) );
    174 
    175         if( error )
    176         {
    177             printk("\n[ERROR] in %s : cannot identity map kentry vseg\n", __FUNCTION__ );
    178             return ENOMEM;
    179         }
    180     }
    181158
    182159gpt_dmsg("\n[DBG] %s : core[%x,%d] exit\n",
     
    933910    pte2_attr = pt2[2*ix2];
    934911
    935 if( (CURRENT_THREAD == 0xe0000) && (hal_time_stamp() > 5380000) )
    936 printk("\n@@@ %s : vpn = %X / attr = %X\n", __FUNCTION__ , vpn , tsar2gpt( pte2_attr ) );
    937 
    938912    if( (pte2_attr & TSAR_MMU_MAPPED) == 0 ) return false;
    939913
Note: See TracChangeset for help on using the changeset viewer.