T-Head implemented a page attribute extension that violates the RISC-V
authorkettenis <kettenis@openbsd.org>
Tue, 23 Jan 2024 19:51:10 +0000 (19:51 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 23 Jan 2024 19:51:10 +0000 (19:51 +0000)
commit84aa31c6dccc7ce19e85f1b6fd453682af038fa3
tree92423b05a2d0ad32e66c02f013196e43a77d7256
parentaa95fb555a4c96d1734957962ba631e6fe724310
T-Head implemented a page attribute extension that violates the RISC-V
specification.  The default attributes result in memory being uncached
which makes the system perform like a slug.  So implement a workaround
that is designed to make implementation of the Svpbmt extension that is
part of the latest published RISC-V specification.  This gets us a bit
further booting OpenBSD on an Allwinner D1 SoC.

ok mlarkin@, jca@
sys/arch/riscv64/include/pmap.h
sys/arch/riscv64/include/pte.h
sys/arch/riscv64/riscv64/cpu.c
sys/arch/riscv64/riscv64/machdep.c
sys/arch/riscv64/riscv64/pmap.c