Index: branch/giet_vm_ioc_drivers/giet_xml/mapping_info.h
===================================================================
--- soft/giet_vm/giet_xml/mapping_info.h	(revision 281)
+++ branch/giet_vm_ioc_drivers/giet_xml/mapping_info.h	(revision 283)
@@ -120,4 +120,12 @@
 };
 
+enum periphSubtype 
+{
+    PERIPH_SUBTYPE_BDV       = 0,
+    PERIPH_SUBTYPE_HBA       = 1,
+    PERIPH_SUBTYPE_SPI       = 2,
+
+    PERIPH_SUBTYPE_MAX_VALUE = 3,
+};
 
 enum mwmrPortDirection 
@@ -319,4 +327,5 @@
 {
     unsigned int    type;         
+    unsigned int    subtype;         // periph specialization
     unsigned int    psegid;          // pseg index in cluster
     unsigned int    channels;        // number of channels
Index: branch/giet_vm_ioc_drivers/giet_xml/xml_driver.c
===================================================================
--- soft/giet_vm/giet_xml/xml_driver.c	(revision 281)
+++ branch/giet_vm_ioc_drivers/giet_xml/xml_driver.c	(revision 283)
@@ -74,4 +74,11 @@
         "TTY",
         "XCU",
+    };
+
+    const char * periph_subtype[] =
+    {
+        "BDV",
+        "HBA",
+        "SPI",
     };
 
@@ -306,4 +313,8 @@
         {
             fprintf(fpout, "            <periph type = \"%s\" ", periph_type[periph[periph_id].type]);
+
+            if (periph[periph_id].subtype < PERIPH_SUBTYPE_MAX_VALUE) 
+                fprintf(fpout, " subtype = \"%s\" ", periph_subtype[periph[periph_id].subtype]);
+
             fprintf(fpout, " psegname = \"%s\" ", pseg[periph[periph_id].psegid].name);
             fprintf(fpout, " channels = \"%d\" />\n",  periph[periph_id].channels);
Index: branch/giet_vm_ioc_drivers/giet_xml/xml_parser.c
===================================================================
--- soft/giet_vm/giet_xml/xml_parser.c	(revision 281)
+++ branch/giet_vm_ioc_drivers/giet_xml/xml_parser.c	(revision 283)
@@ -123,5 +123,9 @@
 unsigned int use_iob          = 0; // using IOB component
 unsigned int use_xcu          = 0; // using XCU (not ICU)
+
+// These variables define the IOC peripheral subtype
 unsigned int use_hba          = 0; // using HBA
+unsigned int use_bdv          = 0; // using SoCLIB block device
+unsigned int use_spi          = 0; // using SD Card-SPI
 
 
@@ -1253,4 +1257,7 @@
         unsigned int error = 0;
 
+        // initialize peripheral subtype
+        periph[periph_index]->subtype = 0xFFFFFFFF;
+
         // The CMA, FBF, HBA, IOB, IOC, NIC, ROM, SIM, TTY, peripherals are not 
         // replicated in all clusters but can be replicated in two clusters (fault tolerance)
@@ -1337,4 +1344,5 @@
         {
             periph[periph_index]->type = PERIPH_TYPE_IOC;
+
             if (header->ioc_cluster == 0xFFFFFFFF)
             {
@@ -1347,5 +1355,47 @@
             else
             {
-                error = 1;
+                printf("[XML ERROR] At most two copies for non replicated "
+                        "peripheral\n");
+                exit(1);
+            }
+
+            str = getStringValue(reader, "subtype", &ok);
+    
+            if (!ok)
+            {
+                printf("[XML ERROR] IOC peripheral needs a subtype parameter: "
+                       "BDV, HBA or SPI\n");
+                exit(1);
+            } 
+
+            if (strcmp(str, "BDV") == 0)
+            { 
+                periph[periph_index]->subtype = PERIPH_SUBTYPE_BDV;
+                use_bdv = 1;
+            }
+            else if (strcmp(str, "HBA") == 0)
+            {
+                periph[periph_index]->subtype = PERIPH_SUBTYPE_HBA;
+
+                if (use_hba == 0)
+                {
+                    use_hba      = 1;
+                    hba_channels = periph[periph_index]->channels;
+                }
+                else
+                {
+                    assert( (hba_channels == periph[periph_index]->channels) &&
+                    "[XML ERROR] unconsistent non replicated peripheral");
+                }
+            }
+            else if (strcmp(str, "SPI") == 0)
+            {
+                periph[periph_index]->subtype = PERIPH_SUBTYPE_SPI;
+                use_spi = 1;
+            }
+            else
+            {
+                printf("[XML ERROR] illegal subtype for IOC peripheral\n");
+                exit(1);
             }
         } 
@@ -2567,4 +2617,6 @@
     def_int_write(fdout, "USE_IOB           ", use_iob);
     def_int_write(fdout, "USE_HBA           ", use_hba);
+    def_int_write(fdout, "USE_BDV           ", use_bdv);
+    def_int_write(fdout, "USE_SPI           ", use_spi);
 
     file_write(fdout, "\n");
