On 13.03.20 18:40, Saroj Sapkota wrote:
I tried to make two different non-root cell by taking jetson-tx1-demo as
an example when I try to create cell it says resource busy. Then I make
another configuration as espresso-demo i was able to create cell but
when I tried to change communication region and UART region (I mean
address) it shows un-handled error but when I kept UART and
communication address same as the tx1-demo it was successfully loaded
and started with tx1-demo. Displaying result in the same serial port.
I have attached three configuration
1.jetson-tx1-demo(in built in jailhouse)
2.jetson-tx1-inmate1(configured by using 1 as template) (resource busy
error)
3.jetson-tx1-inmate2(configured by using espresso-demo as template)
4.jetson-tx1 root cell
There are several example cases in the tree that contain non-root
configs which can be active at the same time, e.g.,
qemu-arm64-linux-demo and qemu-arm64-inmate-demo or also the
zynqmp-zcu102-linux-demo and
zynqmp-zcu102-linux-demo-2.
Questions:
1. Do all cell have same UART, IVSHMEM, and communication
region(0x80000000; I checked with other arm64 cell also all of them have
same address why?)?
Comm region is a virtual resource. It can be mapped anywhere where there
is space - and where the guests expects it. So we ended up at
0x800000000 on arm64.
UART is a physical resource. When it's mapped multiple times it means
both guests may access it - which easily ends up in an output mess at
best. So, it is typically given one non-root cell while the root still
has access but does not make use of it.
The shared memory is the same for all connected guests of the same link,
at least its physical address. That makes it, well, shared.
2. How can I direct output of each cell to different serial port?
By assigning different ports and configuring different console entries
in the cell config (for bare-metal inmates) or adjusting the inmate
device tree (for Linux inmates).
3. Why there is resource busy error in second case?
Both cells are supposed to use the same CPU - that is not working with
Jailhouse. We only hand out exclusively used CPUs.
4. I don't understand how to declare irqchip and pci_device for each
cell and root cell? (most difficult one)
PCI assignment (except for virtual ivshmem devices) is not supported on
your target (missing IOMMU, missing generic PCI host controller). All
you can do is give one inmate exclusive access to a physical host
controller, thus all devices behind it. Shouldn't be many on the TX1,
though. For the pattern of configuring ivshmem devices, study e.g.
qemu-arm64 configs. Except for the ivshmem memory addresses, you may
copy those.
The irqchip config of inmates is first of all copy from the root cell,
just with the pin_bitmap reduces to those external interrupts that the
inmate shall exclusively(!) use. Interrupts are associated with physical
devices (check what Linux in the root cell reports when it still has
access) or with the virtual ivshmem devices (vpci_irq_base + ivshmem PCI
slot number (PCI device number, that's the Device in
Bus:Device.Function, modulo 4).
Hope that helps a bit.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/5601f586-853c-dcd1-3961-7e5e0b03ae5c%40siemens.com.