Thanks for the response!

On Sat, Jan 23, 2021 at 2:27 AM Stefano Stabellini <sstabell...@kernel.org>
wrote:

> + xen-devel, Roman,
>
>
> On Fri, 22 Jan 2021, Jukka Kaartinen wrote:
> > Hi Stefano,
> > I'm Jukka Kaartinen a SW developer working on enabling hypervisors on
> mobile platforms. One of our HW that we use on development is
> > Raspberry Pi 4B. I wonder if you could help me a bit :).
> >
> > I'm trying to enable the GPU with Xen + Raspberry Pi for dom0.
> https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=232323#p1797605
> >
> > I got so far that GPU drivers are loaded (v3d & vc4) without errors. But
> now Xen returns error when X is starting:
> > (XEN) traps.c:1986:d0v1 HSR=0x93880045 pc=0x00007f97b14e70
> gva=0x7f7f817000 gpa=0x0000401315d000
> >  I tried to debug what causes this and looks
> like find_mmio_handler cannot find handler.
> > (See more here:
> https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=232323&start=25#p1801691
> )
> >
> > Any ideas why the handler is not found?
>
>
> Hi Jukka,
>
> I am glad to hear that you are interested in Xen on RaspberryPi :-)  I
> haven't tried the GPU yet, I have been using the serial only.
> Roman, did you ever get the GPU working?
>
>
> The error is a data abort error: Linux is trying to access an address
> which is not mapped to dom0. The address seems to be 0x401315d000. It is
> a pretty high address; I looked in device tree but couldn't spot it.
>
> From the HSR (the syndrom register) it looks like it is a translation
> fault at EL1 on stage1. As if the Linux address mapping was wrong.
> Anyone has any ideas how this could happen? Maybe a reserved-memory
> misconfiguration?
>
I had issues with loading the driver in the first place. Apparently swiotlb
is used, maybe it can cause this. I also tried to enable CMA.
config.txt:
dtoverlay=vc4-fkms-v3d,cma=320M@0x0-0x40000000
gpu_mem=128

That memory is very high. Success full address is for example
this: 0xff841f00
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000ff841000
(XEN)         gic_cpu_addr=00000000ff842000
(XEN)         gic_hyp_addr=00000000ff844000
(XEN)         gic_vcpu_addr=00000000ff846000
(XEN)         gic_maintenance_irq=25


> > p.s.
> > While testing I found issue with Xen master branch and your
> patch: xen/rpi4: implement watchdog-based reset
> >
> > Looks like black listing the bcm2835-pm
> > @@ -37,12 +41,69 @@ static const struct dt_device_match
> rpi4_blacklist_dev[] __initconst =
> >       * The aux peripheral also shares a page with the aux UART.
> >       */
> >      DT_MATCH_COMPATIBLE("brcm,bcm2835-aux"),
> > +    /* Special device used for rebooting */
> > +    DT_MATCH_COMPATIBLE("brcm,bcm2835-pm"),
> >
> > will prevent v3d driver to locate phandle. I think it will use the same
> resource:
> >   pm: watchdog@7e100000 {
> >       compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt";
> > #power-domain-cells = <1>;
> > #reset-cells = <1>;
> > reg = <0x7e100000 0x114>,
> >      <0x7e00a000 0x24>,
> >      <0x7ec11000 0x20>;
> > clocks = <&clocks BCM2835_CLOCK_V3D>,
> > <&clocks BCM2835_CLOCK_PERI_IMAGE>,
> > <&clocks BCM2835_CLOCK_H264>,
> > <&clocks BCM2835_CLOCK_ISP>;
> > clock-names = "v3d", "peri_image", "h264", "isp";
> > system-power-controller;
> >
> > };
>
> Yeah, I imagine it could be possible. Can you post the error message you
> are seeing from the v3d driver?

This is the error:
[    0.069682] OF: /v3dbus/v3d@7ec04000: could not find phandle
[    0.074828] OF: /v3dbus/v3d@7ec04000: could not find phandle
v3d driver is not loaded.

-- 
Br,
Jukka Kaartinen

Reply via email to