UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie eta-jim
Newbie
608 Views
Registered: ‎10-16-2018

ZCU102 - APU communicating with two RPUs

We are developing for the ZCU102, with Linux on the 4-core APU and bare metal on both RPUs. Our application requires that the APU communicate using OpenAmp/RPMsg with both RPUs.

 

We want to be able to build one common library for the bare metal code with libxil, libmetal and libopenamp all able to run on either RPU. This has required that we create an xparameters.h file that merges the two RPU-specific xparameters.h files from the two BSPs. We merge the symbols that are not in conflict, and then comment out the symbols that do conflict. We then compile all source files against this modified xparameters.h file. There is only one error in `libxil` proper, in `xscugic.c`, which we easily fixed this way:

 

-static u32 CpuId = XPAR_CPU_ID; /**< CPU Core identifier */
+static u32 CpuId = 0; // We default to RPU0. Clients must use XScuGic_SetCpuID when running on RPU1.

(and elsewhere, we are arranging for the CPU ID to be obtained from the linker script, which is the only source file that must be RPU-specific).

 

 

 

We have verified that the GIC works properly on both RPUs.

 

We are now working through the changes specific to OpenAmp. Although we haven't tested yet, most of the changes seem fairly straightforward. But I am not sure yet which is the best strategy for the Hardware Interface Layer code on the APU. It seems to me that the function `hil_create_proc()` may need to be used to create two different proc instances, one for each RPU. But if that is the case, it seems there will be no way to using a blocking poll for a message from either RPU. Is that correct? Is there no way to create one HIL proc instance that can communicate with both RPUs? It seems unfortunate if we will be forced to use non-blocking polls in all contexts.

 

0 Kudos
1 Reply
Moderator
Moderator
513 Views
Registered: ‎05-10-2017

Re: ZCU102 - APU communicating with two RPUs

(also posted on open-amp mailing list)
HIL layer has been removed from latest OpenAMP. Please see the latest OpenAMP master branch from github.

 

There is platform dependent demo you can find in apps/machine/zynqmp_r5/platform_info.c. It implement polling. However, you don't have to use polling mode. Just baremetal, there is no scheduler support, it will not be good to handle everything in interrupt handler.

 

You can change the interrupt handler in platform_info.c to check vring
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos