Index: trunk/kernel/kern/kernel_init.c
===================================================================
--- trunk/kernel/kern/kernel_init.c	(revision 601)
+++ trunk/kernel/kern/kernel_init.c	(revision 610)
@@ -146,5 +146,5 @@
 
     "THREAD_JOIN",           // 10
-    "VFS_MAIN",              // 11
+    "XHTAB_STATE",           // 11
     "CHDEV_QUEUE",           // 12
     "CHDEV_TXT0",            // 13
@@ -154,5 +154,5 @@
     "CONDVAR_STATE",         // 17
     "SEM_STATE",             // 18
-    "XHTAB_STATE",           // 19
+    "RPOCESS_CWD",           // 19
 
     "unused_20",             // 20
@@ -171,9 +171,9 @@
 
     "MAPPER_STATE",          // 30
-    "PROCESS_CWD",           // 31
-    "VFS_INODE",             // 32
-    "VFS_FILE",              // 33
-    "VMM_VSL",               // 34
-    "VMM_GPT",               // 35
+    "VFS_SIZE",              // 31
+    "VFS_FILE",              // 32
+    "VMM_VSL",               // 33
+    "VMM_GPT",               // 34
+    "VFS_MAIN",              // 35
 };        
 
@@ -970,6 +970,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 0 : TXT0 initialized / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 0 : TXT0 initialized / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1012,6 +1012,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 1 : clusters initialised / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 1 : clusters initialised / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1039,6 +1039,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 2 : PIC initialised / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 2 : PIC initialised / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1072,6 +1072,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 3 : all chdevs initialised / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 3 : all chdevs initialised / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1136,6 +1136,5 @@
  
             // 4. create VFS root inode in cluster 0
-            error = vfs_inode_create( XPTR_NULL,                           // dentry_xp
-                                      FS_TYPE_FATFS,                       // fs_type
+            error = vfs_inode_create( FS_TYPE_FATFS,                       // fs_type
                                       INODE_TYPE_DIR,                      // inode_type
                                       0,                                   // attr
@@ -1174,5 +1173,5 @@
         // register VFS root inode in process_zero descriptor of cluster 0
         process_zero.vfs_root_xp = vfs_root_inode_xp;
-        process_zero.vfs_cwd_xp  = vfs_root_inode_xp;
+        process_zero.cwd_xp      = vfs_root_inode_xp;
     }
 
@@ -1185,6 +1184,7 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 4 : VFS root initialized in cluster 0 / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 4 : VFS root (%x,%x) in cluster 0 / cycle %d\n",
+__FUNCTION__, GET_CXY(process_zero.vfs_root_xp),
+GET_PTR(process_zero.vfs_root_xp), (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1243,5 +1243,5 @@
         // update local process_zero descriptor
         process_zero.vfs_root_xp = vfs_root_inode_xp;
-        process_zero.vfs_cwd_xp  = vfs_root_inode_xp;
+        process_zero.cwd_xp      = vfs_root_inode_xp;
     }
 
@@ -1254,6 +1254,7 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 1) ) 
-printk("\n[%s] : exit barrier 5 : VFS root initialized in cluster 1 / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 4 : VFS root (%x,%x) in cluster 1 / cycle %d\n",
+__FUNCTION__, GET_CXY(process_zero.vfs_root_xp),
+GET_PTR(process_zero.vfs_root_xp), (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1303,6 +1304,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 6 : DEVFS root initialized in cluster 0 / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 6 : DEVFS root initialized in cluster 0 / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1340,6 +1341,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 7 : DEV initialized in cluster 0 / sr %x / cycle %d\n",
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 7 : DEV initialized in cluster 0 / cycle %d\n",
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1366,6 +1367,6 @@
 #if DEBUG_KERNEL_INIT
 if( (core_lid ==  0) & (local_cxy == 0) ) 
-printk("\n[%s] : exit barrier 8 : process init created / sr %x / cycle %d\n", 
-__FUNCTION__, (uint32_t)hal_get_sr(), (uint32_t)hal_get_cycles() );
+printk("\n[%s] : exit barrier 8 : process init created / cycle %d\n", 
+__FUNCTION__, (uint32_t)hal_get_cycles() );
 #endif
 
@@ -1436,11 +1437,20 @@
     dev_pic_enable_timer( CONFIG_SCHED_TICK_MS_PERIOD );
 
+    /////////////////////////////////////////////////////////////////////////////////
+    if( core_lid == 0 ) xbarrier_wait( XPTR( 0 , &global_barrier ),
+                                        (info->x_size * info->y_size) );
+    barrier_wait( &local_barrier , info->cores_nr );
+    /////////////////////////////////////////////////////////////////////////////////
+
 #if DEBUG_KERNEL_INIT
-printk("\n[%s] : thread %x on core[%x,%d] jumps to thread_idle_func() / cycle %d\n",
-__FUNCTION__ , CURRENT_THREAD , local_cxy , core_lid , (uint32_t)hal_get_cycles() );
+thread_t * this = CURRENT_THREAD;
+printk("\n[%s] : thread[%x,%x] on core[%x,%d] jumps to thread_idle_func() / cycle %d\n",
+__FUNCTION__ , this->process->pid, this->trdid,
+local_cxy, core_lid, (uint32_t)hal_get_cycles() );
 #endif
 
     // each core jump to thread_idle_func
     thread_idle_func();
-}
-
+
+}  // end kernel_init()
+
