| 02129bfe | 28-Jun-2019 |
Mitchell Horne <[email protected]> |
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 dat
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)
show more ...
|
| 94c4b730 | 28-Jun-2019 |
Mitchell Horne <[email protected]> |
MFC r346021: RISC-V: initialize pcpu slightly earlier
In certain scenarios, it is possible for PCPU data to be accessed before it has been initialized (e.g. during printf if the kernel was built wit
MFC r346021: RISC-V: initialize pcpu slightly earlier
In certain scenarios, it is possible for PCPU data to be accessed before it has been initialized (e.g. during printf if the kernel was built with the TSLOG option).
Initialize the PCPU pointer for hart 0 at the beginning of initriscv() rather than near the end.
Approved by: markj (mentor)
show more ...
|
| 18fad347 | 04-Jun-2019 |
Ruslan Bukin <[email protected]> |
MFC r347514:
Add support for HiFive Unleashed -- the board with a multi-core RISC-V SoC from SiFive, Inc.
The first core on this SoC (hart 0) is a 64-bit microcontroller.
o Pick a hart to run boot
MFC r347514:
Add support for HiFive Unleashed -- the board with a multi-core RISC-V SoC from SiFive, Inc.
The first core on this SoC (hart 0) is a 64-bit microcontroller.
o Pick a hart to run boot process using hart lottery. This allows to exclude hart 0 from running the boot process. (BBL releases hart 0 after the main harts, so it never wins the lottery). o Renumber CPUs early on boot. Exclude non-MMU cores. Store the original hart ID in struct pcpu. This allows to find out the correct destination for IPIs and remote sfence calls.
Thanks to SiFive, Inc for the board provided.
Sponsored by: DARPA, AFRL
show more ...
|