Index: trunk/sw/linker.lds
===================================================================
--- trunk/sw/linker.lds	(revision 32)
+++ trunk/sw/linker.lds	(revision 33)
@@ -2,9 +2,10 @@
  
 OUTPUT_FORMAT("elf64-sparc")
-ENTRY(main)
+ENTRY(__setup)
 
 
 SECTIONS { 
-  .text 0x00000020 : { *(.text) }
+  .boot 0x0000000000000020 : { *(.boot);}
+  .text : { *(.text) }
   .data : { *(.data) } 
   .bss :  { *(.bss)  *(COMMON) } 
Index: trunk/sw/uart.c
===================================================================
--- trunk/sw/uart.c	(revision 32)
+++ trunk/sw/uart.c	(revision 33)
@@ -1,5 +1,5 @@
 #include "uart.h"
 
-const int UART_BASE_ADR[1] = {0};
+const long UART_BASE_ADR[1] = {0x800000FFF0C2C000};
 const int UART_BAUDS[1] = {0};
 const int IN_CLK =50000000;
@@ -32,9 +32,20 @@
 volatile int tx_level, rx_level;
 
-void main() __attribute__((noreturn));
-void main() 
+void sal_main() __attribute__((noreturn));
+void sal_main() 
 {
-	asm("mov 0x00, %sp\n");
-	asm("mov 0x00, %fp\n");
+
+
+/*
+  #define CONFIG_SYS_GBL_DATA_SIZE       128     / size in bytes reserved for  initial data 
+  #define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+  #define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+
+stackp:
+	        set     CONFIG_SYS_INIT_SP_OFFSET, %fp
+	        andn    %fp, 0x0f, %fp
+	        sub     %fp, 64, %sp
+*/
 	uart_init(0);
 	for(;;) { 
@@ -49,8 +60,10 @@
 	int divisor;
 	float float_divisor;
-	
 	/* Reset receiver and transmiter */
 	REG8( UART_FCR ) = UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | UART_FCR_TRIGGER_14;
-	
+	//asm("clr %sp \n");	
+	//asm("sethi %hi(8), %sp \n");	
+	//asm("mov 0xfff, %sp \n");	
+
 	/* Disable all interrupts */
 	REG8(UART_BASE_ADR[core] + UART_IER) = 0x00;
Index: trunk/os2wb/os2wb.v
===================================================================
--- trunk/os2wb/os2wb.v	(revision 27)
+++ trunk/os2wb/os2wb.v	(revision 33)
@@ -122,5 +122,5 @@
 //`define MEM_SIZE         64'h00000000_10000000 //256 MB
 //`define MEM_SIZE         64'h00000000_00100000  //1MB
-`define MEM_SIZE         64'h00000000_00000100  //1KB
+`define MEM_SIZE         64'h00000000_00001000  //16KB
 
 // sal: escludo test della DRAM `define TEST_DRAM        1
@@ -689,5 +689,5 @@
                if(wb_ack)
                   begin
-                     $display("INFO: OS2WB: PCX_REQ_STEP1_1 wb_addr = %x",wb_addr);
+                     $display("INFO: OS2WB: PCX_REQ_STEP1_1 wb_addr = %x wb_data_i = %x wb_data_o =  ",wb_addr, wb_data_i,wb_data_o);
                      cpx_packet_1[144]<=1;     // Valid
                      cpx_packet_1[139]<=(pcx_packet_d[122:118]==5'b00000) || (pcx_packet_d[122:118]==5'b10000) ? 1:0; // L2 always miss on load and ifill
Index: trunk/tools/compila
===================================================================
--- trunk/tools/compila	(revision 30)
+++ trunk/tools/compila	(revision 33)
@@ -9,10 +9,13 @@
 
 
+#assembla il boot.S
+/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc-sun-solaris2.8-as -64 boot.S -o boot.o
+
 ## compila con ISA SPARC-V9
-/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -ffreestanding -nostdinc -Os -c $1.c
+/opt/sparc64-sun-solaris2.8-toolchain/bin/sparc64-sun-solaris2.8-gcc -m64 -ffreestanding -nostdinc -Os -c $1.c
 
 ## linka con ISA SPARC-V9 a 64 bits
 echo "create $1.bin"
-/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds $1.o -o $1.bin
+/opt/sparc64-sun-solaris2.8-toolchain/sparc64-sun-solaris2.8/bin/ld -melf64_sparc --script linker.lds boot.o $1.o -o $1.bin
 
 
Index: trunk/WB/wb_conbus_top.v
===================================================================
--- trunk/WB/wb_conbus_top.v	(revision 26)
+++ trunk/WB/wb_conbus_top.v	(revision 33)
@@ -144,8 +144,12 @@
 parameter		s1_addr = {40'h800000FFF0,1'b0};	// slave 1 address 
 
+//ETHERNET
 parameter		s2_addr_w = 56 ;  		   
 parameter		s2_addr = {56'h800000FFF0C2C1};		// slave 2 address
+
+//UART
 parameter		s3_addr_w = 60 ;  		   
 parameter		s3_addr = {60'h800000FFF0C2C00};	// slave 3 address
+
 parameter		s4_addr_w = 37 ;  		   
 parameter		s4_addr = {36'h800000FFF,1'b1};		// slave 4 address
