Ignore:
Timestamp:
Jul 4, 2012, 2:51:18 PM (12 years ago)
Author:
alain
Message:

Introducing various modifications in kernel initialisation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/sys_handler.c

    r163 r165  
    8383    _puts(" on processor ");
    8484    _putw( proc_id );
     85    _puts("\n\n");
    8586
    8687    /* infinite loop */
     
    9697    unsigned int ret;
    9798    asm volatile("mfc0 %0, $15, 1" : "=r"(ret));
    98     return (ret & 0x3FF);
     99    return (ret & 0xFFF);
    99100}
    100101//////////////////////////////////////////////////////////////////////////////
     
    132133/////////////////////////////////////////////////////////////////////////////
    133134// _vobj_get_vbase()
     135// This function writes in vobj_buffer the virtual base address of a vobj
     136// identified by the (vspace_name / vobj_name ) couple.
     137// The vobj_type argument is redundant, and for checking purpose.
    134138// returns 0: success, else: failed.
    135 // return the virtual base address of a vobj identified by the (vspace_name / channel_name ) couple.
    136 // The "type" argument is here for checking purpose.
    137139/////////////////////////////////////////////////////////////////////////////
    138 unsigned int _vobj_get_vbase( char* vspace_name, char* vobj_name,
    139                         unsigned vobj_type, unsigned int* vobj_buffer)
     140unsigned int _vobj_get_vbase( char*                     vspace_name,
     141                              char*                     vobj_name,
     142                              unsigned int      vobj_type,
     143                              unsigned int* vobj_vaddr )
    140144{
    141145    mapping_header_t* header = (mapping_header_t*)&seg_mapping_base;
     
    153157        {
    154158            // scan vobjs
    155             for(vobj_id= vspace[vspace_id].vobj_offset; vobj_id < (vspace[vspace_id].vobj_offset + vspace[vspace_id].vobjs); vobj_id++)
     159            for( vobj_id = vspace[vspace_id].vobj_offset;
     160                 vobj_id < (vspace[vspace_id].vobj_offset + vspace[vspace_id].vobjs);
     161                 vobj_id++)
    156162            {
    157163
     
    159165                {
    160166                    if(vobj[vobj_id].type != vobj_type)
    161                         return -1;//wrong type
     167                        return -1;                                                      //wrong type
    162168
    163                     *vobj_buffer = (unsigned int)vobj[vobj_id].vaddr;
     169                    *vobj_vaddr = (unsigned int)vobj[vobj_id].vaddr;
    164170                    return 0;
    165171                }
     
    167173        }
    168174    }
    169     return -2;//not found
     175    return -2;          //not found
    170176}
    171177
Note: See TracChangeset for help on using the changeset viewer.