U-Boot SPL crashes after stack setup

Osman aibaykaro at gmail.com
Mon Sep 9 18:08:08 CEST 2024


Hello,

I am having a crash with u-boot-spl simulated in spike, to be more spesific
the problem occurs after this line located in start.S:

mv sp, t0

and spike prints this:

dmi_read(0x05 (data[1]) -> -1 because abstractcs.busy==true

dmi_read(0x04 (data[0]) -> -1 because abstractcs.busy==true

My first thought was that the memory was unaccesible but that isn't the
case because i can see the contents of the memory through GDB (i will also
attach memory.png that shows the address at the sp pointer) and i provided
the memory for spl in spike like so:
./spike -H --rbb-port=9824
-m0x80000000:0x20000000,0x90000000:0x100000,0x00000000:0x20000,0x70000000:0x10000
$SPL_PATH

My second thought was that maybe somehow the size wasn't enough and the sp
just overlaps with some region but i checked the readelf (i will attach it
as readelf_output.txt) but nothing seemed unusual.

I am not really experienced in this topic so i would really appreciate it
if someone can guide me on the right direction.

You can see the config files attached to end of this e-mail.

Regards
-------------- next part --------------
There are 23 section headers, starting at offset 0xbfd30:

Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .text             PROGBITS         0000000080000000  00001000
       0000000000005178  0000000000000000  AX       0     0     4
  [ 2] .rodata           PROGBITS         0000000080005178  00006178
       0000000000000738  0000000000000000   A       0     0     8
  [ 3] .dtb.init.rodata  PROGBITS         00000000800058b0  000068b0
       0000000000000370  0000000000000000   A       0     0     16
  [ 4] .data             PROGBITS         0000000080005c20  00006c20
       0000000000000248  0000000000000000  WA       0     0     8
  [ 5] .got              PROGBITS         0000000080005e68  00006e68
       00000000000000a0  0000000000000008  WA       0     0     8
  [ 6] .got.plt          PROGBITS         0000000080005f08  00006f08
       0000000000000010  0000000000000008  WA       0     0     8
  [ 7] __u_boot_list     PROGBITS         0000000080005f18  00006f18
       0000000000000548  0000000000000000  WA       0     0     4
  [ 8] .binman_sym_table PROGBITS         0000000080006460  00007460
       0000000000000018  0000000000000000  WA       0     0     8
  [ 9] .bss              NOBITS           000000008001b008  00008008
       0000000000000018  0000000000000000  WA       0     0     8
  [10] .riscv.attributes RISCV_ATTRIBUTE  0000000000000000  00007478
       0000000000000023  0000000000000000           0     0     1
  [11] .comment          PROGBITS         0000000000000000  0000749b
       0000000000000012  0000000000000001  MS       0     0     1
  [12] .debug_line       PROGBITS         0000000000000000  000074ad
       00000000000260bf  0000000000000000           0     0     1
  [13] .debug_info       PROGBITS         0000000000000000  0002d56c
       00000000000419cc  0000000000000000           0     0     1
  [14] .debug_abbrev     PROGBITS         0000000000000000  0006ef38
       00000000000086fe  0000000000000000           0     0     1
  [15] .debug_aranges    PROGBITS         0000000000000000  00077640
       0000000000002e80  0000000000000000           0     0     16
  [16] .debug_str        PROGBITS         0000000000000000  0007a4c0
       0000000000009382  0000000000000001  MS       0     0     1
  [17] .debug_loc        PROGBITS         0000000000000000  00083842
       000000000002cfe2  0000000000000000           0     0     1
  [18] .debug_ranges     PROGBITS         0000000000000000  000b0824
       0000000000003860  0000000000000000           0     0     1
  [19] .debug_frame      PROGBITS         0000000000000000  000b4088
       0000000000007160  0000000000000000           0     0     8
  [20] .symtab           SYMTAB           0000000000000000  000bb1e8
       0000000000003660  0000000000000018          21   400     8
  [21] .strtab           STRTAB           0000000000000000  000be848
       00000000000013f8  0000000000000000           0     0     1
  [22] .shstrtab         STRTAB           0000000000000000  000bfc40
       00000000000000ec  0000000000000000           0     0     1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  p (processor specific)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: startS.png
Type: image/png
Size: 61842 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240909/1fed510f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memory.png
Type: image/png
Size: 29206 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240909/1fed510f/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odno.h
Type: text/x-chdr
Size: 356 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240909/1fed510f/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odno_defconfig
Type: application/octet-stream
Size: 3123 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240909/1fed510f/attachment.obj>


More information about the U-Boot mailing list