Changeset 165 for soft/giet_vm/sys/sys_handler.c
- Timestamp:
- Jul 4, 2012, 2:51:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/sys_handler.c
r163 r165 83 83 _puts(" on processor "); 84 84 _putw( proc_id ); 85 _puts("\n\n"); 85 86 86 87 /* infinite loop */ … … 96 97 unsigned int ret; 97 98 asm volatile("mfc0 %0, $15, 1" : "=r"(ret)); 98 return (ret & 0x 3FF);99 return (ret & 0xFFF); 99 100 } 100 101 ////////////////////////////////////////////////////////////////////////////// … … 132 133 ///////////////////////////////////////////////////////////////////////////// 133 134 // _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. 134 138 // 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.137 139 ///////////////////////////////////////////////////////////////////////////// 138 unsigned int _vobj_get_vbase( char* vspace_name, char* vobj_name, 139 unsigned vobj_type, unsigned int* vobj_buffer) 140 unsigned int _vobj_get_vbase( char* vspace_name, 141 char* vobj_name, 142 unsigned int vobj_type, 143 unsigned int* vobj_vaddr ) 140 144 { 141 145 mapping_header_t* header = (mapping_header_t*)&seg_mapping_base; … … 153 157 { 154 158 // 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++) 156 162 { 157 163 … … 159 165 { 160 166 if(vobj[vobj_id].type != vobj_type) 161 return -1; //wrong type167 return -1; //wrong type 162 168 163 *vobj_ buffer = (unsigned int)vobj[vobj_id].vaddr;169 *vobj_vaddr = (unsigned int)vobj[vobj_id].vaddr; 164 170 return 0; 165 171 } … … 167 173 } 168 174 } 169 return -2; //not found175 return -2; //not found 170 176 } 171 177
Note: See TracChangeset
for help on using the changeset viewer.