Changeset 646 for soft/giet_vm/giet_boot
- Timestamp:
- Jul 22, 2015, 1:07:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_boot/boot.c
r631 r646 1225 1225 _set_mmu_ptpr( (unsigned int)(_ptabs_paddr[vspace_id][x][y] >> 13) ); 1226 1226 1227 // ctx_norun depends on the vspace active field 1228 unsigned int ctx_norun = (vspace[vspace_id].active == 0); 1229 1227 1230 // loop on the tasks in vspace (task_id is the global index in mapping) 1228 1231 for (task_id = vspace[vspace_id].task_offset; … … 1241 1244 unsigned int ctx_ptab = _ptabs_vaddr[vspace_id][req_x][req_y]; 1242 1245 1243 // ctx_e pc: Get the virtual address of the memory location containing1246 // ctx_entry : Get the virtual address of the memory location containing 1244 1247 // the task entry point : the start_vector is stored by GCC in the 1245 1248 // seg_data segment, and we must wait the .elf loading to get 1246 1249 // the entry point value... 1247 1250 vseg_id = vspace[vspace_id].start_vseg_id; 1248 unsigned int ctx_e pc= vseg[vseg_id].vbase + (task[task_id].startid)*4;1251 unsigned int ctx_entry = vseg[vseg_id].vbase + (task[task_id].startid)*4; 1249 1252 1250 1253 // ctx_sp : Get the vseg containing the stack … … 1266 1269 unsigned int ltid = psched->tasks; 1267 1270 1268 // update the "tasks" and "current" fieldsin scheduler:1271 // update the "tasks" field in scheduler: 1269 1272 psched->tasks = ltid + 1; 1270 psched->current = 0;1271 1273 1272 1274 // initializes the task context … … 1274 1276 psched->context[ltid][CTX_SR_ID] = GIET_SR_INIT_VALUE; 1275 1277 psched->context[ltid][CTX_SP_ID] = ctx_sp; 1276 psched->context[ltid][CTX_E PC_ID] = ctx_epc;1278 psched->context[ltid][CTX_ENTRY_ID] = ctx_entry; 1277 1279 psched->context[ltid][CTX_PTPR_ID] = ctx_ptpr; 1278 1280 psched->context[ltid][CTX_PTAB_ID] = ctx_ptab; … … 1281 1283 psched->context[ltid][CTX_TRDID_ID] = thread_id; 1282 1284 psched->context[ltid][CTX_VSID_ID] = vspace_id; 1283 psched->context[ltid][CTX_NORUN_ID] = 0;1285 psched->context[ltid][CTX_NORUN_ID] = ctx_norun; 1284 1286 1285 1287 psched->context[ltid][CTX_TTY_ID] = 0xFFFFFFFF; … … 1300 1302 " - ctx[SR] = %x\n" 1301 1303 " - ctx[SP] = %x\n" 1302 " - ctx[E PC]= %x\n"1304 " - ctx[ENTRY] = %x\n" 1303 1305 " - ctx[PTPR] = %x\n" 1304 1306 " - ctx[PTAB] = %x\n" 1305 1307 " - ctx[VSID] = %d\n" 1306 " - ctx[TRDID] = %d\n", 1308 " - ctx[TRDID] = %d\n" 1309 " - ctx[NORUN] = %x\n", 1307 1310 task[task_id].name, 1308 1311 vspace[vspace_id].name, … … 1311 1314 psched->context[ltid][CTX_SR_ID], 1312 1315 psched->context[ltid][CTX_SP_ID], 1313 psched->context[ltid][CTX_E PC_ID],1316 psched->context[ltid][CTX_ENTRY_ID], 1314 1317 psched->context[ltid][CTX_PTPR_ID], 1315 1318 psched->context[ltid][CTX_PTAB_ID], 1316 1319 psched->context[ltid][CTX_VSID_ID], 1317 psched->context[ltid][CTX_TRDID_ID] ); 1320 psched->context[ltid][CTX_TRDID_ID], 1321 psched->context[ltid][CTX_NORUN_ID] ); 1318 1322 #endif 1319 1323 } // end if FIT … … 1936 1940 _set_sr( 0 ); 1937 1941 1938 // Each pro ocessor get kernel entry virtual address1942 // Each processor get kernel entry virtual address 1939 1943 unsigned int kernel_entry = (unsigned int)&kernel_init_vbase; 1940 1944
Note: See TracChangeset
for help on using the changeset viewer.