Index: /soft/giet_vm/Makefile
===================================================================
--- /soft/giet_vm/Makefile	(revision 313)
+++ /soft/giet_vm/Makefile	(revision 314)
@@ -13,5 +13,5 @@
 ### partition sectors    = 524832 
 
-MAP_XML     ?= mappings/tsar_leti_2_2_4_sort.xml
+MAP_XML     ?= mappings/tsar_leti_4_4_4_transpose.xml
 
 ### Objects to be linked for kernel.elf
@@ -153,4 +153,5 @@
 	mcopy -o -i $(DISK_IMAGE) build/gameoflife/gameoflife.elf ::/build/gameoflife
 	mcopy -o -i $(DISK_IMAGE) build/dhrystone/dhrystone.elf ::/build/dhrystone
+	mcopy -o -i $(DISK_IMAGE) transpose/images.raw ::/misc
 	mcopy -o -i $(DISK_IMAGE) map.bin ::/
 	dd if=build/boot/boot.elf of=$(DISK_IMAGE) seek=2 conv=notrunc
Index: /soft/giet_vm/giet_common/utils.c
===================================================================
--- /soft/giet_vm/giet_common/utils.c	(revision 313)
+++ /soft/giet_vm/giet_common/utils.c	(revision 314)
@@ -374,5 +374,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////////
-// This function is used by all drivers (_xxx_set_register() function)
+// This function is used by several drivers (_xxx_set_register() function)
 // If the MMU is not activated, the virtual address is extended using
 // X_IO and Y_IO to reach the cluster_io.
@@ -422,10 +422,17 @@
 
 ///////////////////////////////////////////////////////////////////////////////////
-// Takes a lock with an ll/sc atomic access.
-// A pseudo random delay is introduced before retry in case of miss
-// (delay average value = 100 cycles)
+// Takes a lock with a blocking ll/sc atomic access.
+// When the cache coherence is granted by the hardware,
+// the first read is a standard (cacheable) lw, as the local copy
+// can be polled when the lock is already taken by another task, reducing 
+// trafic on the interconnect. When the lock is released by the owner task,
+// the local copy is updated or invalidated by the coherence protocol.
+// If there is no hardware cache coherence a random delay is introduced
+// betwween two successive retry.
 ///////////////////////////////////////////////////////////////////////////////////
 inline void _get_lock(unsigned int * plock) 
 {
+#if NO_HARD_CC
+
     register unsigned int delay = ( _get_proctime() ^ _get_procid() << 4) & 0xFF;
 
@@ -451,4 +458,46 @@
             :"r"(plock), "r"(delay)
             :"$2", "$3", "$4");
+#else
+
+    asm volatile (
+            "_lock_llsc:                 \n"
+            "    lw   $2,    0(%0)       \n" /* dcache <= _ioc_lock current value    */
+            "    bnez $2,    _lock_llsc  \n" /* retry if lock already taken          */
+            "    nop                     \n"
+            "    ll   $2,    0(%0)       \n" /* ll_buffer <= _ioc_lock current value */
+            "    bnez $2,    _lock_llsc  \n" /* retry if _ioc_lock already taken     */
+            "    li   $3,    1           \n" /* $3 <= argument for sc                */
+            "    sc   $3,    0(%0)       \n" /* try to set _ioc_lock                 */
+            "    beqz $3,    _lock_llsc  \n" /* retry if sc failure                  */
+            "    nop                     \n"
+            :
+            :"r"(plock)
+            :"$2", "$3");
+#endif
+
+//  register unsigned int delay = ( _get_proctime() ^ _get_procid() << 4) & 0xFF;
+
+//  if (delay == 0) delay++;
+
+//  asm volatile (
+//          "_lock_llsc:             \n"
+//          "ll   $2,    0(%0)       \n" /* $2 <= _ioc_lock current value */
+//          "bnez $2,    _lock_delay \n" /* delay if _ioc_lock already taken */
+//          "li   $3,    1           \n" /* $3 <= argument for sc */
+//          "sc   $3,    0(%0)       \n" /* try to set _ioc_lock */
+//          "bnez $3,    _lock_ok    \n" /* exit if atomic */
+//          "_lock_delay:            \n"
+//          "move $4,    %1          \n" /* $4 <= delay */
+//          "_lock_loop:             \n"
+//          "addi $4,    $4,    -1   \n" /* $4 <= $4 - 1 */
+//          "bnez $4,    _lock_loop  \n" /* test end delay */
+//          "nop                     \n"
+//          "j           _lock_llsc  \n" /* retry */
+//          "nop                     \n"ache
+//          "_lock_ok:               \n"
+//          :
+//          :"r"(plock), "r"(delay)
+//          :"$2", "$3", "$4");
+
 }
 
Index: /soft/giet_vm/giet_config.h
===================================================================
--- /soft/giet_vm/giet_config.h	(revision 313)
+++ /soft/giet_vm/giet_config.h	(revision 314)
@@ -22,10 +22,9 @@
 #define BOOT_DEBUG_ELF           0          /* trace .elf files loading */
 
-#define GIET_DEBUG_INIT		     0			/* trace parallel kernel initialisation */
+#define GIET_DEBUG_INIT		     0			/* trace kernel initialisation */
 #define GIET_DEBUG_FAT           0          /* trace fat accesses */ 
 #define GIET_DEBUG_SWITCH	     0	        /* trace context switchs  */
 #define GIET_DEBUG_IRQS          0	        /* trace interrupts */
 #define GIET_DEBUG_IOC_DRIVER    0          /* trace IOC accesses */
-#define GIET_DEBUG_BDV_DRIVER    0          /* trace BDV accesses */
 #define GIET_DEBUG_TTY_DRIVER    0          /* trace TTY accesses */
 #define GIET_DEBUG_DMA_DRIVER    0          /* trace DMA accesses */
Index: /soft/giet_vm/giet_fat32/fat32.c
===================================================================
--- /soft/giet_vm/giet_fat32/fat32.c	(revision 313)
+++ /soft/giet_vm/giet_fat32/fat32.c	(revision 314)
@@ -1045,4 +1045,5 @@
 #if GIET_DEBUG_FAT
 _printf("\n[FAT DEBUG] Boot Sector Loaded\n");
+display_fat_cache();
 #endif
 
