HomeFreeBSD

MFC 348835-348836:

Description

MFC 348835-348836:
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.

Approved by: markj (mentor, implicit)

Details

Provenance
mhorneAuthored on
Parents
rS349484: MFC r346021:
Branches
Unknown
Tags
Unknown