Hello Genodians What's the best way to handle multiple sets of identical registers on a hardware device?
In my current use case the device offers multiple DMA engines each of which has a complex set of registers to set up. Each register is located at base device address + base engine address + register offset so uniform handling should be easy. I handle the device itself and the shared registers using Platform::Device::Mmio. For the registers associated with each DMA engine I have tried: a) A template class providing a base offset as the template parameter. This is unsatisfactory however, as there is no common base class providing access to the registers for the software to be agnostic to which engine it handles. b) A separate class derived from Genode::Mmio. This looks promising, but the Platform::Device::Mmio unfortunatly offers no public accessor to the device base address so I cannot provide the base device address + base engine address to my engine mmio class. Any suggestions? Kind regards Stefan -- Freundliche Grüsse Stefan Thöni Chairman of the Board Senior Security Architect +41 79 610 64 95 gapfruit AG Baarerstrasse 135 6300 Zug https://gapfruit.com
OpenPGP_0x99A5F4B3D4E372A6.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Genode users mailing list [email protected] https://lists.genode.org/listinfo/users
