Index: /soft/giet_vm/giet_boot/boot.c
===================================================================
--- /soft/giet_vm/giet_boot/boot.c	(revision 645)
+++ /soft/giet_vm/giet_boot/boot.c	(revision 646)
@@ -1225,4 +1225,7 @@
         _set_mmu_ptpr( (unsigned int)(_ptabs_paddr[vspace_id][x][y] >> 13) );
 
+        // ctx_norun depends on the vspace active field
+        unsigned int ctx_norun = (vspace[vspace_id].active == 0);
+
         // loop on the tasks in vspace (task_id is the global index in mapping)
         for (task_id = vspace[vspace_id].task_offset;
@@ -1241,10 +1244,10 @@
             unsigned int ctx_ptab = _ptabs_vaddr[vspace_id][req_x][req_y];
 
-            // ctx_epc : Get the virtual address of the memory location containing
+            // ctx_entry : Get the virtual address of the memory location containing
             // the task entry point : the start_vector is stored by GCC in the 
             // seg_data segment, and we must wait the .elf loading to get 
             // the entry point value...
             vseg_id = vspace[vspace_id].start_vseg_id;     
-            unsigned int ctx_epc = vseg[vseg_id].vbase + (task[task_id].startid)*4;
+            unsigned int ctx_entry = vseg[vseg_id].vbase + (task[task_id].startid)*4;
 
             // ctx_sp :  Get the vseg containing the stack 
@@ -1266,7 +1269,6 @@
                     unsigned int ltid = psched->tasks;
 
-                    // update the "tasks" and "current" fields in scheduler:
+                    // update the "tasks" field in scheduler:
                     psched->tasks   = ltid + 1;
-                    psched->current = 0;
 
                     // initializes the task context 
@@ -1274,5 +1276,5 @@
                     psched->context[ltid][CTX_SR_ID]     = GIET_SR_INIT_VALUE;
                     psched->context[ltid][CTX_SP_ID]     = ctx_sp;
-                    psched->context[ltid][CTX_EPC_ID]    = ctx_epc;
+                    psched->context[ltid][CTX_ENTRY_ID]  = ctx_entry;
                     psched->context[ltid][CTX_PTPR_ID]   = ctx_ptpr;
                     psched->context[ltid][CTX_PTAB_ID]   = ctx_ptab;
@@ -1281,5 +1283,5 @@
                     psched->context[ltid][CTX_TRDID_ID]  = thread_id;
                     psched->context[ltid][CTX_VSID_ID]   = vspace_id;
-                    psched->context[ltid][CTX_NORUN_ID]  = 0;
+                    psched->context[ltid][CTX_NORUN_ID]  = ctx_norun;
 
                     psched->context[ltid][CTX_TTY_ID]    = 0xFFFFFFFF;
@@ -1300,9 +1302,10 @@
         " - ctx[SR]    = %x\n"
         " - ctx[SP]    = %x\n"
-        " - ctx[EPC]   = %x\n"
+        " - ctx[ENTRY] = %x\n"
         " - ctx[PTPR]  = %x\n"
         " - ctx[PTAB]  = %x\n"
         " - ctx[VSID]  = %d\n"
-        " - ctx[TRDID] = %d\n",
+        " - ctx[TRDID] = %d\n"
+        " - ctx[NORUN] = %x\n",
         task[task_id].name,
         vspace[vspace_id].name,
@@ -1311,9 +1314,10 @@
         psched->context[ltid][CTX_SR_ID],
         psched->context[ltid][CTX_SP_ID],
-        psched->context[ltid][CTX_EPC_ID],
+        psched->context[ltid][CTX_ENTRY_ID],
         psched->context[ltid][CTX_PTPR_ID],
         psched->context[ltid][CTX_PTAB_ID],
         psched->context[ltid][CTX_VSID_ID],
-        psched->context[ltid][CTX_TRDID_ID] );
+        psched->context[ltid][CTX_TRDID_ID],
+        psched->context[ltid][CTX_NORUN_ID] );
 #endif
                 } // end if FIT
@@ -1936,5 +1940,5 @@
     _set_sr( 0 );
 
-    // Each proocessor get kernel entry virtual address
+    // Each processor get kernel entry virtual address
     unsigned int kernel_entry = (unsigned int)&kernel_init_vbase;
 
