Changeset 68 for trunk/kernel/mm/vmm.c


Ignore:
Timestamp:
Jun 27, 2017, 10:24:13 AM (7 years ago)
Author:
alain
Message:

Fix bug in kernel_init, and reduce size of remote_fifo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vmm.c

    r50 r68  
    616616
    617617
    618 //////////////////////////////////////////
    619 error_t vmm_map_vseg( vseg_t    * vseg,
    620                       uint32_t    attr )
     618//////////////////////////////////////////////
     619error_t vmm_map_kernel_vseg( vseg_t    * vseg,
     620                             uint32_t    attr )
    621621{
    622622    vpn_t       vpn;        // VPN of PTE to be set
     
    628628    error_t     error;
    629629
    630     // check vseg type
     630    // check vseg type : must be a kernel vseg
    631631    uint32_t type = vseg->type;
    632     if( (type != VSEG_TYPE_KCODE) && (type != VSEG_TYPE_KDATA) && (type != VSEG_TYPE_KDEV) )
    633     {
    634         printk("\n[PANIC] in %s : not a kernel vseg\n", __FUNCTION__ );
    635         hal_core_sleep();
    636     }
     632    assert( ((type==VSEG_TYPE_KCODE) || (type==VSEG_TYPE_KDATA) || (type==VSEG_TYPE_KDEV)),
     633            __FUNCTION__ , "not a kernel vseg\n" );
    637634
    638635    // get pointer on page table
     
    648645        for( vpn = vpn_min ; vpn < vpn_max ; vpn++ )
    649646        {
     647        // allocate a physical page from local PPM
    650648            kmem_req_t req;
    651649            req.type  = KMEM_PAGE;
     
    782780
    783781    // this function must be called by a thread running in the reference cluster
    784     if( GET_CXY( process->ref_xp ) != local_cxy );
    785     {
    786         printk("\n[PANIC] in %s : not called in the reference cluster\n", __FUNCTION__ );
    787         hal_core_sleep();
    788     }
     782    assert( (GET_CXY( process->ref_xp ) == local_cxy ) , __FUNCTION__ ,
     783             " not called in the reference cluster\n" );
    789784
    790785    // get VMM pointer
     
    954949}  // end vmm_v2p_translate()
    955950
    956 //////////////////////////////////////////////
    957951
    958952
Note: See TracChangeset for help on using the changeset viewer.