Index: soft/giet_vm/xml/mapping_info.h
===================================================================
--- soft/giet_vm/xml/mapping_info.h	(revision 232)
+++ soft/giet_vm/xml/mapping_info.h	(revision 238)
@@ -50,19 +50,24 @@
 #define OUT_MAPPING_SIGNATURE   0xBABEF00D
 
-enum vobjType {
-    VOBJ_TYPE_ELF      = 0, // loadable code/data object of elf files
-    VOBJ_TYPE_BLOB     = 1, // loadable blob object
-    VOBJ_TYPE_PTAB     = 2, // page table 
-    VOBJ_TYPE_PERI     = 3, // hardware component
-    VOBJ_TYPE_MWMR     = 4, // MWMR channel
-    VOBJ_TYPE_LOCK     = 5, // Lock
-    VOBJ_TYPE_BUFFER   = 6, // Any "no initialization needed" objects (stacks...)
-    VOBJ_TYPE_BARRIER  = 7, // Barrier
-    VOBJ_TYPE_CONST    = 8, // Constant
-    VOBJ_TYPE_MEMSPACE = 9, // Memspace; different from buffer because we add infos at the beginning
-};
-
-
-enum psegType {
+typedef unsigned long long  paddr_t;
+
+enum vobjType 
+{
+    VOBJ_TYPE_ELF      = 0,  // loadable code/data object of elf files
+    VOBJ_TYPE_BLOB     = 1,  // loadable blob object
+    VOBJ_TYPE_PTAB     = 2,  // page table 
+    VOBJ_TYPE_PERI     = 3,  // hardware component
+    VOBJ_TYPE_MWMR     = 4,  // MWMR channel
+    VOBJ_TYPE_LOCK     = 5,  // Lock
+    VOBJ_TYPE_BUFFER   = 6,  // Any "no initialization" objects (stacks...)
+    VOBJ_TYPE_BARRIER  = 7,  // Barrier
+    VOBJ_TYPE_CONST    = 8,  // Constant
+    VOBJ_TYPE_MEMSPACE = 9,  // Memspace (descriptor must be initialised)
+    VOBJ_TYPE_SCHED    = 10, // Array of schedulers (one per cluster)
+};
+
+
+enum psegType 
+{
     PSEG_TYPE_RAM  = 0,
     PSEG_TYPE_ROM  = 1,
@@ -71,18 +76,22 @@
 
 
-enum periphType {
-    PERIPH_TYPE_ICU  = 0,
-    PERIPH_TYPE_TIM  = 1,
-    PERIPH_TYPE_XICU = 2,
-    PERIPH_TYPE_DMA  = 3,
-    PERIPH_TYPE_IOC  = 4,
-    PERIPH_TYPE_TTY  = 5,
-    PERIPH_TYPE_FBF  = 6,
-    PERIPH_TYPE_NIC  = 7,
-    PERIPH_TYPE_IOB  = 8,
-};
-
-
-enum mwmrPortDirection {
+enum periphType 
+{
+    PERIPH_TYPE_ICU       = 0,
+    PERIPH_TYPE_TIM       = 1,
+    PERIPH_TYPE_DMA       = 2,
+    PERIPH_TYPE_CMA       = 3,
+    PERIPH_TYPE_IOC       = 4,
+    PERIPH_TYPE_TTY       = 5,
+    PERIPH_TYPE_FBF       = 6,
+    PERIPH_TYPE_NIC       = 7,
+    PERIPH_TYPE_IOB       = 8,
+    PERIPH_TYPE_GCD       = 9,
+    PERIPH_TYPE_MAX_VALUE = 10,
+};
+
+
+enum mwmrPortDirection 
+{
     PORT_TO_COPROC   = 0, // status register
     PORT_FROM_COPROC = 1, // config register
@@ -92,33 +101,43 @@
 ///////////////////////////////
 
-typedef struct mapping_header_s {
-    unsigned int signature;      // must contain MAPPING_SIGNATURE
-    unsigned int clusters;       // number of clusters
-    unsigned int cluster_x;      // number of cluster on the abcsisse axe
-    unsigned int cluster_y;      // number of cluster on the ordinate axe
-    unsigned int globals;        // number of vsegs mapped in all vspaces
-    unsigned int vspaces;        // number of virtual spaces
-
-    unsigned int tty_clusterid;  // index of cluster containing TTY controler
-    unsigned int ioc_clusterid;  // index of cluster containing IOC controler
-    unsigned int nic_clusterid;  // index of cluster containing NIC controler
-    unsigned int fbf_clusterid;  // index of cluster containing FBF controler
-
-    unsigned int psegs;          // total number of physical segments (for all clusters)
-    unsigned int vsegs;          // total number of virtual segments (for all vspaces)
-    unsigned int vobjs;          // total number of virtual objects (for all vspaces)
-    unsigned int tasks;          // total number of tasks (for all vspaces)
-    unsigned int procs;          // total number of procs (for all clusters)
-    unsigned int irqs;           // total number of irqs (for all processors)
-    unsigned int coprocs;        // total number of coprocs (for all clusters)
-    unsigned int cp_ports;       // total number of cp_ports (for all coprocs)
-    unsigned int periphs;        // total number of peripherals (for all clusters)
-
-    char name[32];    // mapping name
+typedef struct mapping_header_s 
+{
+    unsigned int signature;          // must contain MAPPING_SIGNATURE
+    unsigned int clusters;           // number of clusters
+    unsigned int cluster_x;          // number of cluster in a row
+    unsigned int cluster_y;          // number of cluster in a column
+    unsigned int globals;            // number of vsegs mapped in all vspaces
+    unsigned int vspaces;            // number of virtual spaces
+
+    unsigned int tty_cluster;        // index of cluster containing TTY controler
+    unsigned int tty_cluster_bis;    // index of cluster containing second TTY controler
+    unsigned int ioc_cluster;        // index of cluster containing IOC controler
+    unsigned int ioc_cluster_bis;    // index of cluster containing second IOC controler
+    unsigned int nic_cluster;        // index of cluster containing NIC controler
+    unsigned int nic_cluster_bis;    // index of cluster containing second NIC controler
+    unsigned int fbf_cluster;        // index of cluster containing FBF controler
+    unsigned int fbf_cluster_bis;    // index of cluster containing second FBF controler
+    unsigned int cma_cluster;        // index of cluster containing CMA controler
+    unsigned int cma_cluster_bis;    // index of cluster containing second CMA controler
+    unsigned int iob_cluster;        // index of cluster containing IOB controler
+    unsigned int iob_cluster_bis;    // index of cluster containing second IOB controler
+
+    unsigned int psegs;              // total number of physical segments (for all clusters)
+    unsigned int vsegs;              // total number of virtual segments (for all vspaces)
+    unsigned int vobjs;              // total number of virtual objects (for all vspaces)
+    unsigned int tasks;              // total number of tasks (for all vspaces)
+    unsigned int procs;              // total number of procs (for all clusters)
+    unsigned int irqs;               // total number of irqs (for all processors)
+    unsigned int coprocs;            // total number of coprocs (for all clusters)
+    unsigned int cp_ports;           // total number of cp_ports (for all coprocs)
+    unsigned int periphs;            // total number of peripherals (for all clusters)
+
+    char name[32];                   // mapping name
 } mapping_header_t;
 
 
 ////////////////////////////////
-typedef struct mapping_cluster_s {
+typedef struct mapping_cluster_s 
+{
     unsigned int psegs;          // number of psegs in cluster
     unsigned int pseg_offset;    // index of first pseg in pseg set
@@ -136,17 +155,19 @@
 
 /////////////////////////////
-typedef struct mapping_pseg_s  {
-    char name[32];               // pseg name (unique in a cluster)
-    unsigned int base;           // base address in physical space
-    unsigned int length;         // size (bytes)
+typedef struct mapping_pseg_s  
+{
+    char         name[32];       // pseg name (unique in a cluster)
+    paddr_t      base;           // base address in physical space
+    paddr_t      length;         // size (bytes)
     unsigned int type;           // RAM / ROM / PERI
     unsigned int cluster;        // index of cluster containing pseg
-    unsigned int next_base;      // first free page base address
+    paddr_t      next_base;      // first free page base address
 } mapping_pseg_t;
 
 
 ///////////////////////////////
-typedef struct mapping_vspace_s {
-    char name[32];               // virtual space name
+typedef struct mapping_vspace_s 
+{
+    char         name[32];       // virtual space name
     unsigned int start_offset;   // offset of the vobj containing the start vector
     unsigned int vsegs;          // number of vsegs in vspace
@@ -160,8 +181,9 @@
 
 /////////////////////////////
-typedef struct mapping_vseg_s {
-    char name[32];               // vseg name (unique in vspace)
-    unsigned int vbase;          // base address in virtual space (hexa)
-    unsigned int pbase;          // base address in physical space (hexa)
+typedef struct mapping_vseg_s 
+{
+    char         name[32];       // vseg name (unique in vspace)
+    unsigned int vbase;          // base address in virtual space
+    paddr_t      pbase;          // base address in physical space
     unsigned int length;         // size (bytes)
     unsigned int psegid;         // physical segment global index
@@ -169,11 +191,12 @@
     unsigned int ident;          // identity mapping if non zero
     unsigned int vobjs;          // number of vobjs in vseg
-    unsigned int vobj_offset;    // index of first vobjs in vseg
+    unsigned int vobj_offset;    // index of first vobj in vseg
 } mapping_vseg_t;
 
 
 /////////////////////////////
-typedef struct mapping_task_s {
-    char name[32];               // task name (unique in vspace)
+typedef struct mapping_task_s 
+{
+    char         name[32];       // task name (unique in vspace)
     unsigned int clusterid;      // physical cluster index
     unsigned int proclocid;      // processor local index (inside cluster)
@@ -181,20 +204,23 @@
     unsigned int heap_vobjid;    // heap vobj index in vspace
     unsigned int startid;        // index in start_vector 
-    unsigned int use_tty;        // TTY terminal required (global)
+    unsigned int use_tty;        // TTY channel required (global)
     unsigned int use_nic;        // NIC channel required (global)
-    unsigned int use_timer;      // user timer required (local)
-    unsigned int use_fbdma;      // DMA channel to frame buffer required (local)
+    unsigned int use_cma;        // CMA channel required (global)
+    unsigned int use_ioc;        // IOC channel required (global)
+    unsigned int use_tim;        // user timer required (local)
+    unsigned int use_dma;        // DMA channel required (local)
 } mapping_task_t;
 
 
 /////////////////////////////
-typedef struct mapping_vobj_s {
-    char name[32];               // vobj name (unique in a vspace)
-    char binpath[64];            // path for the binary code ("*.elf")
+typedef struct mapping_vobj_s 
+{
+    char         name[32];       // vobj name (unique in a vspace)
+    char         binpath[64];    // path for the binary code ("*.elf")
     unsigned int type;           // type of vobj
     unsigned int length;         // size (bytes)
     unsigned int align;          // required alignement (logarithm of 2)
     unsigned int vaddr;          // virtual base addresse of the vobj
-    unsigned int paddr;          // physical base addresse of the vobj
+    paddr_t      paddr;          // physical base addresse of the vobj
     unsigned int init;           // init value (used by barrier or mwmr channel)
 } mapping_vobj_t;
@@ -202,5 +228,6 @@
 
 /////////////////////////////
-typedef struct mapping_proc_s {
+typedef struct mapping_proc_s 
+{
     unsigned int irqs;           // number of IRQs allocated to processor
     unsigned int irq_offset;     // index of first IRQ allocated to processor
@@ -209,15 +236,17 @@
 
 /////////////////////////////
-typedef struct mapping_irq_s {
+typedef struct mapping_irq_s 
+{
     unsigned int type;           // 0 => HW_IRQ  / 1 => SW_IRQ
     unsigned int icuid;          // IRQ Index for the ICU component
-    unsigned int isr;            // Interrupt Service Routine Index 
-    unsigned int channel;        // Channel Index (for multi-cannels peripherals)
+    unsigned int isr;            // ISR Index (defined in irq_handler.h)
+    unsigned int channel;        // Channel Index (for multi-channels peripherals)
 } mapping_irq_t;
 
 
 ///////////////////////////////
-typedef struct mapping_coproc_s {
-    char name[32];               // coprocessor name
+typedef struct mapping_coproc_s 
+{
+    char         name[32];       // coprocessor name
     unsigned int psegid;         // global pseg index 
     unsigned int ports;          // number of MWMR ports used by coprocessor
@@ -227,13 +256,15 @@
 
 ////////////////////////////////
-typedef struct mapping_cp_port_s {
+typedef struct mapping_cp_port_s 
+{
     unsigned int direction;      // TO_COPROC == 0 / FROM_COPROC == 1
     unsigned int vspaceid;       // index of the vspace containing the MWMR channel
-    unsigned int mwmr_vobjid;      // local index of the vobj containing the MWMR channel
+    unsigned int mwmr_vobjid;    // local index of the vobj containing the MWMR channel
 } mapping_cp_port_t;
 
 
 ///////////////////////////////
-typedef struct mapping_periph_s {
+typedef struct mapping_periph_s 
+{
     unsigned int type;           // IOC / TTY / TIM / DMA / FBF / NIC / IOB
     unsigned int psegid;         // pseg index in cluster
