On 29.03.21 12:33, Smith li wrote: > jailhouse-images is a good demo. > It can run very good in rpi4. > But how to use GPIO in non-root cell . > Can some one help me ? Thanks very much!
I didn't look into the details of the rpi4 yet but the general approach is first of all to organize the GPIO usage in a way that you can at least isolate register accesses per cell. That means, you should assign all GPIO pins managed by one separately accessible register to one inmate only. A register (can be 32-bit wide, can be smaller - depends on the hardware) can then be exclusively assigned to one cell via sub-page memory regions. You can find an example of such a split-up in the configs/arm/orangepi0*.c file. The configuration relies on the root cell not using the GPIO port assigned to a non-root cell anymore and the non-root cell knowing the address of that assigned port already. If you also need to reflect the change in device trees, things may become more tricky, depending on the DT binding of the given GPIO hardware. Jan -- 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/cc6b6824-8c48-6461-2804-350d70701e67%40web.de.
