On 2017-02-28 17:14, Vitaly Andrianov wrote:
> Hi Jan,
> 
> Thank you for the replay. Honestly speaking I still don't understand how
> it works. So, let me ask you other questions.
> 
> I have root-cell(ARM0) and inmate cell(ARM1) running on AM572x-EVM. I
> need to create a communication channel between those cells to exchange
> data. So, how do I do that?
> 
> 1) add the same IVSHMEM memory region to the both root-cell and
> inmate-cell configurations. Is that memory used for data exchange and
> signaling? Or I need to create another shared region?

You need to create a region on both ends, yes. That region needs to be
backed by the same physical memory. Check the existing ARM boards and
their linux inmates for examples.

> 
> 2) The AM572X-EVM has a physical PCI controller.
> - Do I need to add it to the root-cell configuration?

Not necessarily. On the TK1, e.g., we have a physical controller as
well, but we cannot extend its bus with virtual devices. Thus we add a
virtual one as well. On the Seattle, we can reuse the physical
controller, in turn. But I didn't look into this aspect on the AM572x
yet as our board does not use the physical controller.

> 
> 3) You use .platform_info.pci_mmconfig_base = 0x50000000; For which
> platform?

A product that is based on that SoC. This address just need to be free
in the physical address space of the target. It will be emulated by
Jailhouse.

> 
> 4) At the bananapi.c the  .platform_info.pci_mmconfig_base = 0x2000000.
> Is that related to the "ranges = <0x02000000 .... > at the
> vpci_template.dts ?

Nope, that first value are some flags (IIRC - PCI in DTBs is nasty). The
driver puts the address and size of the MMConfig region into the
template prior to applying it on the root kernel, see
create_vpci_of_overlay in driver/pci.c.

> 
> 5) .vpci_irq_base - shall I reserve number of GIC SPI interrupt lines
> for vpci? How do I use them?

Those for lines (or at least the ones that are actually used) should not
be in use by active physical devices. Again, the driver will put this
information into the dtb overlay template so that the host kernel will
pick it up and register handler on the correct lines.

On the hypervisor side, the ivshmem device will trigger the
corresponding vGIC interrupt whenever the remote side injects an event
(and the interrupt is enabled by the receiver).

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to