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>
Thu, 19 Jul 2018 00:13:54 +0000 (01:13 +0100)
commit3982cba63fb0f6f2b9e245f44152cc967bfcee40
tree0a6ecf3619c51412fd18a6878886cfcedb7259fd
parent79e38347bcd134e3169e6ae60320bc09c61d5c59
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]