Index: trunk/softs/giet_tsar/stdio.c
===================================================================
--- trunk/softs/giet_tsar/stdio.c	(revision 809)
+++ trunk/softs/giet_tsar/stdio.c	(revision 810)
@@ -72,4 +72,5 @@
 #define in_drivers __attribute__((section (".drivers")))
 #define in_unckdata __attribute__((section (".unckdata")))
+#define cacheline_aligned __attribute__((aligned(64)))
 
 //////////////////////////////////////////////////////////////
@@ -92,6 +93,10 @@
 static in_unckdata int volatile  _ioc_status;
 
-static in_unckdata char volatile _tty_get_buf[NB_TTY_CHANNELS];
-static in_unckdata int volatile  _tty_get_full[NB_TTY_CHANNELS] = { [0 ... NB_TTY_CHANNELS-1] = 0 };
+static volatile in_unckdata struct cacheline_aligned {
+    int  lock;
+    int  get_full;
+    char get_buf;
+    char __padding[55];
+} _tty_channel[NB_TTY_CHANNELS];
 
 ////////////////////////////////////////////////////////////////////////////////////////
@@ -141,4 +146,5 @@
 in_drivers void  _extended_memcpy( unsigned int dst_cluster,
                                    unsigned int dst_address,
+                                   unsigned int src_cluster,
                                    unsigned int src_address,
                                    unsigned int length )
@@ -157,6 +163,6 @@
     for ( i = 0 ; i < length ; i = i+4 )
     {
-        word = _word_extended_read( src_cluster, (src_address + i) );
-        _word_extended_write( dst_cluster, (dst_address + i), word );
+        word = _word_extended_read( src_cluster, src_address + i );
+        _word_extended_write( dst_cluster, dst_address + i, word );
     }
 }
@@ -545,7 +551,14 @@
 in_drivers void _tty_get_lock( unsigned int channel )
 {
-    unsigned int base = (unsigned int)&seg_tty_base;
-    unsigned int offset = (TTY_CONFIG + channel*TTY_SPAN) << 2;
-    while ( _word_extended_read( CLUSTER_IO, base + offset ) );
+    register unsigned int* plock = (unsigned int*)&_tty_channel[channel].lock;
+
+    asm volatile (
+            "1:                         \n"
+            "ll     $2,     0(%0)       \n" // $2 <= _tty_lock
+            "bnez   $2,     1b          \n" // retry  if busy
+            "li     $3,     1           \n" // prepare argument for sc
+            "sc     $3,     0(%0)       \n" // try to set _tty_busy
+            "beqz   $3,     1b          \n" // retry if not atomic
+            ::"r"(plock) :"$2","$3");
 }
 
@@ -556,7 +569,5 @@
 in_drivers void _tty_release_lock( unsigned int channel )
 {
-    unsigned int base    = (unsigned int)&seg_tty_base;
-    unsigned int offset  = (TTY_CONFIG + channel*TTY_SPAN) << 2;
-    _word_extended_write( CLUSTER_IO, base + offset, 0 );
+    _tty_channel[channel].lock = 0;
 }
 
@@ -813,6 +824,6 @@
     unsigned int offset = (index*TTY_SPAN + TTY_READ) << 2;
 
-    _tty_get_buf[index] = _byte_extended_read(CLUSTER_IO, base + offset);
-    _tty_get_full[index] = 1;               // signals character available
+    _tty_channel[index].get_buf  = _byte_extended_read(CLUSTER_IO, base + offset);
+    _tty_channel[index].get_full = 1;               // signals character available
 }
 
@@ -872,5 +883,5 @@
 // reset the _ioc_done variable to zero, and releases the _ioc_lock variable.
 ///////////////////////////////////////////////////////////////////////////////////////
-//  If USE_RAMDISK is set, we access a "virtual" block device controler  implemented
+//  If USE_IOC_RDK is set, we access a "virtual" block device controler implemented
 //  as a memory-mapped segment in cluster [0,0] at address seg_ramdisk_base.
 //  The tranfer being fully synchronous, the IOC interrupt is not activated.
@@ -910,5 +921,5 @@
     _ioc_get_lock();
 
-    if ( USE_RAMDISK )  // we use an extended_memcpy
+    if ( USE_IOC_RDK )  // we use an extended_memcpy
     {
         unsigned int  src_address = (unsigned int)buffer;
@@ -953,5 +964,5 @@
     _ioc_get_lock();
 
-    if ( USE_RAMDISK )  // we use an extended_memcpy
+    if ( USE_IOC_RDK )  // we use an extended_memcpy
     {
         unsigned int  dst_address = (unsigned int)buffer;
Index: trunk/softs/soft_hello_giet/Makefile
===================================================================
--- trunk/softs/soft_hello_giet/Makefile	(revision 809)
+++ trunk/softs/soft_hello_giet/Makefile	(revision 810)
@@ -4,15 +4,15 @@
 DU = mipsel-unknown-elf-objdump
 
-OBJS =   reset.o \
-         giet.o \
-         stdio.o \
-         main.o
+OBJS = reset.o \
+       giet.o \
+       stdio.o \
+       main.o
 
-CFLAGS = -Wall -mno-gpopt -ffreestanding -fomit-frame-pointer -mips32 -ggdb
+CFLAGS = -Wall -mno-gpopt -ffreestanding -fomit-frame-pointer -mips32
 
 GIET =	../giet_tsar
 
-bin.soft: $(OBJS) ldscript
-	$(LD) -o $@ -T ldscript $(OBJS)
+bin.soft: $(OBJS) giet.ld
+	$(LD) -o $@ -T giet.ld $(OBJS)
 	$(DU) -D $@ > $@.txt
 
@@ -33,4 +33,7 @@
 	$(DU) -D $@ > $@.txt
 
+giet.ld: giet.ld.in
+	$(CC) -x c -P -E -I. $< -o $@
+
 clean:
-	rm -f *.o bin.soft *.txt core term* temp
+	rm -f *.o bin.soft *.txt core term* temp giet.ld
Index: trunk/softs/soft_hello_giet/giet.ld.in
===================================================================
--- trunk/softs/soft_hello_giet/giet.ld.in	(revision 810)
+++ trunk/softs/soft_hello_giet/giet.ld.in	(revision 810)
@@ -0,0 +1,79 @@
+/**
+ * \file   : giet.ld.in
+ * \author : Cesar Fuguet
+ * \date   : September 19, 2014
+ *
+ * \brief  : giet ldscript template
+ * \note   : must be compiled with gcc to generate an instance
+ */
+
+#include <hard_config.h>
+
+seg_reset_base   = RESET_ADDRESS;           /* boot code                   */
+
+seg_kcode_base   = SEG_RAM_BASE + 0x10000;  /* kernel code                 */
+seg_kdata_base   = SEG_RAM_BASE + 0x20000;  /* kernel cacheable data       */
+seg_kunc_base    = SEG_RAM_BASE + 0x30000;  /* kernel uncacheable data     */
+seg_code_base    = SEG_RAM_BASE + 0x40000;  /* application code            */
+seg_data_base    = SEG_RAM_BASE + 0x50000;  /* application data            */
+seg_heap_base    = SEG_RAM_BASE + 0x100000; /* heaps for applications      */
+seg_stack_base   = SEG_RAM_BASE + 0x300000; /* stacks ifor applications    */
+seg_ramdisk_base = SEG_RAM_BASE + 0x800000; /* virtual disk                */
+
+seg_xcu_base     = SEG_XCU_BASE;            /* controler XCU               */
+seg_tty_base     = SEG_TTY_BASE;            /* controler TTY               */
+seg_fbf_base     = SEG_FBF_BASE;            /* controler FBF               */
+seg_ioc_base     = SEG_IOC_BASE;            /* controler IOC               */
+seg_nic_base     = SEG_NIC_BASE;            /* controler NIC               */
+seg_cma_base     = SEG_CMA_BASE;            /* controler CMA               */
+seg_pic_base     = SEG_PIC_BASE;            /* controler PIC               */
+seg_mmc_base     = SEG_MMC_BASE;            /* config    MMC               */
+
+/* Grouping sections into segments */
+
+ENTRY(reset)
+
+SECTIONS
+{
+   . = seg_kcode_base;
+   seg_kcode : {
+      *(.giet)
+      *(.switch)
+      *(.drivers)
+      *(.isr)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.kdata)
+   }
+   . = seg_kunc_base;
+   seg_kunc : {
+      *(.unckdata)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.ksave)
+   }
+   . = seg_code_base;
+   seg_code : {
+      *(.text)
+   }
+   . = seg_reset_base;
+   seg_reset : {
+      *(.reset)
+   }
+   . = seg_data_base;
+   seg_data : {
+      *(.rodata)
+      . = ALIGN(4);
+      *(.rodata.*)
+      . = ALIGN(4);
+      *(.data)
+      . = ALIGN(4);
+      *(.sdata)
+      . = ALIGN(4);
+      *(.bss)
+      *(COMMON)
+      *(.sbss)
+   }
+}
Index: trunk/softs/soft_hello_giet/hard_config.h
===================================================================
--- trunk/softs/soft_hello_giet/hard_config.h	(revision 809)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*******************************************************************/
-/* This file define various hardware parameters that are used by   */
-/* both the giet_tsar OS and by the hardware (top.cpp file)        */
-/*******************************************************************/
-
-#ifndef _HARD_CONFIG_H
-#define _HARD_CONFIG_H
-
-#define	 X_SIZE              2
-#define	 Y_SIZE              2
-#define	 X_WIDTH             4
-#define	 Y_WIDTH             4
-
-#define	 NB_PROCS_MAX        1
-
-#define  USE_RAMDISK         1
-#define  USE_EXT_IO          0
-
-#define	 NB_DMA_CHANNELS     0
-#define	 NB_HBA_CHANNELS     0
-#define	 NB_NIC_CHANNELS     0
-#define	 NB_CMA_CHANNELS     0
-
-#define	 NB_TTY_CHANNELS     1
-
-#endif //_HARD_CONFIG_H
Index: trunk/softs/soft_hello_giet/ldscript
===================================================================
--- trunk/softs/soft_hello_giet/ldscript	(revision 809)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/**********************************************************
-	File : ldscript 
-	Author : Alain Greiner
-	Date : January 2014
-**********************************************************/
-
-/* definition of the base address for all segments 
-The peripherals base addresses are referenced by the
-software drivers and must be defined, even if the 
-peripherals are not present in the architecture */
-
-seg_reset_base   = 0x00000000;       /* boot code                   */
-
-seg_kcode_base   = 0x00010000;       /* kernel code                 */
-seg_kdata_base   = 0x00020000;       /* kernel cacheable data       */
-seg_kunc_base    = 0x00030000;       /* kernel uncacheable data     */
-
-seg_code_base    = 0x00040000;       /* application code            */ 
-seg_data_base    = 0x00050000;       /* application data            */
-
-seg_heap_base    = 0x00100000;       /* heaps for applications      */
-seg_stack_base   = 0x00300000;       /* stacks ifor applications    */
-
-seg_ramdisk_base = 0x00800000;       /* virtual disk                */
-
-seg_xcu_base     = 0xF0000000;       /* controler XCU               */
-seg_tty_base     = 0xF4000000;       /* controler TTY               */
-seg_fbf_base     = 0xF3000000;       /* controler FBF               */
-seg_ioc_base     = 0xF2000000;       /* controler IOC               */
-seg_nic_base     = 0xF7000000;       /* controler NIC               */
-seg_cma_base     = 0xF8000000;       /* controler CMA               */
-seg_pic_base     = 0xF9000000;       /* controler PIC               */
-seg_mmc_base     = 0xE0000000;       /* config    MMC               */
-
-
-/* Grouping sections into segments */
-
-SECTIONS
-{
-   . = seg_kcode_base;
-   seg_kcode : {
-      *(.giet)
-      *(.switch)
-      *(.drivers)
-      *(.isr)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.kdata)
-   } 
-   . = seg_kunc_base;
-   seg_kunc : {
-      *(.unckdata)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.ksave)
-   } 
-   . = seg_code_base;
-   seg_code : {
-      *(.text)
-   } 
-   . = seg_reset_base;
-   seg_reset : {
-      *(.reset)
-   } 
-   . = seg_data_base;
-   seg_data : {
-      *(.rodata)
-      . = ALIGN(4);
-      *(.rodata.*)
-      . = ALIGN(4);
-      *(.data)
-      . = ALIGN(4);
-      *(.sdata)
-      . = ALIGN(4);
-      *(.bss)
-      *(COMMON)
-      *(.sbss)
-   } 
-}
-
Index: trunk/softs/soft_sort_giet/Makefile
===================================================================
--- trunk/softs/soft_sort_giet/Makefile	(revision 809)
+++ trunk/softs/soft_sort_giet/Makefile	(revision 810)
@@ -13,6 +13,6 @@
 GIET =	../giet_tsar
 
-bin.soft: $(OBJS) ldscript
-	$(LD) -o $@ -T ldscript $(OBJS)
+bin.soft: $(OBJS) giet.ld
+	$(LD) -o $@ -T giet.ld $(OBJS)
 	$(DU) -D $@ > $@.txt
 
@@ -33,4 +33,7 @@
 	$(DU) -D $@ > $@.txt
 
+giet.ld: giet.ld.in
+	$(CC) -x c -P -E -I. $< -o $@
+
 clean:
-	rm -f *.o bin.soft *.txt core term* temp
+	rm -f *.o bin.soft *.txt core term* temp giet.ld
Index: trunk/softs/soft_sort_giet/giet.ld.in
===================================================================
--- trunk/softs/soft_sort_giet/giet.ld.in	(revision 810)
+++ trunk/softs/soft_sort_giet/giet.ld.in	(revision 810)
@@ -0,0 +1,79 @@
+/**
+ * \file   : giet.ld.in
+ * \author : Cesar Fuguet
+ * \date   : September 19, 2014
+ *
+ * \brief  : giet ldscript template
+ * \note   : must be compiled with gcc to generate an instance
+ */
+
+#include <hard_config.h>
+
+seg_reset_base   = RESET_ADDRESS;           /* boot code                   */
+
+seg_kcode_base   = SEG_RAM_BASE + 0x10000;  /* kernel code                 */
+seg_kdata_base   = SEG_RAM_BASE + 0x20000;  /* kernel cacheable data       */
+seg_kunc_base    = SEG_RAM_BASE + 0x30000;  /* kernel uncacheable data     */
+seg_code_base    = SEG_RAM_BASE + 0x40000;  /* application code            */
+seg_data_base    = SEG_RAM_BASE + 0x50000;  /* application data            */
+seg_heap_base    = SEG_RAM_BASE + 0x100000; /* heaps for applications      */
+seg_stack_base   = SEG_RAM_BASE + 0x300000; /* stacks ifor applications    */
+seg_ramdisk_base = SEG_RAM_BASE + 0x800000; /* virtual disk                */
+
+seg_xcu_base     = SEG_XCU_BASE;            /* controler XCU               */
+seg_tty_base     = SEG_TTY_BASE;            /* controler TTY               */
+seg_fbf_base     = SEG_FBF_BASE;            /* controler FBF               */
+seg_ioc_base     = SEG_IOC_BASE;            /* controler IOC               */
+seg_nic_base     = SEG_NIC_BASE;            /* controler NIC               */
+seg_cma_base     = SEG_CMA_BASE;            /* controler CMA               */
+seg_pic_base     = SEG_PIC_BASE;            /* controler PIC               */
+seg_mmc_base     = SEG_MMC_BASE;            /* config    MMC               */
+
+/* Grouping sections into segments */
+
+ENTRY(reset)
+
+SECTIONS
+{
+   . = seg_kcode_base;
+   seg_kcode : {
+      *(.giet)
+      *(.switch)
+      *(.drivers)
+      *(.isr)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.kdata)
+   }
+   . = seg_kunc_base;
+   seg_kunc : {
+      *(.unckdata)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.ksave)
+   }
+   . = seg_code_base;
+   seg_code : {
+      *(.text)
+   }
+   . = seg_reset_base;
+   seg_reset : {
+      *(.reset)
+   }
+   . = seg_data_base;
+   seg_data : {
+      *(.rodata)
+      . = ALIGN(4);
+      *(.rodata.*)
+      . = ALIGN(4);
+      *(.data)
+      . = ALIGN(4);
+      *(.sdata)
+      . = ALIGN(4);
+      *(.bss)
+      *(COMMON)
+      *(.sbss)
+   }
+}
Index: trunk/softs/soft_sort_giet/hard_config.h
===================================================================
--- trunk/softs/soft_sort_giet/hard_config.h	(revision 809)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*******************************************************************/
-/* This file define various hardware parameters that are used by   */
-/* both the giet_tsar OS and by the hardware (top.cpp file)        */
-/*******************************************************************/
-
-#ifndef _HARD_CONFIG_H
-#define _HARD_CONFIG_H
-
-#define	 X_SIZE              2
-#define	 Y_SIZE              2
-#define	 X_WIDTH             4
-#define	 Y_WIDTH             4
-
-#define	 NB_PROCS_MAX        1
-
-#define  USE_RAMDISK         1
-#define  USE_EXT_IO          0
-
-#define	 NB_DMA_CHANNELS     0
-#define	 NB_HBA_CHANNELS     0
-#define	 NB_NIC_CHANNELS     0
-#define	 NB_CMA_CHANNELS     0
-
-#define	 NB_TTY_CHANNELS     1
-
-#endif //_HARD_CONFIG_H
Index: trunk/softs/soft_sort_giet/ldscript
===================================================================
--- trunk/softs/soft_sort_giet/ldscript	(revision 809)
+++ 	(revision )
@@ -1,82 +1,0 @@
-/**********************************************************
-	File : ldscript 
-	Author : Alain Greiner
-	Date : January 2014
-**********************************************************/
-
-/* definition of the base address for all segments 
-The peripherals base addresses are referenced by the
-software drivers and must be defined, even if the 
-peripherals are not present in the architecture */
-
-seg_reset_base   = 0x00000000;       /* boot code                   */
-
-seg_kcode_base   = 0x00010000;       /* kernel code                 */
-seg_kdata_base   = 0x00020000;       /* kernel cacheable data       */
-seg_kunc_base    = 0x00030000;       /* kernel uncacheable data     */
-
-seg_code_base    = 0x00040000;       /* application code            */ 
-seg_data_base    = 0x00050000;       /* application data            */
-
-seg_heap_base    = 0x00100000;       /* heaps for applications      */
-seg_stack_base   = 0x00300000;       /* stacks ifor applications    */
-
-seg_ramdisk_base = 0x00800000;       /* virtual disk                */
-
-seg_xcu_base     = 0xF0000000;       /* controler XCU               */
-seg_tty_base     = 0xF4000000;       /* controler TTY               */
-seg_fbf_base     = 0xF3000000;       /* controler FBF               */
-seg_ioc_base     = 0xF2000000;       /* controler IOC               */
-seg_nic_base     = 0xF7000000;       /* controler NIC               */
-seg_cma_base     = 0xF8000000;       /* controler CMA               */
-seg_pic_base     = 0xF9000000;       /* controler PIC               */
-seg_mmc_base     = 0xE0000000;       /* config    MMC               */
-
-
-/* Grouping sections into segments */
-
-SECTIONS
-{
-   . = seg_kcode_base;
-   seg_kcode : {
-      *(.giet)
-      *(.switch)
-      *(.drivers)
-      *(.isr)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.kdata)
-   } 
-   . = seg_kunc_base;
-   seg_kunc : {
-      *(.unckdata)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.ksave)
-   } 
-   . = seg_code_base;
-   seg_code : {
-      *(.text)
-   } 
-   . = seg_reset_base;
-   seg_reset : {
-      *(.reset)
-   } 
-   . = seg_data_base;
-   seg_data : {
-      *(.rodata)
-      . = ALIGN(4);
-      *(.rodata.*)
-      . = ALIGN(4);
-      *(.data)
-      . = ALIGN(4);
-      *(.sdata)
-      . = ALIGN(4);
-      *(.bss)
-      *(COMMON)
-      *(.sbss)
-   } 
-}
-
Index: trunk/softs/soft_transpose_giet/Makefile
===================================================================
--- trunk/softs/soft_transpose_giet/Makefile	(revision 809)
+++ trunk/softs/soft_transpose_giet/Makefile	(revision 810)
@@ -9,16 +9,14 @@
        main.o
 
-CFLAGS = -Wall -mno-gpopt -ffreestanding -fomit-frame-pointer -mips32 \
-         -msoft-float -O2 \
-         # -ggdb -mlong-calls 
+CFLAGS = -Wall -mno-gpopt -ffreestanding -fomit-frame-pointer -mips32
 
 GIET =	../giet_tsar
 
-bin.soft: $(OBJS) ldscript
-	$(LD) -o $@ -T ldscript $(OBJS)
+bin.soft: $(OBJS) giet.ld
+	$(LD) -o $@ -T giet.ld $(OBJS)
 	$(DU) -D $@ > $@.txt
 
 reset.o: $(GIET)/reset.S hard_config.h
-	$(CC) -I. -I$(GIET) $(CFLAGS) -c -o $@ $<
+	$(CC) -I. $(CFLAGS) -c -o $@ $<
 	$(DU) -D $@ > $@.txt
 
@@ -35,4 +33,7 @@
 	$(DU) -D $@ > $@.txt
 
+giet.ld: giet.ld.in
+	$(CC) -x c -P -E -I. $< -o $@
+
 clean:
-	rm -f *.o bin.soft *.txt core term* temp
+	rm -f *.o bin.soft *.txt core term* temp giet.ld
Index: trunk/softs/soft_transpose_giet/giet.ld.in
===================================================================
--- trunk/softs/soft_transpose_giet/giet.ld.in	(revision 810)
+++ trunk/softs/soft_transpose_giet/giet.ld.in	(revision 810)
@@ -0,0 +1,79 @@
+/**
+ * \file   : giet.ld.in
+ * \author : Cesar Fuguet
+ * \date   : September 19, 2014
+ *
+ * \brief  : giet ldscript template
+ * \note   : must be compiled with gcc to generate an instance
+ */
+
+#include <hard_config.h>
+
+seg_reset_base   = RESET_ADDRESS;           /* boot code                   */
+
+seg_kcode_base   = SEG_RAM_BASE + 0x10000;  /* kernel code                 */
+seg_kdata_base   = SEG_RAM_BASE + 0x20000;  /* kernel cacheable data       */
+seg_kunc_base    = SEG_RAM_BASE + 0x30000;  /* kernel uncacheable data     */
+seg_code_base    = SEG_RAM_BASE + 0x40000;  /* application code            */
+seg_data_base    = SEG_RAM_BASE + 0x50000;  /* application data            */
+seg_heap_base    = SEG_RAM_BASE + 0x100000; /* heaps for applications      */
+seg_stack_base   = SEG_RAM_BASE + 0x300000; /* stacks ifor applications    */
+seg_ramdisk_base = SEG_RAM_BASE + 0x800000; /* virtual disk                */
+
+seg_xcu_base     = SEG_XCU_BASE;            /* controler XCU               */
+seg_tty_base     = SEG_TTY_BASE;            /* controler TTY               */
+seg_fbf_base     = SEG_FBF_BASE;            /* controler FBF               */
+seg_ioc_base     = SEG_IOC_BASE;            /* controler IOC               */
+seg_nic_base     = SEG_NIC_BASE;            /* controler NIC               */
+seg_cma_base     = SEG_CMA_BASE;            /* controler CMA               */
+seg_pic_base     = SEG_PIC_BASE;            /* controler PIC               */
+seg_mmc_base     = SEG_MMC_BASE;            /* config    MMC               */
+
+/* Grouping sections into segments */
+
+ENTRY(reset)
+
+SECTIONS
+{
+   . = seg_kcode_base;
+   seg_kcode : {
+      *(.giet)
+      *(.switch)
+      *(.drivers)
+      *(.isr)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.kdata)
+   }
+   . = seg_kunc_base;
+   seg_kunc : {
+      *(.unckdata)
+   }
+   . = seg_kdata_base;
+   seg_kdata : {
+      *(.ksave)
+   }
+   . = seg_code_base;
+   seg_code : {
+      *(.text)
+   }
+   . = seg_reset_base;
+   seg_reset : {
+      *(.reset)
+   }
+   . = seg_data_base;
+   seg_data : {
+      *(.rodata)
+      . = ALIGN(4);
+      *(.rodata.*)
+      . = ALIGN(4);
+      *(.data)
+      . = ALIGN(4);
+      *(.sdata)
+      . = ALIGN(4);
+      *(.bss)
+      *(COMMON)
+      *(.sbss)
+   }
+}
Index: trunk/softs/soft_transpose_giet/hard_config.h
===================================================================
--- trunk/softs/soft_transpose_giet/hard_config.h	(revision 809)
+++ trunk/softs/soft_transpose_giet/hard_config.h	(revision 810)
@@ -1,27 +1,113 @@
-/*******************************************************************/
-/* This file define various hardware parameters that are used by   */
-/* both the giet_tsar OS and by the hardware (top.cpp file)        */
-/*******************************************************************/
+/* Generated by genmap for tsar_iob_2_2_4 */
 
-#ifndef _HARD_CONFIG_H
-#define _HARD_CONFIG_H
+#ifndef HARD_CONFIG_H
+#define HARD_CONFIG_H
 
-#define	 X_SIZE              6
-#define	 Y_SIZE              6
-#define	 X_WIDTH             4
-#define	 Y_WIDTH             4
-#define  X_IO                0//(X_SIZE - 1)
-#define  Y_IO                0//(Y_SIZE - 1)
+/* General platform parameters */
 
-#define	 NB_PROCS_MAX        4
+#define X_SIZE                 2
+#define Y_SIZE                 2
+#define X_WIDTH                4
+#define Y_WIDTH                4
+#define P_WIDTH                2
+#define X_IO                   0
+#define Y_IO                   0
+#define NB_PROCS_MAX           4
+#define IRQ_PER_PROCESSOR      4
+#define RESET_ADDRESS          0xbfc00000
+#define NB_TOTAL_PROCS         16
 
-#define  USE_RAMDISK         0
-#define  USE_PIC             1
+/* Peripherals */
 
-#define	 NB_DMA_CHANNELS     0
-#define	 NB_HBA_CHANNELS     0
-#define	 NB_NIC_CHANNELS     0
-#define	 NB_CMA_CHANNELS     0
-#define	 NB_TTY_CHANNELS     1
+#define NB_TTY_CHANNELS        1
+#define NB_IOC_CHANNELS        1
+#define NB_NIC_CHANNELS        2
+#define NB_CMA_CHANNELS        4
+#define NB_TIM_CHANNELS        0
+#define NB_DMA_CHANNELS        4
 
-#endif //_HARD_CONFIG_H
+#define USE_XCU                1
+#define USE_IOB                1
+#define USE_PIC                1
+#define USE_FBF                1
+
+#define USE_IOC_BDV            1
+#define USE_IOC_SPI            0
+#define USE_IOC_HBA            0
+#define USE_IOC_RDK            0
+
+#define FBUF_X_SIZE            128
+#define FBUF_Y_SIZE            128
+
+#define XCU_NB_INPUTS          16
+
+/* base addresses and sizes for physical segments */
+
+#define SEG_RAM_BASE           0x0
+#define SEG_RAM_SIZE           0x40000
+
+#define SEG_CMA_BASE           0xb6000000
+#define SEG_CMA_SIZE           0x4000
+
+#define SEG_DMA_BASE           0xb1000000
+#define SEG_DMA_SIZE           0x4000
+
+#define SEG_FBF_BASE           0xb7000000
+#define SEG_FBF_SIZE           0x4000
+
+#define SEG_ICU_BASE           0xffffffff
+#define SEG_ICU_SIZE           0x0
+
+#define SEG_IOB_BASE           0xbe000000
+#define SEG_IOB_SIZE           0x1000
+
+#define SEG_IOC_BASE           0xb3000000
+#define SEG_IOC_SIZE           0x1000
+
+#define SEG_MMC_BASE           0xb2000000
+#define SEG_MMC_SIZE           0x1000
+
+#define SEG_MWR_BASE           0xffffffff
+#define SEG_MWR_SIZE           0x0
+
+#define SEG_ROM_BASE           0xbfc00000
+#define SEG_ROM_SIZE           0x8000
+
+#define SEG_SIM_BASE           0xb9000000
+#define SEG_SIM_SIZE           0x1000
+
+#define SEG_NIC_BASE           0xb5000000
+#define SEG_NIC_SIZE           0x80000
+
+#define SEG_PIC_BASE           0xb8000000
+#define SEG_PIC_SIZE           0x1000
+
+#define SEG_TIM_BASE           0xffffffff
+#define SEG_TIM_SIZE           0x0
+
+#define SEG_TTY_BASE           0xb4000000
+#define SEG_TTY_SIZE           0x4000
+
+#define SEG_XCU_BASE           0xb0000000
+#define SEG_XCU_SIZE           0x1000
+
+#define SEG_RDK_BASE           0xffffffff
+#define SEG_RDK_SIZE           0x0
+
+#define PERI_CLUSTER_INCREMENT 0x10000
+
+/* physical base addresses for identity mapped vsegs */
+/* used by the GietVM OS                             */
+
+#define SEG_BOOT_MAPPING_BASE  0x0
+#define SEG_BOOT_MAPPING_SIZE  0x80000
+
+#define SEG_BOOT_CODE_BASE     0x80000
+#define SEG_BOOT_CODE_SIZE     0x40000
+
+#define SEG_BOOT_DATA_BASE     0xc0000
+#define SEG_BOOT_DATA_SIZE     0x80000
+
+#define SEG_BOOT_STACK_BASE    0x140000
+#define SEG_BOOT_STACK_SIZE    0x50000
+#endif
Index: trunk/softs/soft_transpose_giet/ldscript
===================================================================
--- trunk/softs/soft_transpose_giet/ldscript	(revision 809)
+++ 	(revision )
@@ -1,85 +1,0 @@
-/**********************************************************
-	File : ldscript 
-	Author : Alain Greiner
-	Date : January 2014
-**********************************************************/
-
-/* definition of the base address for all segments 
-The peripherals base addresses are referenced by the
-software drivers and must be defined, even if the 
-peripherals are not present in the architecture */
-
-seg_reset_base   = 0xBFC00000;       /* boot code                   */
-
-seg_kcode_base   = 0x00010000;       /* kernel code                 */
-seg_kdata_base   = 0x00020000;       /* kernel cacheable data       */
-seg_kunc_base    = 0x00030000;       /* kernel uncacheable data     */
-
-seg_code_base    = 0x00040000;       /* application code            */ 
-seg_data_base    = 0x00050000;       /* application data            */
-
-seg_heap_base    = 0x00100000;       /* heaps for applications      */
-seg_stack_base   = 0x00300000;       /* stacks for applications     */
-
-seg_ramdisk_base = 0xFFFFFFFF;       /* virtual disk                */
-
-seg_xcu_base     = 0xB0000000;       /* XCU controller              */
-seg_dma_base     = 0xB1000000;       /* DMA controller              */
-seg_mmc_base     = 0xB2000000;       /* config    MMC               */
-seg_ioc_base     = 0xB3000000;       /* IOC controller              */
-seg_tty_base     = 0xB4000000;       /* TTY controller              */
-seg_nic_base     = 0xB5000000;       /* NIC controller              */
-seg_cma_base     = 0xB6000000;       /* CMA controller              */
-seg_fbf_base     = 0xB7000000;       /* FBF controller              */
-seg_pic_base     = 0xB8000000;       /* PIC controller              */
-
-ENTRY(reset)
-
-/* Grouping sections into segments */
-
-SECTIONS
-{
-   . = seg_kcode_base;
-   seg_kcode : {
-      *(.giet)
-      *(.switch)
-      *(.drivers)
-      *(.isr)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.kdata)
-   } 
-   . = seg_kunc_base;
-   seg_kunc : {
-      *(.unckdata)
-   } 
-   . = seg_kdata_base;
-   seg_kdata : {
-      *(.ksave)
-   } 
-   . = seg_code_base;
-   seg_code : {
-      *(.text)
-      *(.text.*)
-   } 
-   . = seg_reset_base;
-   seg_reset : {
-      *(.reset)
-   } 
-   . = seg_data_base;
-   seg_data : {
-      *(.rodata)
-      . = ALIGN(4);
-      *(.rodata.*)
-      . = ALIGN(4);
-      *(.data)
-      . = ALIGN(4);
-      *(.sdata)
-      . = ALIGN(4);
-      *(.bss)
-      *(COMMON)
-      *(.sbss)
-   } 
-}
-
