Have you ever tried a simple inmate demo? Like gic-demo? Does it work? Regards, Peng.
From: [email protected] <[email protected]> On Behalf Of Bharathiraja Nallathambi Sent: 2023年8月10日 11:39 To: [email protected] Subject: jailhouse - Linux demo on imx8mm (IOT-GATE-iMX8 - Industrial IoT Gateway) Hi, As my previous post is marked as spam, i am posting this from my different mail ID. I am trying to run jailhouse Linux demo on imx8mm board (https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/) After the dts patch and kernel re-build, I am able to run the jailhouse inmate demo (gic-demo.bin) without any issues. When i tried to run jailhouse Linux demo on imx8mm board, i face the following challenge, #Enable Jailhouse: export PATH=$PATH:/usr/share/jailhouse/tools insmod /lib/modules/5.15.32-iot-gate-imx8m-3.2.1+/extra/driver/jailhouse.ko jailhouse enable /usr/share/jailhouse/cells/imx8mm.cell jailhouse cell list #try to run Linux jailhouse cell linux imx8mm-linux-demo.cell /home/root/jailhouse/vmlinux -d /home/root/jailhouse/sb-iotgimx8.dtb -c "clk_ignore_unused console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 net.ifnames=0 root=/dev/sda2 rootwait rw" imx8mm-linux-demo.cell - file attached for reference sb-iotgimx8.dts - file attached for reference #jailhouse console output root@iot-gate-imx8:~/jailhouse# jailhouse console Initializing Jailhouse hypervisor v0.2 on CPU 0 Code location: 0x0000ffffc0200800 Page pool usage after early setup: mem 39/993, remap 0/131072 Initializing processors: CPU 0... OK CPU 3... OK CPU 1... OK CPU 2... OK Initializing unit: irqchip Initializing unit: ARM SMMU v3 Initializing unit: ARM SMMU Initializing unit: PVU IOMMU Initializing unit: PCI Adding virtual PCI device 00:02.0 to cell "imx8mm" Adding virtual PCI device 00:03.0 to cell "imx8mm" Adding virtual PCI device 00:00.0 to cell "imx8mm" Adding virtual PCI device 00:01.0 to cell "imx8mm" Page pool usage after late setup: mem 63/993, remap 144/131072 Activating hypervisor Adding virtual PCI device 00:02.0 to cell "linux-inmate-demo" Shared memory connection established, peer cells: "imx8mm" Adding virtual PCI device 00:03.0 to cell "linux-inmate-demo" Shared memory connection established, peer cells: "imx8mm" Adding virtual PCI device 00:00.0 to cell "linux-inmate-demo" Shared memory connection established, peer cells: "imx8mm" Adding virtual PCI device 00:01.0 to cell "linux-inmate-demo" Shared memory connection established, peer cells: "imx8mm" Created cell "linux-inmate-demo" Page pool usage after cell creation: mem 77/993, remap 144/131072 #jailhouse cell list output #root@iot-gate-imx8:~/jailhouse# jailhouse cell list ID Name State Assigned CPUs Failed CPUs 0 imx8mm running 0-1 1 linux-inmate-demo shut down 2-3 #/proc/cmdline console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 net.ifnames=0 root=/dev/mmcblk2p2 rootwait rw panic=5 oops=panic #/proc/iomem root@iot-gate-imx8:~/jailhouse# cat /proc/iomem 00100000-00107fff : 30900000.crypto caam-sm@100000 18000000-1fefffff : pcie@33800000 18000000-180fffff : 0000:00:00.0 18100000-181fffff : PCI Bus 0000:01 18100000-18103fff : 0000:01:00.0 18100000-18103fff : iwlwifi 18200000-1820ffff : 0000:00:00.0 1ff00000-1ff7ffff : 33800000.pcie config 30200000-3020ffff : 30200000.gpio gpio@30200000 30210000-3021ffff : 30210000.gpio gpio@30210000 30220000-3022ffff : 30220000.gpio gpio@30220000 30230000-3023ffff : 30230000.gpio gpio@30230000 30240000-3024ffff : 30240000.gpio gpio@30240000 30260000-3026ffff : 30260000.tmu tmu@30260000 30280000-3028ffff : 30280000.watchdog watchdog@30280000 302b0000-302bffff : 302b0000.dma-controller dma-controller@302b0000 302c0000-302cffff : 302c0000.dma-controller dma-controller@302c0000 30330000-3033ffff : 30330000.pinctrl pinctrl@30330000 30350000-3035ffff : 30350000.efuse efuse@30350000 30380000-3038ffff : 30380000.clock-controller clock-controller@30380000 30820000-3082ffff : 30820000.spi spi@30820000 30860000-3086ffff : 30860000.serial serial@30860000 30880000-3088ffff : 30880000.serial serial@30880000 30900000-3093ffff : 30900000.crypto crypto@30900000 30a20000-30a2ffff : 30a20000.i2c i2c@30a20000 30a30000-30a3ffff : 30a30000.i2c i2c@30a30000 30a60000-30a6ffff : 30a60000.serial serial@30a60000 30aa0000-30aaffff : 30aa0000.mailbox mailbox@30aa0000 30b50000-30b5ffff : 30b50000.mmc mmc@30b50000 30b60000-30b6ffff : 30b60000.mmc mmc@30b60000 30bd0000-30bdffff : 30bd0000.dma-controller dma-controller@30bd0000 30be0000-30beffff : 30be0000.ethernet ethernet@30be0000 32e28000-32e28003 : 32e28000.dispmix-sft-rstn dispmix-sft-rstn@32e28000 32e28004-32e28007 : 32e28004.dispmix-clk-en dispmix-clk-en@32e28004 32e28008-32e2800b : 32e28008.dispmix-mipi-rst dispmix-mipi-rst@32e28008 32e40000-32e401ff : usb@32e40000 32e40000-32e401ff : ci_hdrc.0 usb@32e40000 32e40200-32e403ff : 32e40200.usbmisc usbmisc@32e40200 32e50000-32e501ff : usb@32e50000 32e50000-32e501ff : ci_hdrc.1 usb@32e50000 32e50200-32e503ff : 32e50200.usbmisc usbmisc@32e50200 32f00000-32f0ffff : 33800000.pcie pcie-phy@32f00000 33000000-33001fff : 33000000.dma-controller dma-controller@33000000 33800000-33bfffff : 33800000.pcie dbi 3d800000-3dbfffff : 3d800000.ddr-pmu ddr-pmu@3d800000 40000000-55ffffff : System RAM 40610000-41ceffff : Kernel code 41cf0000-4206ffff : reserved 42070000-423bffff : Kernel data 43000000-4300afff : reserved 58000000-93bfffff : System RAM 6a000000-91ffffff : reserved 93c00000-b83fffff : reserved b7c00000-b7ffffff : Jailhouse hypervisor b8400000-bb6fffff : System RAM bb700000-bbbfffff : reserved bbc00000-bfffffff : System RAM bd900000-bfbfffff : reserved bfc6d000-bfc6dfff : reserved bfc6e000-bfce5fff : reserved bfce8000-bfce9fff : reserved bfcea000-bfceafff : reserved bfceb000-bfcfefff : reserved bfcff000-bfcfffff : reserved bfd00000-bfd35fff : reserved bfd36000-bfffffff : reserved #dts patch >From aaee5eb45ada7121c7c34af7049c0db11ea2b572 Mon Sep 17 00:00:00 2001 From: Bharathiraja Nallathambi <[email protected]<mailto:[email protected]>> Date: Mon, 31 Jul 2023 17:14:42 +0000 Subject: [PATCH] adding reserved memory for jailhouse - adding reserved memory for jailhouse imx8mm Signed-off-by: Bharathiraja Nallathambi <[email protected]<mailto:[email protected]>> --- arch/arm64/boot/dts/compulab/sb-iotgimx8.dts | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/compulab/sb-iotgimx8.dts b/arch/arm64/boot/dts/compulab/sb-iotgimx8.dts index 08de87e55d0b..6539aa8c83f6 100644 --- a/arch/arm64/boot/dts/compulab/sb-iotgimx8.dts +++ b/arch/arm64/boot/dts/compulab/sb-iotgimx8.dts @@ -315,3 +315,41 @@ MX8MM_IOMUXC_SAI5_RXC_GPIO3_IO20 0x140 }; }; }; + +&{/reserved-memory} { + + ivshmem_reserved: ivshmem@bbb00000 { + no-map; + reg = <0 0xbbb00000 0x0 0x00100000>; + }; + + ivshmem2_reserved: ivshmem2@bba00000 { + no-map; + reg = <0 0xbba00000 0x0 0x00100000>; + }; + + pci_reserved: pci@bb800000 { + no-map; + reg = <0 0xbb800000 0x0 0x00200000>; + }; + + loader_reserved: loader@bb700000 { + no-map; + reg = <0 0xbb700000 0x0 0x00100000>; + }; + + jh_reserved: jh@b7c00000 { + no-map; + reg = <0 0xb7c00000 0x0 0x00400000>; + }; + + /* 512MB */ + inmate_reserved: inmate@93c00000 { + no-map; + reg = <0 0x93c00000 0x0 0x24000000>; + }; +}; + +&{/reserved-memory/linux,cma} { + alloc-ranges = <0 0x40000000 0 0x60000000>; +}; -- 2.34.1 There is no console output. The terminal froze. Can someone help me here please. -- Thanks and Regards, Bharathiraja Nallathambi -- 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/CAOx58ZZ3RzsGxDjTys_yoK1d96%2BdTUgB2aAVVhnegyEWnr5rgQ%40mail.gmail.com<https://groups.google.com/d/msgid/jailhouse-dev/CAOx58ZZ3RzsGxDjTys_yoK1d96%2BdTUgB2aAVVhnegyEWnr5rgQ%40mail.gmail.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/DU0PR04MB94174AF5A7AB203146DCE2138817A%40DU0PR04MB9417.eurprd04.prod.outlook.com.
