On Fri, 15 Mar 2019 02:06:07 PDT (-0700), Bastian Koppelmann wrote:
On 3/14/19 9:28 PM, Alistair Francis wrote:
On Wed, Mar 13, 2019 at 7:53 AM Palmer Dabbelt <address@hidden>
From: Bastian Koppelmann <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Bastian Koppelmann <address@hidden>
Signed-off-by: Peer Adelt <address@hidden>
This commit is the first bad commit in breaking 32-bit boot.
It looks like the jal doesn't jump to the correct address:
0x80000022: 00050433 add s0,a0,zero
0x80000026: 000584b3 add s1,a1,zero
0x8000002a: 2c79 jal ra,670 #
I think I've traced it down to something simple: in my hello world
0x800002c8: 00000533 add a0,zero,zero
0x800002cc: 8082 ret
Oops! Can you point me to the binary to reproduce this?
20401a8c: 2a45 jal 20401c3c <atexit>
in the objdump, and I see
0x20401a8c: 2a45 jal ra,432 #
but then QEMU jumps to 0x20401a9d. I have a feeling it's something
gen_jal() that disappeared during the cleanups that we dropped in
the build issues.
./riscv32-softmmu/qemu-system-riscv32 -machine sifive_e -kernel
~/work/sifive/freedom-e-sdk/software/hello/hello -nographic -d
in_asm,out_asm,exec,cpu -singlestep |& tee out.log
on the "hifive1" branch of github.com/palmer-dabbelt/qemu, which
PRCI fixup that I forgot about and haven't sent upstream yet (I'll
after this issue). The binary should be at
and the debug log at
You can build the binary from github.com/sifive/freedom-e-sdk via
make software PROGRAM=hello TARGET=sifive-hifive1
using the riscv64-unknown-elf-gcc-20181127-x86_64-linux-ubuntu14
binaries from our website (newer ones should work, but probably won't
exactly the same output).
I'll poke around after grabbing some dinner...