Page MenuHomeFreeBSD

riscv: Implement pmap_mapdev_attr
ClosedPublic

Authored by jrtc27 on Sun, Oct 10, 7:08 PM.

Details

Summary

This is needed for LinuxKPI's _ioremap_attr. This reuses the generic
implementation introduced for aarch64, and itself requires implementing
pmap_kenter, which is trivial to do given riscv currently treats all
mapping attributes the same due to the Svpbmt extension not yet being
ratified and in hardware.

MFC after: 1 week

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj added inline comments.
sys/riscv/riscv/pmap.c
919
This revision is now accepted and ready to land.Mon, Oct 11, 5:24 PM
mhorne added inline comments.
sys/riscv/include/pmap.h
147

It would be nice to eventually land on a common interface for pmap_kenter() across various architectures, but matching arm64 here is sensible and required.

sys/riscv/include/pmap.h
147

Yeah, though most other architectures assume size is PAGE_SIZE so would require a bit more work than just adding arguments to their implementations

sys/riscv/riscv/pmap.c
919

Good point, will do on commit

This revision was automatically updated to reflect the committed changes.