]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Support RISC-V implementations that do not manage the A and D bits
authorbr <br@FreeBSD.org>
Thu, 18 Oct 2018 15:25:07 +0000 (15:25 +0000)
committerbr <br@FreeBSD.org>
Thu, 18 Oct 2018 15:25:07 +0000 (15:25 +0000)
commite5126bd2902486b4d41f604fec60b087d68dcf1d
treebcabf542991079704849c6f95504a33a0ed71a16
parent8f689f289e1261b703801e83d396f66c99155d67
Support RISC-V implementations that do not manage the A and D bits
(e.g. RocketChip, lowRISC and derivatives).

RISC-V page table entries support A (accessed) and D (dirty) bits. The
spec makes hardware support for these bits optional. Implementations that
do not manage these bits in hardware raise page faults for accesses to a
valid page without A set and writes to a writable page without D set.
Check for these types of faults when handling a page fault and fixup the
PTE without calling vm_fault if they occur.

Reviewed by: jhb, markj
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17424
sys/riscv/include/pmap.h
sys/riscv/include/pte.h
sys/riscv/riscv/locore.S
sys/riscv/riscv/pmap.c
sys/riscv/riscv/trap.c