Actually it is not completely off-topic, I tell you why...<br><br>If I disassemble the executable and go to the hard_reset function:<br><br>40001000 <hard_reset>:<br>40001000: 03 10 00 00 sethi %hi(0x40000000), %g1<br>
40001004: 82 10 60 00 mov %g1, %g1 ! 40000000 <RAM_START><br>40001008: 81 98 40 00 mov %g1, %tbr<br>4000100c: 83 48 00 00 rd %psr, %g1<br>40001010: 84 00 60 01 add %g1, 1, %g2<br>
40001014: 84 08 a0 07 and %g2, 7, %g2<br>40001018: 86 10 20 01 mov 1, %g3<br>4000101c: 87 28 c0 02 sll %g3, %g2, %g3<br>40001020: 81 90 c0 00 mov %g3, %wim<br>40001024: 82 10 60 20 or %g1, 0x20, %g1<br>
40001028: 81 88 40 00 mov %g1, %psr<br>4000102c: 01 00 00 00 nop<br>40001030: 01 00 00 00 nop<br>40001034: 01 00 00 00 nop<br>40001038: 0d 10 00 01 sethi %hi(0x40000400), %g6<br>
4000103c: 8c 11 a3 c0 or %g6, 0x3c0, %g6 ! 400007c0 <_ERC32_MEC_Timer_Control_Mirror><br><b>40001040: dc 21 80 00 st %sp, [ %g6 ]</b><br>40001044: 23 10 00 4a sethi %hi(0x40012800), %l1<br>
40001048: a2 14 61 64 or %l1, 0x164, %l1 ! 40012964 <Configuration><br>4000104c: e6 04 60 04 ld [ %l1 + 4 ], %l3<br><b>40001050: 9c 23 80 13 sub %sp, %l3, %sp<br>40001054: 9c 2b a0 0f andn %sp, 0xf, %sp<br>
40001058: bc 10 00 0e mov %sp, %fp<br></b>4000105c: 01 00 00 00 nop<br>40001060: 05 10 00 4a sethi %hi(0x40012800), %g2<br>40001064: 84 10 a0 a0 or %g2, 0xa0, %g2 ! 400128a0 <_endtext><br>
40001068: 07 10 00 4a sethi %hi(0x40012800), %g3<br>4000106c: 86 10 e0 a0 or %g3, 0xa0, %g3 ! 400128a0 <_endtext><br>40001070: 09 10 00 4d sethi %hi(0x40013400), %g4<br>40001074: 88 11 22 70 or %g4, 0x270, %g4 ! 40013670 <__bss_start><br>
40001078: 80 a0 80 03 cmp %g2, %g3<br>4000107c: 02 80 00 09 be 400010a0 <copy_data+0x1c><br>40001080: 01 00 00 00 nop<br><br><br>Find in bold where the %sp is modified. There is not single instruction to set up the %sp register. The first one stores the VALUE of the %sp into the address pointed by %g6, and the next operation over the %sp subtract fro %sp, so the %sp value should be 0xFFFFXXXX ??? and this is RTEMS business.<br>
<br>Again the question is where the %sp is set, in RTEMS ?<br><br>the ./lib/libbsp/sparc/shared/start.S file matches with the disassemble code...<br><br><br><div class="gmail_quote">On Tue, May 6, 2008 at 11:41 AM, Ralf Corsepius <<a href="mailto:ralf.corsepius@rtems.org">ralf.corsepius@rtems.org</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
On Tue, 2008-05-06 at 10:16 +0200, <a href="mailto:Aitor.Viana.Sanchez@esa.int">Aitor.Viana.Sanchez@esa.int</a> wrote:<br>
><br>
> Hi all,<br>
><br>
> I've got some weird (for me) when executing the rtems-hello example in<br>
> the tsim-leon2 professional version.<br>
<br>
</div>Off topic for this list - Ask Gaisler.<br>
<font color="#888888"><br>
Ralf<br>
<br>
<br>
<br>
</font></blockquote></div><br>