Hi Jan, On Sat, May 28, 2022 at 3:41 PM Jan Kiszka <jan.kis...@web.de> wrote: > > On 28.05.22 15:22, Lad, Prabhakar wrote: > > On Fri, May 27, 2022 at 6:07 AM Jan Kiszka <jan.kis...@siemens.com> wrote: > >> > >> If that should be the case, you could use the JTAG to "trace" how far > >> you get: Add an infinite loop at some point the setup should get along, > >> and then check with the debugger if PC points to that address and if EL2 > >> is active. With that, you could also check if the UART print-out is > >> executed. > >> > > After tracing back I see it's looping infinitely somewhere in the > > hypervisor.o file, below is the code where it repeatedly loops. > > > > ffffc0209550: b9400680 ldr w0, [x20, #4] > > ffffc0209554: b9403481 ldr w1, [x4, #52] > > ffffc0209558: 6b00003f cmp w1, w0 > > ffffc020955c: 540013a8 b.hi ffffc02097d0 <entry+0x2d8> > > ..... > > ffffc02097d0: 17ffff60 b ffffc0209550 <entry+0x58> > > > > I haven't managed to find where exactly in the C file this is > > happening yet. Any thoughts on what could be happening? > > > > That's very likely > > while (entered_cpus < hypervisor_header.online_cpus) > cpu_relax(); > Thanks for the pointer really appreciated.
> Did you configure more CPUs than there are in the system? > No I haven't, I've set it up as cpus = 0x3f for 6 CPUs (2xa57 + 4xa53). I don't know what was happening there when I removed the infinite loop (which I used for break point) from entry.S that went OK. There was also an issue with the debug uart driver which I've fixed and able to get the prints now. So now moving forward I am seeing "Unhandled data read"! Looking at the address for Unhandled data read one belongs to GIC (0xf102f00c) and the other one belongs to the debug uart (0xe6e88008). The configuration for in the root cell is below: .debug_console = { .address = 0xe6e88000, .size = 0x40, .type = JAILHOUSE_CON_TYPE_SCIFA, .flags = JAILHOUSE_CON_ACCESS_MMIO | JAILHOUSE_CON_REGDIST_4, }, .platform_info = { .arm = { .gic_version = 2, .gicd_base = 0xf1010000, .gicc_base = 0xf1020000, .gich_base = 0xf1040000, .gicv_base = 0xf1060000, .maintenance_irq = 25, } }, Below is the log: root@hihope-rzg2m:~# insmod jailhouse.ko [ 19.054972] jailhouse: loading out-of-tree module taints kernel. root@hihope-rzg2m:~# root@hihope-rzg2m:~# root@hihope-rzg2m:~# jailhouse enable renesas-r8a774a1.cell [ 22.532474] entering. Initializing Jailhouse hypervisor v0.12 (318-gcc2122a6-dirty) on CPU 5 Code location: 0x0000ffffc0200800 Page pool usage after early setup: mem 53/4063, remap 0/131072 Initializing processors: CPU 5... OK CPU 1... OK CPU 3... OK CPU 0... OK CPU 2... OK CPU 4... OK Initializing unit: irqchip Initializing unit: ARM SMMU v3 Initializing unit: ARM SMMU Initializing unit: PVU IOMMU Initializing unit: PCI Page pool usage after late setup: mem 82/4063, remap 5/131072 Unhandled data read at 0xf102f00c(4) FATAL: unhandled trap (exception class 0x24) Cell state before exception: pc: ffff8000104cc930 lr: ffff8000104cc9a4 spsr: 20000085 EL1 sp: ffff800011323fc0 elr: ffff8000104cc930 esr: 24 1 1800007 x0: 0000000000000000 x1: ffff80001101cb20 x2: ffff80062e813000 x3: 0000000000000003 x4: 001ff1326ed0c676 x5: 00ffffffffffffff x6: 00000000108bece3 x7: 0000000000000000 x8: 0000000000000000 x9: 0000000000000000 x10: 0000000000000000 x11: 0000000000000000 x12: 0000000000000000 x13: 0000000000000000 x14: 0000000000000000 x15: 0000000000000000 x16: 0000000000000000 x17: 0000000000000000 x18: 0000000000000000 x19: 0000000000000001 x20: ffff80001134f010 x21: ffff80001134f00c x22: ffff80001117cc28 x23: ffff8000113dbde0 x24: ffff80001101cb38 x25: ffff800011320000 x26: ffff800011324000 x27: ffff0005c00c63c0 x28: ffff0005c00c63c0 x29: ffff800011323fc0 Parking CPU 3 (Cell: "Renesas HopeRun HiHope RZ/G2M") Unhandled data read at 0xe6e88008(2) FATAL: unhandled trap (exception class 0x24) Cell state before exception: pc: ffff8000106341f0 lr: ffff800010632af8 spsr: 60000085 EL1 sp: ffff80001131b420 elr: ffff8000106341f0 esr: 24 1 1410006 x0: ffff8000113bd000 x1: ffff8000113bd008 x2: 0000000000000000 x3: ffff800010bf9a58 x4: 0000000000000000 x5: 0000000000000064 x6: ffff800010632a48 x7: 72646461206c6175 x8: 3030303020737365 x9: 65636e6572656665 x10: 7472697620746120 x11: 696f70204c4c554e x12: 726564207265746e x13: 656c646e6168206f x14: 206c656e72656b20 x15: ffff800011179948 x16: 0000000000000000 x17: 0000000000000000 x18: ffffffffffffffff x19: ffff8000112da2f8 x20: ffff8000112da2f8 x21: 0000000000000000 x22: ffff8000112da2f8 x23: ffff800011292128 x24: 0000000000000000 x25: ffff8000112da2f8 x26: ffff8000112918b8 x27: 0000000000000080 x28: 0000000000000064 x29: ffff80001131b420 Parking CPU 2 (Cell: "Renesas HopeRun HiHope RZ/G2M") Any thoughts why we are getting "Unhandled data read"? Cheers, Prabhakar -- 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 jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/CA%2BV-a8uMOW2PopUbMhaOmCs-RZWqzOJcC3zXOToF2pWSs_%3DO5w%40mail.gmail.com.