freebsd-src/sys/riscv/include
Mitchell Horne 6ae48dd870 Fix global pointer relaxations in the RISC-V kernel
The gp register is intended to used by the linker as another means of
performing relaxations, and should point to the small data section (.sdata).

Currently gp is being used as the pcpu pointer within the kernel, but the more
appropriate choice for this is the tp register, which is unused.

Swap existing usage of gp with tp within the kernel, and set up gp properly
at boot with the value of __global_pointer$ for all harts.

Additionally, remove some cases of accessing tp from the PCB, as it is not
part of the per-thread state. The user's tp and gp should be tracked only
through the trapframe.

Reviewed by:	markj, jhb
Approved by:	markj (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D19893
2019-06-09 15:43:38 +00:00
..
_align.h
_bus.h
_inttypes.h
_limits.h
_stdint.h
_types.h Do not include float interfaces when using libsa. 2018-02-23 04:04:25 +00:00
asm.h Fix global pointer relaxations in the RISC-V kernel 2019-06-09 15:43:38 +00:00
atomic.h Implement atomic_swap_{int,long,ptr}(9). 2018-08-07 18:56:51 +00:00
bus_dma_impl.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
bus_dma.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
bus.h
clock.h
counter.h Back pcpu zone with domain correct pages 2018-07-06 02:06:03 +00:00
cpu.h RISC-V: Implement get_cyclecount(9). 2018-11-13 18:20:27 +00:00
cpufunc.h Provide a template for busdma code for RISC-V. 2019-05-07 13:41:43 +00:00
db_machdep.h
dump.h
efi.h
elf.h Consolidate identical ELF auxargs type defintions. 2018-10-22 22:24:32 +00:00
encoding.h Add RISC-V instructions encoding. 2018-08-13 16:07:18 +00:00
endian.h
exec.h
float.h
floatingpoint.h
fpe.h Various fixes for floating point on RISC-V. 2018-09-19 23:45:18 +00:00
frame.h Replace uses of sbadaddr with stval. 2018-12-19 17:52:09 +00:00
ieeefp.h
in_cksum.h
intr.h o Add driver for PLIC (Platform-Level Interrupt Controller) device. 2018-06-12 17:45:15 +00:00
kdb.h Various fixes for TLB management on RISC-V. 2018-10-15 18:56:54 +00:00
machdep.h
md_var.h
memdev.h
minidump.h
ofw_machdep.h
param.h Implement transparent 2MB superpage promotion for RISC-V. 2019-02-13 17:19:37 +00:00
pcb.h Implement per-CPU pmap activation tracking for RISC-V. 2019-02-13 17:50:01 +00:00
pcpu.h Fix global pointer relaxations in the RISC-V kernel 2019-06-09 15:43:38 +00:00
pmap.h Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
pmc_mdep.h
proc.h
procctl.h amd64 KPTI: add control from procctl(2). 2019-03-16 11:44:33 +00:00
profile.h
psl.h
pte.h Implement transparent 2MB superpage promotion for RISC-V. 2019-02-13 17:19:37 +00:00
ptrace.h
reg.h
reloc.h
resource.h
riscvreg.h Optimize RISC-V copyin(9)/copyout(9) routines. 2019-01-21 19:38:53 +00:00
runq.h
sbi.h Various fixes for TLB management on RISC-V. 2018-10-15 18:56:54 +00:00
setjmp.h Fix setjmp for RISC-V: 2018-07-23 09:54:28 +00:00
sf_buf.h
sigframe.h Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling 2019-01-29 20:10:27 +00:00
signal.h
smp.h o Add driver for PLIC (Platform-Level Interrupt Controller) device. 2018-06-12 17:45:15 +00:00
stack.h
stdarg.h
sysarch.h
trap.h
ucontext.h
vdso.h
vm.h
vmparam.h Implement transparent 2MB superpage promotion for RISC-V. 2019-02-13 17:19:37 +00:00