Changeset 696 for soft/giet_vm/giet_kernel/sys_handler.c
- Timestamp:
- Aug 7, 2015, 5:42:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/sys_handler.c
r695 r696 277 277 mapping_vspace_t * vspace = _get_vspace_base(header); 278 278 mapping_task_t * task = _get_task_base(header); 279 mapping_vseg_t * vseg = _get_vseg_base(header);280 279 281 280 unsigned int vspace_id; 282 281 unsigned int task_id; 283 unsigned int vseg_id;284 285 282 unsigned int y_size = header->y_size; 286 283 … … 307 304 unsigned int ltid = task[task_id].ltid; 308 305 309 // get scheduler pointer for theprocessor running the task306 // get scheduler pointer for processor running the task 310 307 static_scheduler_t* psched = (static_scheduler_t*)_schedulers[x][y][p]; 311 308 312 // sp_value : initial stack pointer 313 vseg_id = task[task_id].stack_vseg_id; 314 unsigned int sp_value = vseg[vseg_id].vbase + vseg[vseg_id].length; 315 316 // epc value : task entry point 317 unsigned int epc_value = psched->context[ltid][CTX_ENTRY_ID]; 318 319 // ra_value : initial return address 320 unsigned int ra_value = (unsigned int)(&_ctx_eret); 321 322 // initialise task context: RA / SR / EPC / SP / NORUN slots 323 psched->context[ltid][CTX_RA_ID] = ra_value; 324 psched->context[ltid][CTX_SR_ID] = GIET_SR_INIT_VALUE; 325 psched->context[ltid][CTX_SP_ID] = sp_value; 326 psched->context[ltid][CTX_EPC_ID] = epc_value; 327 psched->context[ltid][CTX_NORUN_ID] = 0; 309 // set EXEC signal bit 310 _atomic_or( &psched->context[ltid][CTX_SIG_ID] , SIG_MASK_EXEC ); 311 } 328 312 329 313 #if GIET_DEBUG_EXEC 330 314 if ( _get_proctime() > GIET_DEBUG_EXEC ) 331 _printf("\n[DEBUG EXEC] _sys_exec_application() start task %d on P[%d,%d,%d]\n" 332 " - ctx_ra = %x\n" 333 " - ctx_sp = %x\n" 334 " - ctx_epc = %x\n", 335 task_id , x , y , p , ra_value , sp_value , epc_value ); 336 #endif 337 } 338 339 #if GIET_DEBUG_EXEC 340 if ( _get_proctime() > GIET_DEBUG_EXEC ) 341 _printf("\n[DEBUG EXEC] exit _sys_exec_application() at cycle %d : %s activated\n", 315 _printf("\n[DEBUG EXEC] exit _sys_exec_application() at cycle %d : %s will be executed\n", 342 316 _get_proctime() , name ); 343 317 #endif
Note: See TracChangeset
for help on using the changeset viewer.