Not sure, whether I should send this to the mailing list instead... here goes nothing.
I'm working on/attempting to upgrade drm-kmod - at least for i915. This leads me to missing iosys_map functionality in linuxkpi. After reading the linux kernel docs, FreeBSD driver development documentation and browsing the mailing list archive, I figure I could give this a try but would like to get some feedback first.
I'm thinking that this functionality could be represented in a wrapper within FreeBSD via bus_alloc_resource/bus_map_resource for device memory, regular memcpy for the system memory.
Huh, writing this out, makes me realize this likely needs to stick in the driver module, because the mapping to the device registered memory wouldn't work outside...
Still, I'm wondering whether I'm misreading what iosys_map does - this looks like a simple/stupid union that points to either mapped device memory or a pointer to kernel memory? Then again, if it's such a simple thing, I'd think this would already by in linuxkpi?
Anyone got any better ideas, how to wrap the functionality or maybe got some example project, that's already done it? Am I going at it the right way - are those bus_* methods the right ones to use? I've also seen pmap*, but from what I read, this isn't the right tool for the job?
I'm working on/attempting to upgrade drm-kmod - at least for i915. This leads me to missing iosys_map functionality in linuxkpi. After reading the linux kernel docs, FreeBSD driver development documentation and browsing the mailing list archive, I figure I could give this a try but would like to get some feedback first.
I'm thinking that this functionality could be represented in a wrapper within FreeBSD via bus_alloc_resource/bus_map_resource for device memory, regular memcpy for the system memory.
Huh, writing this out, makes me realize this likely needs to stick in the driver module, because the mapping to the device registered memory wouldn't work outside...
Still, I'm wondering whether I'm misreading what iosys_map does - this looks like a simple/stupid union that points to either mapped device memory or a pointer to kernel memory? Then again, if it's such a simple thing, I'd think this would already by in linuxkpi?
Anyone got any better ideas, how to wrap the functionality or maybe got some example project, that's already done it? Am I going at it the right way - are those bus_* methods the right ones to use? I've also seen pmap*, but from what I read, this isn't the right tool for the job?