On arm64 we currently use a non-posted write for device memory, however
we should move to use posted writes. This is expected to work on most
hardware, however we will need to support a non-posted option for some
broken hardware.
Details
- Reviewers
manu imp - Group Reviewers
arm64 manpages - Commits
- rG2abd4f858146: Add a way to map arm64 non-posted device memory
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 38530 Build 35419: arc lint + arc unit
Event Timeline
sys/arm64/include/vm.h | ||
---|---|---|
44 | They are both the same, is that a typo ? |
sys/arm64/include/vm.h | ||
---|---|---|
44 | I'm planning on changing VM_MEMATTR_DEVICE to VM_MEMATTR_DEVICE_nGnRE, but need to update the PCIe drivers to use non-posted memory for their config space first. |
sys/arm64/include/vm.h | ||
---|---|---|
44 | Ok thanks, maybe include that in the commit message so people don't ask the same question as me :) |
- Teach vmstat about VM_MEMATTR_DEVICE_NP
- Add a comment explaining why the device meory types are the same
We'll never have 'old broken devices' needing to use the BUS_SPACE_MAP_NONPOSTED attribute any place except arm64 because that's the only place they could possibly be, right?
Do we have any notion of which devices might be like this? Or is this a easy to do patch that allows quick 'CYA' fixes later if one remains hidden?
It's needed by the Tegra PCIe driver as it maps its config space via bus_space_map. The other PCI drivers use bus_alloc_resource_any for their config space so can be updated to use RF_UNMAPPED and bus_map_resource.