I have device with a common register bank that can be accessed through 3 different interfaces, one is the "regular" interface where the register and fields have the normal access restriction (e.g. rw or ro) per the specification, but the other two interfaces are privileged access interfaces where the access restrictions are lifted in different ways for different registers/fields.
How would I implement that in a convenient way in DML?
One could imagine implementing a register bank with no restrictions on register and fields, but how would I then apply the normal access restrictions on top of it for the regular interface?
You could put all your registers in one bank, and create two trampoline banks that bounce accesses to the "real" bank, after marking access in the
auxstruct. Each register can then inspectauxand apply access restrictions accordingly. Something like: