Index: trunk/kernel/kern/kernel_init.c
===================================================================
--- trunk/kernel/kern/kernel_init.c	(revision 577)
+++ trunk/kernel/kern/kernel_init.c	(revision 580)
@@ -375,5 +375,9 @@
             // check channels
             if( channels != 1 )
-            printk("\n[PANIC] in %s : MMC device must be single channel\n", __FUNCTION__ );
+            {
+                printk("\n[PANIC] in %s : MMC device must be single channel\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
 
             // create chdev in local cluster
@@ -386,5 +390,9 @@
             // check memory
             if( chdev_ptr == NULL )
-            printk("\n[PANIC] in %s : cannot create MMC chdev\n", __FUNCTION__ );
+            {
+                printk("\n[PANIC] in %s : cannot create MMC chdev\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
             
             // make MMC specific initialisation
@@ -427,5 +435,9 @@
                 // check memory
                 if( chdev_ptr == NULL )
-                printk("\n[PANIC] in %s : cannot create DMA chdev\n", __FUNCTION__ );
+                {
+                    printk("\n[PANIC] in %s : cannot create DMA chdev\n",
+                    __FUNCTION__ );
+                    hal_core_sleep();
+                }
             
                 // make DMA specific initialisation
@@ -503,10 +515,18 @@
         // check PIC device initialized
         if( chdev_dir.pic == XPTR_NULL )
-        printk("\n[PANIC] in %s : PIC device must be initialized first\n", __FUNCTION__ );
+        {
+            printk("\n[PANIC] in %s : PIC device must be initialized first\n",
+            __FUNCTION__ );
+            hal_core_sleep();
+        }
 
         // check external device functionnal type
         if( (func != DEV_FUNC_IOB) && (func != DEV_FUNC_IOC) && (func != DEV_FUNC_TXT) &&
             (func != DEV_FUNC_NIC) && (func != DEV_FUNC_FBF) )
-        printk("\n[PANIC] in %s : undefined peripheral type\n", __FUNCTION__ );
+        {
+            printk("\n[PANIC] in %s : undefined peripheral type\n",
+            __FUNCTION__ );
+            hal_core_sleep();
+        }
 
         // loops on channels
@@ -548,6 +568,9 @@
 
                     if( chdev == NULL )
-                    printk("\n[PANIC] in %s : cannot allocate chdev for external device\n",
-                    __FUNCTION__ );
+                    {
+                        printk("\n[PANIC] in %s : cannot allocate chdev\n",
+                        __FUNCTION__ );
+                        hal_core_sleep();
+                    }
 
                     // make device type specific initialisation
@@ -646,5 +669,9 @@
     // check PIC existence
     if( found == false )
-    printk("\n[PANIC] in %s : PIC device not found\n", __FUNCTION__ );
+    {
+        printk("\n[PANIC] in %s : PIC device not found\n",
+        __FUNCTION__ );
+        hal_core_sleep();
+    }
 
     // allocate and initialize the PIC chdev in cluster 0
@@ -657,5 +684,9 @@
     // check memory
     if( chdev == NULL )
-    printk("\n[PANIC] in %s : no memory for PIC chdev\n", __FUNCTION__ );
+    {
+        printk("\n[PANIC] in %s : no memory for PIC chdev\n",
+        __FUNCTION__ );
+        hal_core_sleep();
+    }
 
     // make PIC device type specific initialisation
@@ -723,5 +754,10 @@
             else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel];
             else if( func == DEV_FUNC_IOB )                 ptr = &iopic_input.iob;
-            else     printk("\n[PANIC] in %s : illegal source device for IOPIC input" );
+            else
+            {
+                printk("\n[PANIC] in %s : illegal source device for IOPIC input\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
 
             // set one entry in all "iopic_input" structures
@@ -814,5 +850,10 @@
                 if     ( func == DEV_FUNC_MMC ) lapic_input.mmc = id;
                 else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id;
-                else     printk("\n[PANIC] in %s : illegal source device for LAPIC input" );
+                else
+                {
+                    printk("\n[PANIC] in %s : illegal source device for LAPIC input\n",
+                    __FUNCTION__ );
+                    hal_core_sleep();
+                }
             }
         }
@@ -939,6 +980,9 @@
     // all cores check identifiers
     if( error )
-    printk("\n[PANIC] in %s : illegal core : gid %x / cxy %x / lid %d",
-    __FUNCTION__, core_lid, core_cxy, core_lid );
+    {
+        printk("\n[PANIC] in %s : illegal core : gid %x / cxy %x / lid %d",
+        __FUNCTION__, core_lid, core_cxy, core_lid );
+        hal_core_sleep();
+    }
 
     // CP0 initializes cluster manager complex structures
@@ -948,6 +992,9 @@
 
         if( error )
-        printk("\n[PANIC] in %s : cannot initialize cluster manager in cluster %x\n",
-        __FUNCTION__, local_cxy );
+        {
+             printk("\n[PANIC] in %s : cannot initialize cluster manager in cluster %x\n",
+             __FUNCTION__, local_cxy );
+             hal_core_sleep();
+        }
     }
 
@@ -1068,6 +1115,9 @@
 
             if( fatfs_ctx == NULL )
-            printk("\n[PANIC] in %s : cannot create FATFS context in cluster 0\n",
-            __FUNCTION__ );
+            {
+                printk("\n[PANIC] in %s : cannot create FATFS context in cluster 0\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
 
             // 2. access boot device to initialize FATFS context
@@ -1099,6 +1149,9 @@
                                       &vfs_root_inode_xp );                // return
             if( error )
-            printk("\n[PANIC] in %s : cannot create VFS root inode in cluster 0\n",
-            __FUNCTION__ );
+            {
+                printk("\n[PANIC] in %s : cannot create VFS root inode in cluster 0\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
 
             // 6. update the FATFS entry in vfs_context[] array
@@ -1109,6 +1162,10 @@
 
             if( ((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster != 8 )
-            printk("\n[PANIC] in %s : illegal FATFS context in cluster 0\n",
-            __FUNCTION__ );
+            {
+                printk("\n[PANIC] in %s : illegal FATFS context in cluster 0\n",
+                __FUNCTION__ );
+                hal_core_sleep();
+            }
+                
         }
         else
@@ -1116,4 +1173,5 @@
             printk("\n[PANIC] in %s : unsupported VFS type in cluster 0\n",
             __FUNCTION__ );
+            hal_core_sleep();
         }
 
@@ -1153,6 +1211,9 @@
             // check memory
             if( local_fatfs_ctx == NULL )
-            printk("\n[PANIC] in %s : cannot create FATFS context in cluster %x\n",
-            __FUNCTION__ , local_cxy );
+            {
+                printk("\n[PANIC] in %s : cannot create FATFS context in cluster %x\n",
+                __FUNCTION__ , local_cxy );
+                hal_core_sleep();
+            }
 
             // 2. get local pointer on VFS context for FATFS
@@ -1174,6 +1235,9 @@
 
             if( ((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster != 8 )
-            printk("\n[PANIC] in %s : illegal FATFS context in cluster %x\n",
-            __FUNCTION__ , local_cxy );
+            {
+                printk("\n[PANIC] in %s : illegal FATFS context in cluster %x\n",
+                __FUNCTION__ , local_cxy );
+                hal_core_sleep();
+            }
         }
 
@@ -1210,6 +1274,9 @@
 
         if( devfs_ctx == NULL )
-        printk("\n[PANIC] in %s : cannot create DEVFS context in cluster 0\n",
-        __FUNCTION__ , local_cxy );
+        {
+            printk("\n[PANIC] in %s : cannot create DEVFS context in cluster 0\n",
+            __FUNCTION__ , local_cxy );
+            hal_core_sleep();
+        }
 
         // 2. initialize the DEVFS entry in the vfs_context[] array 
