u-boot/arch/sandbox/cpu
Heinrich Schuchardt 205b9f5100 sandbox: correct determination of the text base
os_find_text_base() assumes that first line of /proc/self/maps holds
information about the text. Hence we must call the function before calling
os_malloc() which calls mmap(0x10000000,).

Failure to do so has led to incorrect values for pc_reloc when an
exception was reported

    => exception undefined

    Illegal instruction
    pc = 0x5628d82e9d3c, pc_reloc = 0x5628c82e9d3c

as well as incorrect output of the bdinfo command

    => bdinfo
    relocaddr   = 0x0000000007858000
    reloc off   = 0x0000000010000000

Fixes: b308d9fd18 ("sandbox: Avoid using malloc() for system state")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-06-05 07:35:47 -06:00
..
cache.c sandbox: implement invalidate_icache_all() 2020-12-22 20:39:25 -07:00
cpu.c sandbox: Correct uninit conflict 2021-03-27 15:04:31 +13:00
eth-raw-os.c sandbox: eth-raw: do not close the console input 2020-11-05 09:11:30 -07:00
Makefile sandbox: implement invalidate_icache_all() 2020-12-22 20:39:25 -07:00
os.c sandbox: use sections instead of symbols for getopt array boundaries 2021-05-24 14:21:30 -04:00
sdl.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00
spl.c sandbox: Update os_find_u_boot() to find the .img file 2021-03-12 09:57:31 -05:00
start.c sandbox: correct determination of the text base 2021-06-05 07:35:47 -06:00
state.c sandbox: Write out bloblist when exiting 2021-03-02 15:53:37 -05:00
u-boot-spl.lds sandbox: use sections instead of symbols for getopt array boundaries 2021-05-24 14:21:30 -04:00
u-boot.lds sandbox: use sections instead of symbols for getopt array boundaries 2021-05-24 14:21:30 -04:00