Em quinta-feira, 24 de maio de 2018 10:44:10 UTC-4, J. Kiszka escreveu: > On 2018-05-24 16:27, Giovani Gracioli wrote: > >> On 2018-05-24 15:59, Giovani Gracioli wrote: > >>> Not sure about MMU on Erika. > >>> > >>> Yes, the fault is reported as well. This address is just another memory. > >>> 0xA00.. is the BRAM and 0x500.. is the DRAM. Both have the same faulty > >>> behavior when the size is 2MB. > >> > >> You see the issue also when mapping some arbitrary DRAM region with a > >> size of 2MB? Can you reproduce this with an IVSHMEM region as well? What > >> if you increase the size beyond 2M, to 3M e.g.? > >> > >> Jan > >> > >> -- > >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE > >> Corporate Competence Center Embedded Linux > > > > DRAM: works with 1MB, 3MB, and 32MB. > > does not work with 2MB. > > > > BRAM (is limited to 2MB): works with 1MB, does not with 2MB. > > > > IVSHMEM: tested with 1 and 2MB and worked in both cases. > > > > That's not a consistent pattern yet because IVSHMEM and DRAM is just the > same, use the same flags etc. > > Can you send a config that demonstrates the DRAM issue? Ideally very > close to the upstream zynqmp-zcu102 configs. > > Thanks, > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux
Just tested these two attached and got: Unhandled data write at 0x500000000(4) FATAL: unhandled trap (exception class 0x24) Cell state before exception: pc: 0000000000006944 lr: 0000000000006944 spsr: 60000005 EL1 sp: 0000000000006870 esr: 24 1 1970045 x0: 0000000000000000 x1: 0000000000009670 x2: 0000000000000000 x3: 0000000000000004 x4: 00000000000027b8 x5: 0000000000000000 x6: 0000000000000000 x7: 0000000000000080 x8: 00000000000068b0 x9: 00000000000023e0 x10: 0000000000000000 x11: 0000000000009292 x12: 0000000000000000 x13: 0000000000000000 x14: 0000000000000020 x15: 0000000000000000 x16: 0000000000000000 x17: 0000000000000000 x18: 0000000000000000 x19: 0000000000001118 x20: 00000000000092cf x21: 0000000800700000 x22: 0000000500000000 x23: 000000000000000a x24: 0000000000000000 x25: 0000000000000000 x26: 0000000000000000 x27: 0000000000000000 x28: 0000000000000000 x29: 0000000000000000 Parking CPU 1 (Cell: "nfer") -- 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.
/* * Jailhouse, a Linux-based partitioning hypervisor * * Configuration for Xilinx ZynqMP ZCU102 eval board * * Copyright (c) Siemens AG, 2016 * * Authors: * Jan Kiszka <[email protected]> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * * Reservation via device tree: 0x800000000..0x83fffffff */ #include <jailhouse/types.h> #include <jailhouse/cell-config.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) struct { struct jailhouse_system header; __u64 cpus[1]; struct jailhouse_memory mem_regions[7]; struct jailhouse_irqchip irqchips[1]; struct jailhouse_pci_device pci_devices[3]; } __attribute__((packed)) config = { .header = { .signature = JAILHOUSE_SYSTEM_SIGNATURE, .revision = JAILHOUSE_CONFIG_REVISION, .hypervisor_memory = { .phys_start = 0x800000000, .size = 0x000400000, }, .debug_console = { .address = 0xff000000, .size = 0x1000, .flags = JAILHOUSE_CON1_TYPE_XUARTPS | JAILHOUSE_CON1_ACCESS_MMIO | JAILHOUSE_CON1_REGDIST_4 | JAILHOUSE_CON2_TYPE_ROOTPAGE, }, .platform_info = { .pci_mmconfig_base = 0xfc000000, .pci_mmconfig_end_bus = 0, .pci_is_virtual = 1, .arm = { .gic_version = 2, .gicd_base = 0xf9010000, .gicc_base = 0xf902f000, .gich_base = 0xf9040000, .gicv_base = 0xf906f000, .maintenance_irq = 25, }, }, .root_cell = { .name = "ZynqMP-ZCU102", .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 = 0x0, .virt_start = 0x0, .size = 0x80000000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE, }, /* RAM */ { .phys_start = 0x800600000, .virt_start = 0x800600000, .size = 0x7fa00000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE, }, /* IVSHMEM shared memory region for 00:00.0 */ { .phys_start = 0x800400000, .virt_start = 0x800400000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, /* IVSHMEM shared memory region for 00:02.0 */ { .phys_start = 0x800800000, .virt_start = 0x800800000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, /* IVSHMEM shared memory region for 00:01.0 */ { .phys_start = 0x800700000, .virt_start = 0x800700000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, /* BRAM */ { .phys_start = 0x500000000, //0xA0000000, .virt_start = 0x500000000, //0xA0000000, .size = 0x200000, //2MB .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, }, }, .irqchips = { /* GIC */ { .address = 0xf9010000, .pin_base = 32, .pin_bitmap = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, }, }, }, .pci_devices = { /* 00:00.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .bdf = 0, .bar_mask = { 0xffffff00, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 3, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, .num_msix_vectors = 0, .domain = 0, }, /* 00:02.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .bdf = 2 << 3, .bar_mask = { 0xfffff000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 4, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, .num_msix_vectors = 0, .domain = 0, }, /* 00:01.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .bdf = 1 << 3, .bar_mask = { 0xffff7000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 5, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, .num_msix_vectors = 0, .domain = 0, }, }, };
/* * Jailhouse, a Linux-based partitioning hypervisor * * Configuration for gic-demo inmate on Xilinx ZynqMP ZCU102 eval board: * 1 CPU, 64K RAM, 1 serial port * * Copyright (c) Siemens AG, 2016 * * Authors: * Jan Kiszka <[email protected]> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ #include <jailhouse/types.h> #include <jailhouse/cell-config.h> #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0]) struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; struct jailhouse_memory mem_regions[4]; struct jailhouse_irqchip irqchips[1]; struct jailhouse_pci_device pci_devices[1]; } __attribute__((packed)) config = { .cell = { .signature = JAILHOUSE_CELL_DESC_SIGNATURE, .revision = JAILHOUSE_CONFIG_REVISION, .name = "nfer", .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, .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 = 148-32, }, .cpus = { 0x2, }, .mem_regions = { /* UART */ { .phys_start = 0xff010000, .virt_start = 0xff010000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, /* RAM */ { .phys_start = 0x800a00000, .virt_start = 0, .size = 0x00010000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, }, /* IVSHMEM shared memory region for 00:01.0 */ { .phys_start = 0x800700000, .virt_start = 0x800700000, .size = 0x100000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, /* BRAM */ { .phys_start = 0x500000000, //0xA0000000, .virt_start = 0x500000000,//0xA0000000, .size = 0x200000, //2MB .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, }, .irqchips = { /* GIC */ { .address = 0xf9010000, .pin_base = 32, .pin_bitmap = { 0, 0, 0, (1 << (148 - 128)) | (1 << (149 - 128)) | (1 << (150 - 128)) }, }, }, .pci_devices = { /* 00:01.0 */ { .type = JAILHOUSE_PCI_TYPE_IVSHMEM, .bdf = 1 << 3, .bar_mask = { 0xffff7000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }, .shmem_region = 2, .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED, .num_msix_vectors = 0, .domain = 0, }, }, };
