freebsd-src/sys/riscv
Mitchell Horne e9fa399180 riscv: T-HEAD early locore workaround
The T-HEAD custom PTE bits are defined in such a way that the
default/normal memory type is non-zero value. This _unthoughtful_ choice
means that, unlike the Svpbmt and non-Svpbmt cases, this field cannot be
left bare in our bootstrap PTEs, or the hardware will fail to proceed
far enough in boot (cache strangeness). On the other hand, we cannot
unconditionally apply the PTE_THEAD_MA_NONE attributes, as this is not
compatible with spec-compliant RISC-V hardware, and will result in a
fatal exception.

Therefore, in order to handle this errata, we are forced to perform a
check of the CPU type at the first moment possible. Do so, and fix up
the PTEs with the correct memory attribute bits in the T-HEAD case.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D47458
2024-11-25 17:08:04 -04:00
..
allwinner aw_syscon: enable for Allwinner D1 (riscv) 2024-11-16 15:04:04 -04:00
conf
include riscv: T-HEAD early locore workaround 2024-11-25 17:08:04 -04:00
riscv riscv: T-HEAD early locore workaround 2024-11-25 17:08:04 -04:00
sifive
starfive
thead riscv: T-HEAD PBMT support 2024-11-25 17:08:04 -04:00
vmm