Index: /soft/giet_vm/giet_boot/boot.c
===================================================================
--- /soft/giet_vm/giet_boot/boot.c	(revision 551)
+++ /soft/giet_vm/giet_boot/boot.c	(revision 552)
@@ -1177,5 +1177,5 @@
     {
         // register WAKUP ISR in WTI interrupt vector
-        _schedulers[x][y][lpid]->wti_vector[4*lpid] = ISR_WAKUP;
+        _schedulers[x][y][lpid]->wti_vector[lpid] = ISR_WAKUP;
 
         // update XCU WTI mask for P[x,y,lpid] (4 entries per proc)
@@ -1725,74 +1725,4 @@
 } // end boot_elf_load()
 
-////////////////////////////////////////////////////////////////////////////////
-// This function intializes the external peripherals in cluster_io.
-////////////////////////////////////////////////////////////////////////////////
-void boot_peripherals_init() 
-{
-    mapping_header_t * header   = (mapping_header_t *)SEG_BOOT_MAPPING_BASE;
-    mapping_cluster_t * cluster = _get_cluster_base(header);
-    mapping_periph_t * periph   = _get_periph_base(header);
-
-    unsigned int periph_id;
-    unsigned int channel_id;
-
-#if BOOT_DEBUG_PERI
-_printf("\n[BOOT] External peripherals initialisation in cluster[%d,%d]\n",
-        X_IO , Y_IO );
-#endif
-
-    // get pointer on cluster_io
-    mapping_cluster_t * cluster_io = &cluster[X_IO * Y_SIZE + Y_IO];
-
-    // loop on peripherals
-    for (periph_id = cluster_io->periph_offset;
-         periph_id < cluster_io->periph_offset + cluster_io->periphs; 
-         periph_id++) 
-    {
-        unsigned int type       = periph[periph_id].type;
-        unsigned int subtype    = periph[periph_id].subtype;
-        unsigned int channels   = periph[periph_id].channels;
-
-        switch (type) 
-        {
-            case PERIPH_TYPE_IOC:    // vci_block_device component
-            {
-                if      ( subtype == IOC_SUBTYPE_BDV ) _bdv_init();
-                else if ( subtype == IOC_SUBTYPE_HBA ) _hba_init();
-                else if ( subtype == IOC_SUBTYPE_SPI ) _sdc_init();
-                break;
-            }
-            case PERIPH_TYPE_TTY:    // vci_multi_tty component
-            {
-                for (channel_id = 0; channel_id < channels; channel_id++) 
-                {
-                    _tty_init( channel_id );
-                }
-                break;
-            }
-            case PERIPH_TYPE_NIC:    // vci_multi_nic component
-            {
-                _nic_global_init( 1,      // broadcast accepted
-                                  1,      // bypass activated
-                                  0,      // tdm non activated
-                                  0 );    // tdm period 
-                break;
-            }
-            case PERIPH_TYPE_IOB:    // vci_io_bridge component
-            {
-                if (GIET_USE_IOMMU) 
-                {
-                    // TODO
-                    // get the iommu page table physical address
-                    // set IOMMU page table address
-                    // pseg_base[IOB_IOMMU_PTPR] = ptab_pbase;    
-                    // activate IOMMU
-                    // pseg_base[IOB_IOMMU_ACTIVE] = 1;        
-                }
-                break;
-            }
-        }  // end switch periph type
-    } // end loop on peripherals
-} // end boot_peripherals_init()
 
 /////////////////////////////////////////////////////////////////////////////////
@@ -1865,5 +1795,5 @@
     if ( gpid == 0 )    
     {
-        unsigned int cid;  // index for loops 
+        unsigned int cid;  // index for loop on clusters 
 
         // initialises the TTY0 spin lock
@@ -1872,6 +1802,16 @@
         _printf("\n[BOOT] P[0,0,0] starts at cycle %d\n", _get_proctime() );
 
+        // initialises the IOC peripheral
+        if      ( USE_IOC_BDV != 0 ) _bdv_init();
+        else if ( USE_IOC_HBA != 0 ) _hba_init();
+        else if ( USE_IOC_SDC != 0 ) _sdc_init();
+        else if ( USE_IOC_RDK == 0 )
+        {
+            _printf("\n[BOOT ERROR] boot_init() : no IOC peripheral\n");
+            _exit();
+        }
+
         // initialises the FAT
-        _fat_init( 0 );   // no IRQ
+        _fat_init( 0 );          // no IRQ
 
         _printf("\n[BOOT] FAT initialised at cycle %d\n", _get_proctime() );
@@ -1965,6 +1905,5 @@
         }
 
-        
-        // Each processor P[x,y,0] contributes to load .elf files.
+        // All processor P[x,y,0] contributes to load .elf files into clusters.
         boot_elf_load();
 
@@ -1973,19 +1912,5 @@
         //////////////////////////////////////////////
         
-        // Processor P[0,0,0] initialises external peripherals
-        if ( gpid == 0 ) 
-        {
-            // initialize external peripherals
-            boot_peripherals_init();
-        
-            _printf("\n[BOOT] Peripherals initialised at cycle %d\n", 
-                    _get_proctime() );
-        }
-
-        //////////////////////////////////////////////
-        _simple_barrier_wait( &_barrier_all_clusters );
-        //////////////////////////////////////////////
-
-        // each processor P[x][y][0] wake up other processors in same cluster
+        // Each processor P[x][y][0] wake up other processors in same cluster
         mapping_header_t*  header     = (mapping_header_t *)SEG_BOOT_MAPPING_BASE;
         mapping_cluster_t* cluster    = _get_cluster_base(header);
@@ -2005,5 +1930,5 @@
         }
     }
-    // Other processors than P[x][y][0] activate MMU (using local PTAB)
+    // All other processors activate MMU (using local PTAB)
     if ( lpid != 0 )
     {
@@ -2022,5 +1947,5 @@
 
 #if BOOT_DEBUG_ELF
-_printf("\n@@@ P[%d,%d,%d] exit boot / jumping to %x at cycle %d\n",
+_printf("\n[DEBUG BOOT_ELF] P[%d,%d,%d] exit boot & jump to %x at cycle %d\n",
         cx, cy, lpid, kernel_entry , _get_proctime() );
 #endif
