On Thu, Jun 2, 2022 at 9:41 AM Lad, Prabhakar
<[email protected]> wrote:
>
> On Tue, May 31, 2022 at 8:13 PM Lad, Prabhakar
> <[email protected]> wrote:
> >
> > On Tue, May 31, 2022 at 1:52 PM Prabhakar Lad
> > <[email protected]> wrote:
> > >
> > >
> > <snip>
> > > * Looking at some of the linux inmate  configs there are two regions of 
> > > RAM specified is this a strict requirement?
> > > * For the inmate RAM should the virt_start = CONFIG_INMATE_BASE?
> > >
> > After updating my memory layout, i.e. after creating one region for
> > loading the linux another for DDR RAM and lastly the communication
> > region in my inmate I no longer see the unhandled read error.
> >
> >         /* linux-loader space */ {
> >             .phys_start = 0x59000000,
> >             .virt_start = 0x0,
> >             .size = 0x6400000,
> >             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> >                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
> >         },
> >         /* RAM */ {
> >             .phys_start = 0x5F400000,
> >             .virt_start = 0x5F400000,
> >             .size = 0x19C00000,
> >             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> >                 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
> >                 JAILHOUSE_MEM_LOADABLE,
> >         },
> >         /* communication region */ {
> >             .virt_start = 0x80000000,
> >             .size = 0x00001000,
> >             .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
> >                 JAILHOUSE_MEM_COMM_REGION,
> >         },
> >
> > I am able to load the linux on one of the CPUs but I cannot see any
> > console output on the serial.
> >
> > root@hihope-rzg2m:~# jailhouse cell linux
> > renesas-r8a774a1-linux-demo.cell Image.gz -d
> > inmate-r8a774a1-hihope.dtb -c "clk_ignore_unused rootwait rw"
> > Started cell "renesas-r8a774a1-linux-demo"
> > root@hihope-rzg2m:~#
> > root@hihope-rzg2m:~# jailhouse cell list
> > ID      Name                    State             Assigned CPUs
> >    Failed CPUs
> > 0       Renesas HopeRun HiHope RZ/G2Mrunning           0,2-5
> > 1       renesas-r8a774a1-linux-demorunning           1
> > root@hihope-rzg2m:~#
> >
> > Any pointers on debugging this? (jailhouse cell stat 1 doesn't seem to
> > updating the number so I assume it's panicked somewhere)
> >
> I was able to get the console output on the root cell for debugging by
> setting "console=jailhouse earlycon..."
>
> I'm seeing that when trying to initialize the GIC its causing a panic:
>
> [    0.000000] ------------[ cut here ]------------
> [    0.000000] unable to map gic dist registers
> [    0.000000] WARNING: CPU: 0 PID: 0 at
> drivers/irqchip/irq-gic.c:1393 gic_of_setup+0xa8/0xf0
> [    0.000000] Modules linked in:
> [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W
>   5.10.31+ #37
> [    0.000000] Hardware name: Jailhouse cell on HopeRun HiHope RZ/G2M
> R8A774A1 (DT)
> [    0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--)
> [    0.000000] pc : gic_of_setup+0xa8/0xf0
> [    0.000000] lr : gic_of_setup+0xa8/0xf0
> [    0.000000] sp : ffff800011203dd0
> [    0.000000] x29: ffff800011203dd0 x28: ffff800010f936c0
> [    0.000000] x27: ffff80001120cc18 x26: ffff80001120cc18
> [    0.000000] x25: 0000000000000000 x24: ffff800011209000
> [    0.000000] x23: ffff000077c36460 x22: ffff80001120c000
> [    0.000000] x21: ffff800010f93000 x20: ffff000077c36460
> [    0.000000] x19: ffff80001120cc18 x18: ffffffffffffffff
> [    0.000000] x17: 00000000000000c0 x16: fffffdffffe00340
> [    0.000000] x15: ffff800011209948 x14: 0000000000000056
> [    0.000000] x13: ffff800011203a70 x12: 00000000ffffffea
> [    0.000000] x11: ffff8000112914c0 x10: ffff800011279480
> [    0.000000] x9 : ffff8000112794d8 x8 : 0000000000017fe8
> [    0.000000] x7 : c0000000ffffefff x6 : 0000000000000001
> [    0.000000] x5 : 0000000000000000 x4 : 0000000000000000
> [    0.000000] x3 : 00000000ffffffff x2 : ffff800011221450
> [    0.000000] x1 : 0000000000000000 x0 : 0000000000000000
> [    0.000000] Call trace:
> [    0.000000]  gic_of_setup+0xa8/0xf0
> [    0.000000]  gic_of_init+0x88/0x390
> [    0.000000]  of_irq_init+0x194/0x33c
> [    0.000000]  irqchip_init+0x18/0x40
> [    0.000000]  init_IRQ+0xc8/0xfc
> [    0.000000]  start_kernel+0x2ec/0x4f8
> [    0.000000] ---[ end trace f68728a0d3053b52 ]---
> [    0.000000] OF: of_irq_init: children remain, but no parents
> [    0.000000] Kernel panic - not syncing: No interrupt controller found.
> [    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W
>   5.10.31+ #37
> [    0.000000] Hardware name: Jailhouse cell on HopeRun HiHope RZ/G2M
> R8A774A1 (DT)
> [    0.000000] Call trace:
> [    0.000000]  dump_backtrace+0x0/0x1c0
> [    0.000000]  show_stack+0x18/0x68
> [    0.000000]  dump_stack+0xd8/0x134
> [    0.000000]  panic+0x188/0x3a8
> [    0.000000]  init_IRQ+0xe0/0xfc
> [    0.000000]  start_kernel+0x2ec/0x4f8
> [    0.000000] ---[ end Kernel panic - not syncing: No interrupt
> controller found. ]---
>
I was able to resolve the issue by fixing the DT.

Cheers,
Prabhakar

> I have the below GIC node in the inmate dts:
>
>     gic: interrupt-controller@f1010000 {
>         compatible = "arm,gic-400";
>         #interrupt-cells = <3>;
>         #address-cells = <0>;
>         interrupt-controller;
>         reg = <0x0 0xf1010000 0 0x1000>,
>             <0x0 0xf1020000 0 0x20000>,
>             <0x0 0xf1040000 0 0x20000>,
>             <0x0 0xf1060000 0 0x20000>;
>         interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(6) | 
> IRQ_TYPE_LEVEL_HIGH)>;
>     };
>
> In the inmate cell file for GIC configuration, do we need to enable
> pin_bitmap mask just for the peripherals which are only enabled in DT
> (For now I have the pin_bitmap mask in the inmate cell same as the
> root cell) ?
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/CA%2BV-a8uoYz_CUxxstk8afHMKjOjHX9c%3DtWPAhFpoBKjfnb%3DTPA%40mail.gmail.com.

Reply via email to