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? 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/dd1ffb4f-3c78-4a8d-9982-7b589e0f3754n%40googlegroups.com.
/* * iMX8MM target - uart-demo * * Copyright 2018-2019 NXP * * Authors: * Peng Fan <[email protected]> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ #include <jailhouse/types.h> #include <jailhouse/cell-config.h> struct { struct jailhouse_cell_desc cell; __u64 cpus[1]; struct jailhouse_memory mem_regions[3]; } __attribute__((packed)) config = { .cell = { .signature = JAILHOUSE_CELL_DESC_SIGNATURE, .revision = JAILHOUSE_CONFIG_REVISION, .name = "uart-demo", .flags = JAILHOUSE_CELL_PASSIVE_COMMREG, .cpu_set_size = sizeof(config.cpus), .num_memory_regions = ARRAY_SIZE(config.mem_regions), .num_irqchips = 0, .num_pci_devices = 0, .console = { .address = 0x30880000, .type = JAILHOUSE_CON_TYPE_IMX, .flags = JAILHOUSE_CON_ACCESS_MMIO | JAILHOUSE_CON_REGDIST_4, }, }, .cpus = { 0x8, }, .mem_regions = { /* UART3 */ { .phys_start = 0x30880000, .virt_start = 0x30880000, .size = 0x1000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_IO | JAILHOUSE_MEM_ROOTSHARED, }, /* RAM: start from the bottom of inmate memory */ { .phys_start = 0xb3c00000, .virt_start = 0, .size = 0x00010000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE, }, /* communication region */ { .virt_start = 0x80000000, .size = 0x00001000, .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_COMM_REGION, }, } };
/* * Jailhouse, a Linux-based partitioning hypervisor * * Copyright (c) ARM Limited, 2014 * * Authors: * Jean-Philippe Brucker <[email protected]> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ #include <inmate.h> void inmate_main(void) { unsigned int i = 0, j; /* * The cell config can set up a mapping to access UARTx instead of UART0 */ while(++i) { for (j = 0; j < 100000000; j++); printk("Hello Stefano from baremetal cell!\n"); } /* lr should be 0, so a return will go back to the reset vector */ }
