Add RISC-V (RV64) port
authorBen Hutchings <ben@decadent.org.uk>
Tue, 17 Jul 2018 01:55:19 +0000 (02:55 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 6 Jan 2019 19:33:01 +0000 (19:33 +0000)
commit72e99ba86df188a5f45090e18fd8e005483bc82c
treeb061c91cd76d7ea6d131479f882686abf07155b2
parenta1b81bb98402d4285bb483ce5e0ef3ad5a4f4c58
Add RISC-V (RV64) port

RISC-V is pretty boring.  I've cribbed most of this from the MIPS and
AArch64 ports.

I ran into difficulty with initialisation of the gp,register, which I
think has to be process-global - the psABI says that signal handlers
can rely on it, and they could come from any module.  This means that
klibc.so and the executable using it need to agree on a single value.
Currently they don't, and this causes gp-relative addressing to go
wrong.

gp-relative addressing is introduced by "relaxation" in the linker,
so I've disabled that for now.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name add-riscv-rv64-port.patch
12 files changed:
usr/include/arch/riscv64/klibc/archconfig.h [new file with mode: 0644]
usr/include/arch/riscv64/klibc/archsetjmp.h [new file with mode: 0644]
usr/include/arch/riscv64/klibc/archsignal.h [new file with mode: 0644]
usr/include/arch/riscv64/klibc/archstat.h [new file with mode: 0644]
usr/include/arch/riscv64/machine/asm.h [new file with mode: 0644]
usr/klibc/SYSCALLS.def
usr/klibc/arch/riscv64/Kbuild [new file with mode: 0644]
usr/klibc/arch/riscv64/MCONFIG [new file with mode: 0644]
usr/klibc/arch/riscv64/crt0.S [new file with mode: 0644]
usr/klibc/arch/riscv64/setjmp.S [new file with mode: 0644]
usr/klibc/arch/riscv64/syscall.S [new file with mode: 0644]
usr/klibc/arch/riscv64/sysstub.ph [new file with mode: 0644]