Hello l4-hackers,
I try to run a vm with l4re on a RPI4b with this files bellow, but I don't know how to find the root device to finalize the boot process.
I haven't played on the network part yet, but if you have any advice on the subject as well, I'm a taker.
Help needed please. Thanks.
vm_hw.vbus ------8<------------------------------------------------------------------------------------------------ Io.add_vbusses { vm_hw = Io.Vi.System_bus(function() MMC = wrap(Io.system_bus().mmc); end); } ------8<------------------------------------------------------------------------------------------------
io.cfg ------8<------------------------------------------------------------------------------------------------ local Res = Io.Res local Hw = Io.Hw local add_children = Io.Dt.add_children
add_children(Io.system_bus(), function() mmc = Hw.Device(function() compatible = { "brcm,bcm2835-mmc" }; Resource.reg0 = Res.mmio(0xfe300000, 0xfe3000FF); Resource.irq0 = Res.irq(0x7e + 32); Property.flags = Io.Hw_device_DF_dma_supported; end) end) ------8<------------------------------------------------------------------------------------------------
mmc.dts ------8<------------------------------------------------------------------------------------------------ /dts-v1/; /include/ "virt-arm_virt-64.dts"
/ { mmc@fe300000 { compatible = "brcm,bcm2835-mmc", "brcm,bcm2835-sdhci"; reg = <0xfe300000 0x100>; interrupts = <0x0 0x7e 0x4>; clocks = <0x3 0x1c>; dmas = <0xa 0xb>; dma-names = "rx-tx"; brcm,overclock-50 = <0x0>; status = "disabled"; pinctrl-names = "default"; pinctrl-0 = <0x19>; bus-width = <0x4>; phandle = <0x2d>; }; }; ------8<------------------------------------------------------------------------------------------------
mfa.cfg ------8<------------------------------------------------------------------------------------------------ local L4 = require "L4"; local l = L4.default_loader;
vbus_l4linux = l:new_channel();
-- Start io & flash memory l:start({ caps = { sigma0 = L4.cast(L4.Proto.Factory, L4.Env.sigma0):create(L4.Proto.Sigma0), icu = L4.Env.icu, vm_hw = vbus_l4linux:svr() }, log = {"IO", "y"} }, "rom/io rom/io.cfg rom/vm_hw.vbus -vvvvvv");
l:startv({ caps = { ram = L4.Env.user_factory:create( L4.Proto.Dataspace, 256 * 1024 * 1024, L4.Mem_alloc_flags.Continuous | L4.Mem_alloc_flags.Pinned | L4.Mem_alloc_flags.Super_pages, 21):m("rws"); vbus = vbus_l4linux; }, log = L4.Env.log:m("rws") }, "rom/uvmm", "-v", "--kernel", "rom/Image.gz", "--ramdisk", "rom/ramdisk-armv8-64.rd", "--dtb", "rom/mmc.dtb", "--cmdline", "console=hvc0 ramdisk_size=10000 root=/dev/mmcblkp3 rw"); ------8<------------------------------------------------------------------------------------------------
in modules.list ------8<------------------------------------------------------------------------------------------------ entry mfa roottask moe rom/mfa.cfg module l4re module hello module uvmm module ned module mfa.cfg module uvmm module cons module dtb/virt-arm_virt-64.dtb module mmc.dtb module[shell] echo $SRC_BASE_ABS/pkg/uvmm/configs/vmm.lua module ramdisk-armv8-64.rd module[uncompress] Image.gz module io module io.cfg module vm_hw.vbus ------8<------------------------------------------------------------------------------------------------
Log from console ------8<------------------------------------------------------------------------------------------------ ## Starting application at 0x010000 L4 Bootstrapper Build: #29 Sat Sep 18 16:38:05 CEST 2021, 10.2.1 20210110 Raspberry Pi Model 4B, Rev 1.4, 8192MB, SoC BCM2711 [d03114] Warranty intact, OTP reading allowed, OTP programming allowed, Overvoltage allowed RAM: 0000000000000000 - 000000003b3fffff: 970752kB RAM: 0000000040000000 - 00000000fbffffff: 3080192kB RAM: 0000000100000000 - 00000001ffffffff: 4194304kB Total RAM: 8052MB Scanning fiasco Scanning sigma0 Scanning moe Moving up to 18 modules behind 1100000 moving module 17 { 39dc000-39dc066 } -> { 3ac1000-3ac1066 } [103] moving module 16 { 39db000-39db16e } -> { 3ac0000-3ac016e } [367] moving module 15 { 3796000-39da99f } -> { 387b000-3abf99f } [2378144] moving module 14 { 16d9000-37959ff } -> { 17be000-387a9ff } [34327040] moving module 13 { 1359000-16d8fff } -> { 143e000-17bdfff } [3670016] moving module 12 { 1358000-1358dbf } -> { 143d000-143ddbf } [3520] moving module 11 { 1357000-1357756 } -> { 143c000-143c756 } [1879] moving module 10 { 1356000-13565e9 } -> { 143b000-143b5e9 } [1514] moving module 09 { 130a000-1355ecf } -> { 13ef000-143aecf } [310992] moving module 08 { 1254000-130962f } -> { 1339000-13ee62f } [742960] moving module 07 { 1253000-1253386 } -> { 1338000-1338386 } [903] moving module 06 { 11d3000-1252a97 } -> { 12b8000-1337a97 } [522904] moving module 05 { 111d000-11d262f } -> { 1202000-12b762f } [742960] moving module 04 { 10f0000-111c9e7 } -> { 11d5000-12019e7 } [182760] moving module 03 { 10d2000-10ef957 } -> { 11b7000-11d4957 } [121176] moving module 02 { 109e000-10d13d7 } -> { 1183000-11b63d7 } [209880] moving module 01 { 1098000-109dd6f } -> { 117d000-1182d6f } [23920] moving module 00 { 101b000-1097387 } -> { 1100000-117c387 } [508808] Loading fiasco Loading sigma0 Loading moe find kernel info page... found kernel info page (via ELF) at 3000 Regions of list 'regions' [ 0, fff] { 1000} Arch mpspin [ 1000, 8dfff] { 8d000} Kern fiasco [ 8e000, 8e347] { 348} Root mbi_rt [ 100000, 10a46f] { a470} Sigma0 sigma0 [ 140000, 170cab] { 30cac} Root moe [ 171cb0, 17eed7] { d228} Root moe [ 1000000, 101900b] { 1900c} Boot bootstrap [ 10000e8, 100011b] { 34} Root cpu_boot [ 101a1a4, 101ae49] { ca6} Boot modinfo [ 11b7000, 3ac1066] { 290a067} Root Module found kernel options (via ELF) at 4000 Sigma0 config ip:00100474 sp:00000000 Roottask config ip:00141584 sp:00000000 Starting kernel fiasco at 000016d0 Hello from Startup::stage2 Number of IRQs available at this GIC: 256 FPU: Initialize ARM generic timer: freq=54000000 interval=54000 cnt=1197663468 SERIAL ESC: allocated IRQ 125 for serial uart Not using serial hack in slow timer handler. Welcome to L4/Fiasco.OC! L4/Fiasco.OC microkernel on arm Rev: unknown compiled with gcc 10.2.1 20210110 for RPi4 (Broadcom 2711) [] Build: #1 Sat Sep 18 00:56:20 CEST 2021
Allocate ARM PPI 25 to virtual 0 Allocate ARM PPI 27 to virtual 1 Allocate ARM PPI 25 to virtual 0 Allocate ARM PPI 27 to virtual 1 Allocate ARM PPI 25 to virtual 0 Cache config: ON Allocate ARM PPI 27 to virtual 1 ID_PFR[01]: 00002222 00000000Calibrating timer loop... Cache config: ON Allocate ARM PPI 25 to virtual 0 done. Allocate ARM PPI 27 to virtual 1 MDB: use page size: 30 Cache config: ON ID_PFR[01]: 00002222 00000000MDB: use page size: 21 ID_[DA]FR0: 10305106 00000000 ID_[DA]FR0: 10305106 00000000 ID_MMFR[04]: 00001124 00000000 00000000 00000000 ID_MMFR[04]: 00001124 00000000 00000000 00000000 MDB: use page size: 12 ID_PFR[01]: 00002222 00000000S ID_[DA]FR0: 10305106 00000000 IID_MMFR[04]: 00001124 00000000 00000000 00000000 GMA0: Hello! KIP @ 3000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [4:RWX:8e000;8efff] [0:RWX:8f000;fffff] [0:RWX:10b000;13ffff] [4:R-X:140000;170fff] [4:RW-:171000;17efff] [0:RWX:17f000;ffffff] [4:---:1000000;1000fff] [0:RWX:1001000;11b6fff] [4:RWX:11b7000;3ac1fff] [0:RWX:3ac2000;3b3fffff] [0:RWX:40000000;fbffffff] [0:RWX:100000000;1feffffff] IOMEM:---------------------- [0:RW-:0;fff] [0:RW-:3b400000;3fffffff] [0:RW-:fc000000;ffffffff] [0:RW-:200000000;ffffffffffffffff] MOE: Hello world MOE: found 8185968 KByte free memory MOE: found RAM from 8e000 to 1ff000000 MOE: allocated 8175 KByte for the page array @0x17f000 MOE: virtual user address space [0-7fffffffff] MOE: rom name space cap -> [C:103000] MOE: rwfs name space cap -> [C:105000] BOOTFS: [11b7000-11d4958] [C:107000] l4re BOOTFS: [11d5000-12019e8] [C:109000] hello BOOTFS: [1202000-12b7630] [C:10b000] uvmm BOOTFS: [12b8000-1337a98] [C:10d000] ned BOOTFS: [1338000-1338387] [C:10f000] mfa.cfg BOOTFS: [1339000-13ee630] [C:111000] uvmm BOOTFS: [13ef000-143aed0] [C:112000] cons BOOTFS: [143b000-143b5ea] [C:114000] virt-arm_virt-64.dtb BOOTFS: [143c000-143c757] [C:116000] mmc.dtb BOOTFS: [143d000-143ddc0] [C:118000] vmm.lua BOOTFS: [143e000-17be000] [C:11a000] ramdisk-armv8-64.rd BOOTFS: [17be000-387aa00] [C:11c000] Image.gz BOOTFS: [387b000-3abf9a0] [C:11e000] io BOOTFS: [3ac0000-3ac016f] [C:120000] io.cfg BOOTFS: [3ac1000-3ac1067] [C:122000] vm_hw.vbus MOE: cmdline: moe rom/mfa.cfg MOE: Starting: rom/ned rom/mfa.cfg MOE: loading 'rom/ned' Ned says: Hi World! Ned: loading file: 'rom/mfa.cfg' IO | Io service IO | Verboseness level: 7 IO | unused physical memory space: IO | [0000003b400000-0000003fffffff] IO | [000000fc000000-000000ffffffff] IO | [00000200000000-ffffffffffffffff] IO | no 'iommu' capability found, using CPU-phys for DMA VMM[]: Created VCPU 0 @ 17000 VMM[GIC]: create ARM GICv2 IO | Loading: config 'rom/io.cfg' IO | Loading: config 'rom/vm_hw.vbus' IO | Add IRQ resources to vbus: IRQ [0000000000009e-0000000000009e 1] none (align=0 flags=1) IO | vm_hw: [N12_GLOBAL__N_112Virtual_sbusE] IO | Resources: ==== start ==== IO | Resources: ===== end ===== IO | L4ICU: [N2Vi6Sw_icuE] IO | Resources: ==== start ==== IO | Resources: ===== end ===== IO | MMC: [N2Vi9Proxy_devE] IO | Resources: ==== start ==== IO | IOMEM [000000fe300000-000000fe3000ff 100] 32-bit non-pref (align=ff flags=2) IO | IRQ [0000000000009e-0000000000009e 1] none (align=0 flags=1) IO | DMADOM [00000000000000-00000000000000 1] (align=0 flags=6) IO | Resources: ===== end ===== IO | Real Hardware ----------------------------------- IO | System Bus: IO | Resources: ==== start ==== IO | DMADOM [00000000000000-00000000000000 1] (align=0 flags=6) IO | Resources: ===== end ===== IO | mmc: IO | compatible= { "brcm,bcm2835-mmc" } IO | Clients: ===== start ==== IO | MMC: [N2Vi9Proxy_devE] IO | Clients: ===== end ==== IO | Resources: ==== start ==== IO | IOMEM [000000fe300000-000000fe3000ff 100] 32-bit non-pref (align=ff flags=2) IO | IRQ [0000000000009e-0000000000009e 1] none (align=0 flags=1) IO | DMADOM [00000000000000-00000000000000 1] (align=0 flags=6) IO | Resources: ===== end ===== IO | warning: could not register control interface at cap 'platform_ctl' IO | Ready. Waiting for request. VMM[main]: Hello out there. VMM[ram]: RAM: @ 0x3c00000 size=0x10000000 (ci) VMM[ram]: RAM: VMM mapping @ 0x2000000 size=0x10000000 VMM[ram]: RAM: VM offset=0xfffffffffe400000 VMM[main]: Loading kernel... VMM[file]: load: @ 0x3c00000 VMM[file]: copy in: to offset 0x0-0x20bc9ff VMM[main]: Loading ram disk... VMM[ram]: load: rom/ramdisk-armv8-64.rd -> 0x13800000 VMM[file]: load: @ 0x13800000 VMM[file]: copy in: to offset 0xfc00000-0xff7ffff VMM[main]: Loaded ramdisk image rom/ramdisk-armv8-64.rd to 13800000 (size: 00380000) VMM[]: Create virtual console VMM[guest]: New mmio mapping: @ f1040000 10000 VMM[GIC]: GICC virtualization only supports sizes up to 0x1000, adjusting device tree node VMM[GIC]: GIC interrupt-controller.reg update: Adjusting GICC size from 20000 to 1000 VMM[guest]: New mmio mapping: @ f1060000 1000 VMM[guest]: New mmio mapping: @ f1120000 100 VMM[]: virtio_net@10000.l4vmm,virtiocap: capability net is invalid. VMM[vm]: Device creation for virtual device virtio_net@10000 failed. Disabling device. VMM[Timer]: Guest timer frequency is 54000000 using (1/54), (9942053/29) to calculate timeouts VMM[psci]: Register PSCI device: hvc mode VMM[ioproxy]: Adding MMIO resource MMC.reg0 : [0xfe300000 - 0xfe3000ff] VMM[ioproxy]: Registering IRQ resource MMC.irq0 : 0x9e VMM[ram]: Cleaning caches for device tree [11fff000-11fff823] ([13bff000]) VMM[main]: Populating RAM of virtual machine VMM[mmio]: Mapping [2000000 - 11ffffff] -> [3c00000 - 13bfffff] VMM[mmio]: Mapping [GICC] -> [f1060000 - f1060fff] VMM[mmio]: Mapping [1e000 - 1e0ff] -> [f1120000 - f11200ff] IO | new iomem region: p=000000fe000000 v=00000000400000 s=400000 (bmb=0x36100) IO | map mem: p=000000fe300000 v=00000000700000 s=1000: done(0) VMM[mmio]: Mapping [200000 - 2000ff] -> [fe300000 - fe3000ff] VMM[]: reschedule(): Initiating cpu startup for 418000 VMM[guest]: Powered up cpu0 [0x1f010] VMM[]: Starting Cpu0 @ 0x3c00000 in 64Bit mode (handler @ 103ed60, stack: 8000fba0, task: 41e000, mpidr: 80000000 (orig: 80000000) VMM[]: 04bab7c8: msr PMUSERENR_EL0 = 00000000 (ignored) VMM[]: ffff800010013d68: msr OSDLR_EL1 = 00000000 (ignored) VMM[]: ffff800010013d6c: msr OSLAR_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee5c: msr DBGBCR0_EL1 = 00000000 (ignored) VMM[]: ffff80001002ef1c: msr DBGBVR0_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee50: msr DBGBCR1_EL1 = 00000000 (ignored) VMM[]: ffff80001002ef10: msr DBGBVR1_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee44: msr DBGBCR2_EL1 = 00000000 (ignored) VMM[]: ffff80001002ef04: msr DBGBVR2_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee38: msr DBGBCR3_EL1 = 00000000 (ignored) VMM[]: ffff80001002eef8: msr DBGBVR3_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee2c: msr DBGBCR4_EL1 = 00000000 (ignored) VMM[]: ffff80001002eeec: msr DBGBVR4_EL1 = 00000000 (ignored) VMM[]: ffff80001002ee20: msr DBGBCR5_EL1 = 00000000 (ignored) VMM[]: ffff80001002eee0: msr DBGBVR5_EL1 = 00000000 (ignored) VMM[]: ffff80001002ecdc: msr DBGWCR0_EL1 = 00000000 (ignored) VMM[]: ffff80001002ed9c: msr DBGWVR0_EL1 = 00000000 (ignored) VMM[]: ffff80001002ecd0: msr DBGWCR1_EL1 = 00000000 (ignored) VMM[]: ffff80001002ed90: msr DBGWVR1_EL1 = 00000000 (ignored) VMM[]: ffff80001002ecc4: msr DBGWCR2_EL1 = 00000000 (ignored) VMM[]: ffff80001002ed84: msr DBGWVR2_EL1 = 00000000 (ignored) VMM[]: ffff80001002ecb8: msr DBGWCR3_EL1 = 00000000 (ignored) VMM[]: ffff80001002ed78: msr DBGWVR3_EL1 = 00000000 (ignored) VQ[0x1cb30]: num=256 d:0x4c14000 a:0x4c15000 u:0x4c16000 VQ[0x1cb78]: num=256 d:0x4c0c000 a:0x4c0d000 u:0x4c0e000 [ 1.400282] cacheinfo: Unable to detect cache hierarchy for CPU 0 [ 1.414509] loop: module loaded [ 1.418690] megasas: 07.714.04.00-rc1 [ 1.425640] libphy: Fixed MDIO Bus: probed [ 1.431368] tun: Universal TUN/TAP device driver, 1.6 [ 1.437279] thunder_xcv, ver 1.0 [ 1.440867] thunder_bgx, ver 1.0 [ 1.444438] nicpf, ver 1.0 [ 1.448109] hclge is initializing [ 1.451734] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version [ 1.459356] hns3: Copyright (c) 2017 Huawei Corporation. [ 1.465047] e1000: Intel(R) PRO/1000 Network Driver [ 1.470243] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 1.476424] e1000e: Intel(R) PRO/1000 Network Driver [ 1.481710] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 1.488029] igb: Intel(R) Gigabit Ethernet Network Driver [ 1.493756] igb: Copyright (c) 2007-2014 Intel Corporation. [ 1.499697] igbvf: Intel(R) Gigabit Virtual Function Network Driver [ 1.506325] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 1.512801] sky2: driver version 1.30 [ 1.517367] VFIO - User Level meta-driver version: 0.3 [ 1.524155] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.531114] ehci-pci: EHCI PCI platform driver [ 1.535919] ehci-platform: EHCI generic platform driver [ 1.541542] ehci-orion: EHCI orion driver [ 1.545902] ehci-exynos: EHCI Exynos driver [ 1.550435] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.556998] ohci-pci: OHCI PCI platform driver [ 1.561801] ohci-platform: OHCI generic platform driver [ 1.567415] ohci-exynos: OHCI Exynos driver [ 1.572213] usbcore: registered new interface driver usb-storage [ 1.580207] i2c /dev entries driver [ 1.587651] sdhci: Secure Digital Host Controller Interface driver [ 1.594246] sdhci: Copyright(c) Pierre Ossman [ 1.599228] Synopsys Designware Multimedia Card Interface Driver [ 1.606125] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.612955] ledtrig-cpu: registered to indicate activity on CPUs [ 1.620526] usbcore: registered new interface driver usbhid [ 1.626435] usbhid: USB HID core driver [ 1.634165] NET: Registered protocol family 17 [ 1.639199] 9pnet: Installing 9P2000 support [ 1.643874] Key type dns_resolver registered [ 1.648725] registered taskstats version 1 [ 1.653117] Loading compiled-in X.509 certificates [ 1.659117] Btrfs loaded, crc32c=crc32c-generic, integrity-checker=on, zoned=no [ 1.667260] ALSA device list: [ 1.670540] No soundcards found. [ 1.674948] VFS: Cannot open root device "mmcblkp3" or unknown-block(0,0): error -6 [ 1.683078] Please append a correct "root=" boot option; here are the available partitions: [ 1.691888] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) [ 1.700521] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0 #2 [ 1.706738] Hardware name: L4 VM (DT) [ 1.710614] Call trace: [ 1.713229] dump_backtrace+0x0/0x1b0 [ 1.717121] show_stack+0x1c/0x70 [ 1.720653] dump_stack+0xd0/0x12c [ 1.724272] panic+0x16c/0x334 [ 1.727531] mount_block_root+0x1bc/0x24c [ 1.731768] mount_root+0x104/0x138 [ 1.735469] prepare_namespace+0x134/0x174 [ 1.739793] kernel_init_freeable+0x260/0x2a4 [ 1.744398] kernel_init+0x18/0x124 [ 1.748108] ret_from_fork+0x10/0x30 [ 1.751908] Kernel Offset: disabled [ 1.755604] CPU features: 0x10000071,00000846 [ 1.760204] Memory Limit: none [ 1.763464] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]--- ------8<------------------------------------------------------------------------------------------------