General questions about AMP systems (e.g. handling peripheral devices)
I have a custom ZynqMP board with Linux (APU) and baremetal (RPU-0).
I need some hints how to handle peripheral devices (e.g. I2C, GPIOs, Ethernet, ...) in AMP systems to get into the right direction.
1) As far as I found out there are no ready implementations to share peripherals between APU and RPU (e.g. locks for arbitration or command interfaces to execute the device accesses at the other CPU). Normaly you give APU or RPU exclusive access to a specific device. Right?
2) What about GPIOs. I would expect that it's not unusual to set some GPIOs from APU and some other from RPU. Is this a problem? Since this would meen to access the GPIO registers (most likely with Read-Modify-Write) from both sides. Isn't that a raise condition?
3) I need the RPU to be active very soon after power-up. So I have to start it from FSBL (and not with remoteproc). This meens that I cannot use OpenAMP but only libmetal. Is that right?
4) Are there other libs beside OpenAMP/libmetal I should consider? Or has someone different ideas for the communication between APU and RPU (e.g. 2 connected UARTs in the FPGA for a bridge between APU and RPU)?
5) I have the feeling that I search in a wrong direction. If someone has some links/docs/books about this topic...
You are probably going to have to "roll your own" Messaging Passing Protocol for tunneling traffic from peripherals, a-la some form of Interworking Function pairs. On the Linux side, these would be specialized drivers that are on your IWF bus.
You may be able to borrow an existing protocol as a starting point, like an RPC (Remote Procedure Call) based stack (OpenBinder?).