[meta-xilinx] remoteproc resource table TYPE_MMU entries

Magnus Olsson Mago at hms.se
Wed Oct 14 23:53:19 PDT 2015


Hey Edward,

Yes, this is correct. Resource-table entry type RSC_MMU is only for the convenience of the remoteproc application itself. It is not part of the Xilinx Linux-side implementation of remoteproc (except that it doesn't error-out when it encounters it).

It is the responsibility of the remoteproc app to iterate through its own resource table, and for each RSC_MMU entry, configure the MMU of CPU #1 accordingly. It is recommended that you lock down the address space in such way that the application cannot access peripherals other than those explicitly unlocked by RSC_MMU. This will provide a type of safety-net for the entire system, and to some degree ensure mutual exclusion for peripherals between Linux and your app.

Note: RSC_MMU is a Xilinx-invention, it is not available in upstream kernel. In other SoCs, the remote proc usually have a IOMMU to map SoC peripherals into the memory space of the remote processor. 

> -----Original Message-----
> From: meta-xilinx-bounces at yoctoproject.org [mailto:meta-xilinx-
> bounces at yoctoproject.org] On Behalf Of Edward Wingate
> Sent: den 15 oktober 2015 02:23
> To: meta-xilinx at lists.yoctoproject.org
> Subject: [meta-xilinx] remoteproc resource table TYPE_MMU entries
> 
> When using remoteproc, there is a resource table that is defined in
> the remote processor code that can contain TYPE_MMU entries (along
> with carveout, trace and vring entries).  For example, I have these in
> my table at the moment:
> .uart0 = { TYPE_MMU, 1, STDOUT_BASEADDRESS, 0, 0xc02, "uart" },
> .scu = { TYPE_MMU, 2, XPS_SCU_PERIPH_BASE, 0, 0xc02, "scu" },
> 
> I just lifted these from ug978, but don't really understand what
> they're for or when I would need to add more.  When exactly should I
> be using/adding more of these TYPE_MMU entries?  When peripherals are
> to be shared between Linux and the remote OS?
> 
> I just see that these entries are passed into an enable_tlb() function
> that sets the given flags (0xc02) in the TLB entry for the
> peripheral's address.
> 
> And it doesn't look like Linux ever processes TYPE_MMU entries.  This
> is the only reference I can find to MMU entries, and they aren't
> handled anywhere:
> https://github.com/Xilinx/linux-
> xlnx/blob/master/drivers/remoteproc/remoteproc_core.c#L719
> 
> There also isn't any corresponding data structure for MMU entries on
> the Linux side like there are for carveouts, devmem, trace, etc:
> https://github.com/Xilinx/linux-
> xlnx/blob/master/include/linux/remoteproc.h#L167
> https://github.com/Xilinx/linux-
> xlnx/blob/master/include/linux/remoteproc.h#L205
> 
> Does anyone know for a fact that TYPE_MMU entries are only used on the
> remote processor?
> 
> Thanks for your help.
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx



More information about the meta-xilinx mailing list