Hi Stefano, On 29/04/2021 10:45, Stefano Gurrieri wrote: > Hello, > > I’ve experimented succefully jailhouse on my target (var-som-mx8m-mini + > symphony carrier board); specifically I’ve tested a second linux and > other demos (ivshmem-demo, gic-demo...). > > Furthermore, I’ve cross-compiled a very easy bare-metal application, but > I’m not able to use UART3 (second uart) from this cell (linux root cell > send correctly debug messages on UART4 -first uart-). Attached you can find: > > - *imx8mm-uart-demo.c* my config cell > > - *uart-demo.c* demo loaded into > inmate cell > > Runtime, after enabling jailhouse, I enter: > > jailhouse cell create /usr/share/jailhouse/cells/imx8mm-uart-demo.cell > > jailhouse cell load 1 /usr/share/jailhouse/inmates/uart-demo.bin > > jailhouse cell start 1 > > In theory, I should be able to see “/printk(”blablabla”)/ messages on my > uart3 console (the second serial console), but I don’t see anything. > > *** > > Questions: > > 1. Have you some idea? What I got wrong? > > 2. The config cell seems correct, but I’m asking who initialize uart3 > serial? Linux? Because if it’s linux, the uart3 is disabled in the dtb. > Is it possible initialize uart3 serial also into jailhouse?
If it's disabled in the DT, and nobody initialised it before, then yes, there's a certain chance that the UART arrives unconfigured in the cell. Have a look at inmates/lib/arm-common/uart-imx.c . The init routine currently does nothing. IOW, you either need to patch the driver and add optional initialisation (you can have a look at other drivers, there are already appropriate fields in the config structures for uart configuration), or rely on Linux to hand it over initialised. Ralf > > Thanks a lot for your help in advance! > > Kind regards. > > Stefano > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jailhouse-dev/dd1ffb4f-3c78-4a8d-9982-7b589e0f3754n%40googlegroups.com > <https://groups.google.com/d/msgid/jailhouse-dev/dd1ffb4f-3c78-4a8d-9982-7b589e0f3754n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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/eec6d53b-a974-69cb-6a0a-302db90b14f6%40oth-regensburg.de.
