On 11.05.22 17:02, Daniele Ottaviano wrote:
> 
> Hi, thank you for your reply. 
> I prefer, if possible, to use petalinux as a baseline to test also other
> mechanisms such as OpenAMP and kernel configurations such as the Linux
> Preempt-RT patch. 
> Anyway, you were right, there was a problem in the petalinux build that
> luckily I managed to resolve. Now I'm able to boot the system but when I
> try to enable jailhouse I have the following error:
> 
> root@xilinx-zcu104-2019_1:~# jailhouse enable /zynqmp-zcu104-root.cell
> 
> Initializing Jailhouse hypervisor v0.12 on CPU 3
> Code location: 0x0000ffffc0200800
> Page pool usage after early setup: mem 39/994, remap 0/131072
> Initializing processors:
>  CPU 3... OK
>  CPU 1... OK
>  CPU 0... OK
>  CPU 2... OK
> Initializing unit: irqchip
> Initializing unit: ARM SMMU v3
> Initializing unit: PVU IOMMU
> Initializing unit: PCI
> Adding virtual PCI device 00:00.0 to cell "ZCU104-root"
> /home/user/jailhouse/hypervisor/ivshmem.c:407: returning error -EINVAL
> JAILHOUSE_ENABLE: Invalid argument
> 
> I used a configuration file for zcu104 that I found in a mailing list
> conversation 
> https://groups.google.com/g/jailhouse-dev/c/vMTEE3pYyPg/m/UeeqcdOhBgAJ
> (It is a modified version of the Ultra96 file):
> /*
>  * Configuration for the ZCU104 root cell. Copied from ultra96.c
>  * and changed where necessary.
>  */
> 
> #include <jailhouse/types.h>
> #include <jailhouse/cell-config.h>
> 
> struct {
>     struct jailhouse_system header;
>     __u64 cpus[1];
>     struct jailhouse_memory mem_regions[3];
>     struct jailhouse_irqchip irqchips[1];
>     struct jailhouse_pci_device pci_devices[1];
> } __attribute__((packed)) config = {
>     .header = {
>         .signature = JAILHOUSE_SYSTEM_SIGNATURE,
>         .revision = JAILHOUSE_CONFIG_REVISION,
>         .flags = JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,
>         .hypervisor_memory = {
>             .phys_start = 0x7fc00000,
>             .size =       0x00400000,
>         },
>         .debug_console = {
>             .address = 0xff000000,
>             .size = 0x1000,
>             .type = JAILHOUSE_CON_TYPE_XUARTPS,
>             .flags = JAILHOUSE_CON_ACCESS_MMIO |
>                  JAILHOUSE_CON_REGDIST_4,
>         },
>         .platform_info = {
>             .pci_mmconfig_base = 0xfc000000,
>             .pci_mmconfig_end_bus = 0,
>             .pci_is_virtual = 1,
>             .arm = {
>                 .gic_version = 2,
>                 .gicd_base = 0xf9010000, /*GIC distributor register base*/
>                 .gicc_base = 0xf902f000, /*GIC cpu interface register base*/
>                 .gich_base = 0xf9040000, /*GIC virtual interface control
> register base*/
>                 .gicv_base = 0xf906f000, /*GIC virtual cpu interface
> register base*/
>                 .maintenance_irq = 25,
>             },
>         },
>         .root_cell = {
>             .name = "ZCU104-root",
> 
>             .cpu_set_size = sizeof(config.cpus),
>             .num_memory_regions = ARRAY_SIZE(config.mem_regions),
>             .num_irqchips = ARRAY_SIZE(config.irqchips),
>             .num_pci_devices = ARRAY_SIZE(config.pci_devices),
> 
>             .vpci_irq_base = 136-32,
>         },
>     },
> 
>     .cpus = {
>         0xf,
>     },
> 
>     .mem_regions = {
>         /* MMIO (permissive) */ {
>             .phys_start = 0xfd000000,
>             .virt_start = 0xfd000000,
>             .size =          0x03000000,
>             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>                 JAILHOUSE_MEM_IO,
>         },
>         /* RAM */ {
>             .phys_start = 0x00000000,
>             .virt_start = 0x00000000,
>             .size =       0x7fb00000,
>             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
>                 JAILHOUSE_MEM_EXECUTE,
>         },
>         /* IVSHMEM shared memory region for 00:00.0 */ {
>             .phys_start = 0x7fb00000,
>             .virt_start = 0x7fb00000,
>             .size =       0x00100000,
>             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
>         },

You need more ivshmem regions here. See other ivshmem-enabled configs.

Jan

-- 
Siemens AG, Technology
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/629dbc73-e149-3e2d-0181-fcad1ee4b9d3%40siemens.com.

Reply via email to