Page MenuHomeFreeBSD

Implement bus_map_resource on arm64
ClosedPublic

Authored by andrew on Apr 10 2021, 1:05 PM.

Details

Summary

This will allow us to allocate an unmapped memory resource, then
later map it with a specific memory attribute.

Diff Detail

Repository
rG 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

Hmm, I should post some of my reviews. I have a branch that does this for most architectures but I also added some helpers to reduce code duplication in activate/deactive_resource methods. I also tried to fix some layering violations that I should perhaps untangle as that made the branch larger. The helpers at least are probably useful so I'll try to resurrect those soon.

In D29694#666735, @jhb wrote:

Hmm, I should post some of my reviews. I have a branch that does this for most architectures but I also added some helpers to reduce code duplication in activate/deactive_resource methods. I also tried to fix some layering violations that I should perhaps untangle as that made the branch larger. The helpers at least are probably useful so I'll try to resurrect those soon.

I'd want to upvote implementation of bus_map_resource() for arm64, because it is an essential change to make virtio_pci_modern work on arm64

In D29694#666735, @jhb wrote:

Hmm, I should post some of my reviews. I have a branch that does this for most architectures but I also added some helpers to reduce code duplication in activate/deactive_resource methods. I also tried to fix some layering violations that I should perhaps untangle as that made the branch larger. The helpers at least are probably useful so I'll try to resurrect those soon.

Are you planning to do this soon? If not I'd like to commit this so I can clean up some other code that manages device memory.

This revision was not accepted when it landed; it landed in state Needs Review.May 2 2021, 10:57 AM
This revision was automatically updated to reflect the committed changes.