Index: trunk/softs/tsar_boot/include/defs.h
===================================================================
--- trunk/softs/tsar_boot/include/defs.h	(revision 703)
+++ trunk/softs/tsar_boot/include/defs.h	(revision 704)
@@ -3,5 +3,4 @@
 #define RESET_VERSION       0x00010002
 
-#define RESET_STACKS_SIZE   0x11000  /* 64 bytes * 1024 + 4 Kbytes (for P0) = 68 Kbytes */
 #define BOOT_LOADER_LBA     2
 #define PHDR_ARRAY_SIZE     16
Index: trunk/softs/tsar_boot/include/io.h
===================================================================
--- trunk/softs/tsar_boot/include/io.h	(revision 703)
+++ trunk/softs/tsar_boot/include/io.h	(revision 704)
@@ -1,23 +1,37 @@
-/**
+/**********************************************************************
  * \file	io.h
  * \date	5 September 2012
- * \author	Cesar Fuguet
+ * \author	Cesar Fuguet / Alain Greiner
  *
  * Utility functions to write or read memory mapped hardware registers
- */
+ *********************************************************************/
+
 #ifndef IO_H
 #define IO_H
 
-/**
+#include <defs.h>
+
+/**********************************************************************
  * Read an 32 bits memory mapped hardware register
- */
+ * with physical address extension to access cluster_io
+ *********************************************************************/
 static inline unsigned int ioread32(void * addr)
 {
-	return *(volatile unsigned int *) addr;
+    unsigned int value;
+    unsigned int ext = CLUSTER_IO;
+
+    asm volatile(
+        "mtc2  %2,    $24            \n"  /* PADDR_EXT <= cluster_io */
+        "lw    %0,    0(%1)          \n"  /* value <= *(ext\addr)    */
+        "mtc2  $0,    $24            \n"  /* PADDR_EXT <= 0          */
+        : "=r" (value)
+        : "r" (addr), "r" (ext) );
+
+    return value;
 }
 
-/**
+/**********************************************************************
  * Read an 16 bits memory mapped hardware register
- */
+ *********************************************************************/
 static inline unsigned short ioread16(void * addr)
 {
@@ -25,7 +39,7 @@
 }
 
-/**
+/**********************************************************************
  * Read an 8 bits memory mapped hardware register
- */
+ *********************************************************************/
 static inline unsigned char ioread8(void * addr)
 {
@@ -33,16 +47,24 @@
 }
 
-/**
+/**********************************************************************
  * Write an 32 bits memory mapped hardware register
- */
+ * with physical address extension to access cluster_io
+ *********************************************************************/
 static inline void iowrite32(void * addr, unsigned int value)
 {
-	*(volatile unsigned int *) addr = value;
-	asm volatile("sync" ::: "memory");
+    unsigned int ext = CLUSTER_IO;
+
+    asm volatile(
+        "mtc2  %2,    $24            \n"  /* PADDR_EXT <= cluster_io */
+        "sw    %0,    0(%1)          \n"  /* *(ext\addr) <= value    */
+        "mtc2  $0,    $24            \n"  /* PADDR_EXT <= 0          */
+	    "sync                        \n"  /* sync barrier            */
+        :
+        : "r" (value), "r" (addr), "r" (ext) );
 }
 
-/**
+/**********************************************************************
  * Write an 16 bits memory mapped hardware register
- */
+ *********************************************************************/
 static inline void iowrite16(void * addr, unsigned short value)
 {
@@ -51,7 +73,7 @@
 }
 
-/**
+/**********************************************************************
  * Write an 8 bits memory mapped hardware register
- */
+ *********************************************************************/
 static inline void iowrite8(void * addr, unsigned char value)
 {
Index: trunk/softs/tsar_boot/src/reset.S
===================================================================
--- trunk/softs/tsar_boot/src/reset.S	(revision 703)
+++ trunk/softs/tsar_boot/src/reset.S	(revision 704)
@@ -12,6 +12,7 @@
  * by the seg_reset_stack_base parameters in ldscript, of size 0x10000 (64k)
  * - Processor 0 uses a larger stack:         64 Kbytes.
- * - Other processors use a smaller stack:    512 bytes.
- *     => the stack size cannot be smaller than 0x90000 bytes (576 K).
+ * - Other processors use a smaller stack:    256 bytes.
+ *     => the seg_stack_size cannot be smaller than 0x50000 bytes (320 Kytes).
+ *         (64K + 1024 * 256 = 320 Kbytes)
  * Those stacks can be used by both the preloader and the boot-loader code.
  * 
Index: trunk/softs/tsar_boot/src/reset_tty.c
===================================================================
--- trunk/softs/tsar_boot/src/reset_tty.c	(revision 703)
+++ trunk/softs/tsar_boot/src/reset_tty.c	(revision 704)
@@ -1,2 +1,10 @@
+/********************************************************************
+ * \file    reset_tty.c
+ * \date    5 mars 2014
+ * \author  Cesar Fuguet 
+ *
+ * Minimal driver for TTY controler 
+ *******************************************************************/
+
 #include <reset_tty.h>
 #include <io.h>
@@ -7,8 +15,7 @@
 {
     unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
-    if (ioread32(&tty_address[TTY_STATUS]) == 0)
-        return 0;
 
-    *c = ioread32(&tty_address[TTY_READ]);
+    if (ioread32( &tty_address[TTY_STATUS] ) == 0) return 0;
+    *c = ioread32( &tty_address[TTY_READ] );
     return 1;
 }
@@ -18,10 +25,7 @@
 {
     unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
-    iowrite32(&tty_address[TTY_WRITE], (unsigned int)c);
 
-    if (c == '\n')
-    {
-        iowrite32(&tty_address[TTY_WRITE], (unsigned int)'\r');
-    }
+    iowrite32( &tty_address[TTY_WRITE], (unsigned int)c );
+    if (c == '\n') reset_putc( '\r' );
 }
 
@@ -34,5 +38,4 @@
     {
         if (buffer[n] == 0) break;
-
         reset_putc(buffer[n]);
     }
