On 2018-02-12 10:16, Claudio Scordino wrote:
> Hi Peng,
> 
> 2018-02-11 8:30 GMT+01:00 Peng Fan <van.free...@gmail.com
> <mailto:van.free...@gmail.com>>:
> 
>     Hi Claudio,
> 
>     On Mon, Feb 05, 2018 at 09:40:29AM +0100, Claudio Scordino wrote:
>     >Hi all,
>     >
>     >thanks to the patch by Peng Fan I have been able of successfully enable
>     >Jailhouse and create a cell.
>     >
>     >However, the gic-demo does not work properly (i.e. it does not fire).
>     >It could be some misconfiguration of the GIC.
>     >The dts entry says:
>     >
>     >        interrupt-controller@38800000 {
>     >                compatible = "arm,gic-v3";
>     >                reg = <0x0 0x38800000 0x0 0x10000 0x0 0x38880000
>     0x0 0xc0000
>     >0x0 0x30340000    0x0 0x10000>;
>     >                #interrupt-cells = <0x3>;
>     >                interrupt-controller;
>     >                interrupts = <0x1 0x9 0x4>;
>     >                interrupt-parent = <0xa>;
>     >                linux,phandle = <0xa>;
>     >                phandle = <0xa>;
>     >        };
>     >
>     >
>     >The board is the MCIMX8M-EVK
>     (https://www.nxp.com/support/developer-resources/
>     <https://www.nxp.com/support/developer-resources/>
>     >run-time-software/i.mx-developer-resources/
>     >evaluation-kit-for-the-i.mx-8m-applications-processor:MCIMX8M-EVK).
>     >The SoC is an i.MX 8MQuad (i.e. Cortex-A53).
>     >The reference manual (available here: https://www.nxp.com/docs/en/
>     >reference-manual/IMX8MDQLQRM.pdf) mentions a GICv3/v4, without
>     providing much
>     >information.
>     >
>     >Attached the configs of the cells and the dts.
> 
>     I just bringup jailhouse and gic-demo on my i.MX8MQ EVK board.
>     Code has been pushed to
>     https://github.com/MrVan/jailhouse/tree/imx8mq-evk
>     <https://github.com/MrVan/jailhouse/tree/imx8mq-evk>
>     You may give a look and see if there is something wrong configured
>     in your side.
>     I did not try other demo, only gic-demo tested.
> 
> 
> Thank you so much.
> So my problem turned out to be:
> 
> +/*
> + * Note: The GICR_V3_BASE needs to be CPU0/1/2/3 specific
> + * If the gic-demo use CPU2, then the GICR_V3_BASE needs to be CPU3 GICR
> + * Address is 0x38880000 + x * 2 * 64K
> + */
> +#define GICR_V3_BASE   ((void *)0x388e0000)    /* CPU 3 */
> 
> The rest of the code was almost identical.
> 
> @Jan: should we put the GICR_V3_BASE field inside the cell config file,
> as it is cpu-dependent ?

Not sure what your exact idea is: The inmate has no access to the cell
config. So far, we do static configuration for our demo inmates. We
could enable them to parse device trees and reuse some information we
gather for Linux inmates - or use an RTOS that does that.

> 
> @Peng: I think you should split the commits and post the patches for
> upstreaming...
>  

That would be welcome!

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate 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 jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to