Changeset 218 for soft/giet_vm/sys/kernel_init.c
- Timestamp:
- Sep 19, 2012, 10:52:43 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/kernel_init.c
r216 r218 33 33 34 34 /////////////////////////////////////////////////////////////////////////////////// 35 // Kernel Global variables35 // array of pointers on the page tables (both virtual and physical addresses) 36 36 /////////////////////////////////////////////////////////////////////////////////// 37 37 … … 42 42 unsigned int _ptabs_vaddr[GIET_NB_VSPACE_MAX]; 43 43 44 /////////////////////////////////////////////////////////////////////////////////// 45 // array of pointers on the schedulers (physical addresses) 46 /////////////////////////////////////////////////////////////////////////////////// 47 44 48 __attribute__((section (".kdata"))) 45 49 static_scheduler_t* _schedulers_paddr[NB_CLUSTERS*NB_PROCS_MAX]; 50 51 /////////////////////////////////////////////////////////////////////////////////// 52 // staks for the "idle" tasks (256 bytes for each processor) 53 /////////////////////////////////////////////////////////////////////////////////// 46 54 47 55 __attribute__((section (".kdata"))) … … 201 209 } 202 210 203 // step 5 : initialise the "idle" task context211 // step 5 : initialise, for each processor, the "idle" task context: 204 212 // the SR initialisation value is 0xFF03 because 205 // the task _ctx_idle() executes in kernel mode. ..213 // the task _ctx_idle() executes in kernel mode. 206 214 // it uses the page table of vspace[0] 215 // the stack size is 256 bytes 207 216 208 217 _set_context_slot( IDLE_TASK_INDEX, CTX_RUN_ID, 1 ); 209 218 _set_context_slot( IDLE_TASK_INDEX, CTX_SR_ID, 0xFF03 ); 210 _set_context_slot( IDLE_TASK_INDEX, CTX_SP_ID, (unsigned int) &_idle_stack[global_pid] + 64);219 _set_context_slot( IDLE_TASK_INDEX, CTX_SP_ID, (unsigned int)_idle_stack + (global_pid<<8) ); 211 220 _set_context_slot( IDLE_TASK_INDEX, CTX_RA_ID, (unsigned int)&_ctx_eret ); 212 221 _set_context_slot( IDLE_TASK_INDEX, CTX_EPC_ID, (unsigned int)&_ctx_idle ); … … 233 242 234 243 _get_lock( &_tty_put_lock ); 235 _puts("\n 244 _puts("\n[GIET WARNING] No task allocated to processor "); 236 245 _putd( global_pid ); 237 246 _puts(" => idle\n");
Note: See TracChangeset
for help on using the changeset viewer.