Index: trunk/kernel/kern/kernel_init.c
===================================================================
--- trunk/kernel/kern/kernel_init.c	(revision 188)
+++ trunk/kernel/kern/kernel_init.c	(revision 204)
@@ -33,4 +33,5 @@
 #include <list.h>
 #include <xlist.h>
+#include <xhtab.h>
 #include <thread.h>
 #include <scheduler.h>
@@ -245,5 +246,5 @@
         func        = FUNC_FROM_TYPE( dev_tbl[i].type );
         impl        = IMPL_FROM_TYPE( dev_tbl[i].type );
-
+ 
         //////////////////////////
         if( func == DEV_FUNC_MMC )  
@@ -553,5 +554,5 @@
     } 
 
-    kinit_dmsg("\n[INFO] %s created IOPIC chdev in cluster %x at cycle %d\n",
+    kinit_dmsg("\n[INFO] %s created PIC chdev in cluster %x at cycle %d\n",
                __FUNCTION__ , local_cxy , (uint32_t)hal_time_stamp() );
     
@@ -672,12 +673,16 @@
 void kernel_init( boot_info_t * info )
 {
-    lid_t        core_lid = -1;        // running core local index
-    cxy_t        core_cxy = -1;        // running core cluster identifier
-    gid_t        core_gid;             // running core hardware identifier 
-    cluster_t  * cluster;              // pointer on local cluster manager
-    core_t     * core;                 // pointer on running core descriptor
-    thread_t   * thread;               // pointer on idle thread descriptor
-    xptr_t       vfs_root_inode_xp;    // extended pointer on VFS root inode
-//  xptr_t       devfs_root_inode_xp;  // extended pointer on DEVFS root inode
+    lid_t        core_lid = -1;             // running core local index
+    cxy_t        core_cxy = -1;             // running core cluster identifier
+    gid_t        core_gid;                  // running core hardware identifier 
+    cluster_t  * cluster;                   // pointer on local cluster manager
+    core_t     * core;                      // pointer on running core descriptor
+    thread_t   * thread;                    // pointer on idle thread descriptor
+
+    xptr_t       vfs_root_inode_xp;         // extended pointer on VFS root inode
+    xptr_t       devfs_dev_inode_xp;        // extended pointer on DEVFS dev inode    
+    xptr_t       devfs_external_inode_xp;   // extended pointer on DEVFS external inode       
+    xptr_t       devfs_internal_inode_xp;   // extended pointer on DEVFS internal inode       
+
     error_t      error;
 
@@ -958,8 +963,8 @@
 
     /////////////////////////////////////////////////////////////////////////////////
-    // global &local synchro to protect File System initialisation
     if( core_lid == 0 ) remote_barrier( XPTR( io_cxy , &global_barrier ), 
                                         (info->x_size * info->y_size) );
     barrier_wait( &local_barrier , info->cores_nr );
+    /////////////////////////////////////////////////////////////////////////////////
 
     if( (core_lid ==  0) && (local_cxy == 0) ) 
@@ -970,16 +975,13 @@
     /////////////////////////////////////////////////////////////////////////////////
     // STEP 6 : CP0 in cluster IO makes the global DEVFS tree initialisation:
-    //          It creates the DEVFS root directory and the DEVFS "external"
-    //          diretory in cluster IO and mount these inodes into VFS.
+    //          It creates the DEVFS directory "dev", and the DEVFS "external"
+    //          directory in cluster IO and mount these inodes into VFS.
     /////////////////////////////////////////////////////////////////////////////////
 
     if( (core_lid ==  0) && (local_cxy == io_cxy) ) 
     {
-        xptr_t  devfs_root_inode_xp;       // extended pointer on DEVFS root directory
-        xptr_t  devfs_external_inode_xp;   // extended pointer on DEVFS external directory    
-
         // create "dev" and "external" directories.
         devfs_global_init( process_zero.vfs_root_xp,
-                           &devfs_root_inode_xp,
+                           &devfs_dev_inode_xp,
                            &devfs_external_inode_xp );
 
@@ -991,12 +993,12 @@
 
         // register DEVFS root and external directories
-        devfs_ctx_init( devfs_ctx, devfs_root_inode_xp, devfs_external_inode_xp );
+        devfs_ctx_init( devfs_ctx, devfs_dev_inode_xp, devfs_external_inode_xp );
     }    
 
     /////////////////////////////////////////////////////////////////////////////////
-    // global &local synchro to protect File System initialisation
     if( core_lid == 0 ) remote_barrier( XPTR( io_cxy , &global_barrier ), 
                                         (info->x_size * info->y_size) );
     barrier_wait( &local_barrier , info->cores_nr );
+    /////////////////////////////////////////////////////////////////////////////////
 
     if( (core_lid ==  0) && (local_cxy == 0) ) 
@@ -1007,14 +1009,11 @@
     // STEP 7 : All CP0s complete in parallel the DEVFS tree initialization.
     //          Each CP0 get the "dev" and "external" extended pointers from
-    //          values storred in cluster IO. Then CP0 in cluster(i) creates the 
-    //          DEVFS "internal directory, and creates the pseudo-files for all 
-    //          chdevs contained in cluster (i).
+    //          values stored in cluster IO. 
+    //          Then CP0 in cluster(i) creates the DEVFS "internal directory, 
+    //          and creates the pseudo-files for all chdevs in cluster (i).
     /////////////////////////////////////////////////////////////////////////////////
 
     if( core_lid == 0 )
     {
-        xptr_t  root_inode_xp;       // extended pointer on DEVFS root directory
-        xptr_t  external_inode_xp;   // extended pointer on DEVFS external directory    
-
         // get extended pointer on "extend" field of VFS context for DEVFS in cluster IO
         xptr_t  extend_xp = XPTR( io_cxy , &fs_context[FS_TYPE_DEVFS].extend );
@@ -1023,16 +1022,20 @@
         devfs_ctx_t * devfs_ctx = hal_remote_lpt( extend_xp );
         
-        root_inode_xp     = hal_remote_lwd( XPTR( io_cxy , &devfs_ctx->root_inode_xp ) );
-        external_inode_xp = hal_remote_lwd( XPTR( io_cxy , &devfs_ctx->external_inode_xp ) );
-
-        devfs_local_init( root_inode_xp,
-                          external_inode_xp );
-    }
-
-    /////////////////////////////////////////////////////////////////////////////////
-    // global &local synchro to protect File System initialisation
+        devfs_dev_inode_xp      = hal_remote_lwd( XPTR( io_cxy ,
+                                                        &devfs_ctx->dev_inode_xp ) );
+        devfs_external_inode_xp = hal_remote_lwd( XPTR( io_cxy , 
+                                                        &devfs_ctx->external_inode_xp ) );
+
+        // populate DEVFS in all clusters
+        devfs_local_init( devfs_dev_inode_xp,
+                          devfs_external_inode_xp,
+                          &devfs_internal_inode_xp );
+    }
+
+    /////////////////////////////////////////////////////////////////////////////////
     if( core_lid == 0 ) remote_barrier( XPTR( io_cxy , &global_barrier ), 
                                         (info->x_size * info->y_size) );
     barrier_wait( &local_barrier , info->cores_nr );
+    /////////////////////////////////////////////////////////////////////////////////
 
     if( (core_lid ==  0) && (local_cxy == 0) ) 
@@ -1040,6 +1043,10 @@
                __FUNCTION__, (uint32_t)hal_time_stamp());
 
-    /////////////////////////////////////////////////////////////////////////////////
-    // STEP 8 : CP0 in I/O cluster creates the process_init and print banner.
+    #if CONFIG_KINIT_DEBUG
+    vfs_display( vfs_root_inode_xp );
+    #endif
+
+    /////////////////////////////////////////////////////////////////////////////////
+    // STEP 8 : CP0 in I/O cluster creates the first user process (process_init)
     /////////////////////////////////////////////////////////////////////////////////
 
@@ -1050,8 +1057,8 @@
 
     /////////////////////////////////////////////////////////////////////////////////
-    // global syncho to protect access to File System
     if( core_lid == 0 ) remote_barrier( XPTR( info->io_cxy , &global_barrier ),
                                         (info->x_size * info->y_size) );
     barrier_wait( &local_barrier , info->cores_nr );
+    /////////////////////////////////////////////////////////////////////////////////
 
     if( (core_lid ==  0) && (local_cxy == 0) ) 
