I’m sorry to bother again on the same topic. Many thanks to Matthias and Adam, with their help I was able to make some progress on configuring the BeagleBone Black MMC driver for L4linux. But I still have problem to boot the L4linux. Here is where I am so far. I’m very frustrated now any hints and advice would be very appreciated.
Everything looks fine, I was able to see the l4linux scan device and pick up the FDT (as shown ”Machine model: L4Linux (DT)”) and preallocate DMA (“DMA: preallocated 256 KiB pool for atomic coherent allocations”). However the booting process stoped right after printing the following:
The following are my .devs, .io, cfg files.
Starting kernel ...
L4 Bootstrapper
Build: #78 Mon Jul 17 16:51:38 EDT 2017, 4.7.3
Scanning up to 256 MB RAM, starting at offset 32MB
Memory size is 256MB (80000000 - 8fffffff)
RAM: 0000000080000000 - 000000008fffffff: 262144kB
Total RAM: 256MB
Scanning fiasco
Scanning sigma0
Scanning moe
Moving up to 12 modules behind 81100000
moving module 02 { 81991000-819ba49f } -> { 81a81000-81aaa49f } [169120]
moving module 01 { 8197f000-8199033b } -> { 81a6f000-81a8033b } [70460]
moving module 00 { 818fd000-8197e017 } -> { 819ed000-81a6e017 } [528408]
moving module 11 { 815fd000-818fcfff } -> { 816ed000-819ecfff } [3145728]
moving module 10 { 811fb000-815fc47b } -> { 812eb000-816ec47b } [4199548]
moving module 09 { 81088000-811fa8c7 } -> { 81178000-812ea8c7 } [1517768]
moving module 08 { 8102e000-810876ab } -> { 8111e000-811776ab } [366252]
moving module 07 { 81014000-8102d463 } -> { 81104000-8111d463 } [103524]
moving module 06 { 81013000-81013ff4 } -> { 81103000-81103ff4 } [4085]
moving module 05 { 81012000-81012e7a } -> { 81102000-81102e7a } [3707]
moving module 04 { 81011000-8101135b } -> { 81101000-8110135b } [860]
moving module 03 { 81010000-81010324 } -> { 81100000-81100324 } [805]
Loading fiasco
Loading sigma0
Loading moe
find kernel info page...
found kernel info page (via ELF) at 80002000
Regions of list 'regions'
[ 80000000, 800001ab] { 1ac} Root mbi_rt
[ 80001000, 80001b7f] { b80} Kern fiasco
[ 80002000, 8008efff] { 8d000} Kern fiasco
[ 800c0000, 800c9cfb] { 9cfc} Sigma0 sigma0
[ 800d0000, 800d6177] { 6178} Sigma0 sigma0
[ 80140000, 8016eff3] { 2eff4} Root moe
[ 81000000, 8100f5c3] { f5c4} Boot bootstrap
[ 81100000, 819ecfff] { 8ed000} Root Module
found kernel options (via ELF) at 80003000
API Version: (87) experimental
Sigma0 config ip:800c0100 sp:00000000
Roottask config ip:80140260 sp:00000000
Starting kernel fiasco at 80001350
Hello from Startup::stage2
FPU: Initialize
FPU0: Subarch: 3, Part: 30, Rev: 3, Var: c, Impl: 41
SERIAL ESC: allocated IRQ 72 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 4.7.3 for AM33xx []
Build: #1 Mon Jun 26 12:21:04 EDT 2017
Calibrating timer loop... done.
MDB: use page size: 20
MDB: use page size: 12
SIGMA0: Hello!
KIP @ 80002000
allocated 4KB for maintenance structures
SIGMA0: Dump of all resource maps
RAM:------------------------
[4:80000000;80000fff]
[0:8008f000;800bffff]
[0:800ca000;800cffff]
[0:800d7000;8013ffff]
[4:80140000;8016efff]
[0:8016f000;810fffff]
[4:81100000;819ecfff]
[0:819ed000;8effffff]
IOMEM:----------------------
[0:0;7fffffff]
[0:90000000;ffffffff]
MOE: Hello world
MOE: found 235792 KByte free memory
MOE: found RAM from 80000000 to 8f000000
MOE: allocated 240 KByte for the page array @0x800d7000
MOE: virtual user address space [0-bfffffff]
MOE: rom name space cap -> [C:103000]
BOOTFS: [81100000-81100325] [C:105000] l4linux.cfg
BOOTFS: [81102000-81102e7b] [C:109000] l4linux.devs
BOOTFS: [81103000-81103ff5] [C:10b000] l4-device-tree.dtb
BOOTFS: [81104000-8111d464] [C:10d000] l4re
BOOTFS: [8111e000-811776ac] [C:10f000] ned
BOOTFS: [81178000-812ea8c8] [C:111000] io
BOOTFS: [812eb000-816ec47c] [C:113000] vmlinuz
BOOTFS: [816ed000-819ed000] [C:115000] ramdisk-arm.rd
MOE: cmdline: moe rom/l4linux.cfg
MOE: Starting: rom/ned rom/l4linux.cfg
MOE: loading 'rom/ned'
Ned says: Hi World!
Ned: loading file: 'rom/l4linux.cfg'
IO | Io service
IO | Verboseness level: 7
IO | unused physical memory space:
IO | [00000000000000-0000007fffffff]
IO | [00000090000000-000000ffffffff]
IO | no 'iommu' capability found use CPU-phys for DMA
IO | Loading: config 'rom/l4linux.devs'
IO | warning: inconsistent fixed resource @ device: /System Bus/
IO | : hid=MMC1
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | warning: inconsistent fixed resource @ device: /System Bus/
IO | : hid=MMC2
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Add IRQ resources to vbus: IRQ [00000000000060-00000000000060 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [00000000000040-00000000000040 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [00000000000072-00000000000072 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [0000000000001c-0000000000001c 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [0000000000000e-0000000000000e 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [0000000000000d-0000000000000d 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [0000000000000c-0000000000000c 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [00000000000070-00000000000070 1] none (32bit) (align=0 flags=1)
IO | Add IRQ resources to vbus: IRQ [00000000000071-00000000000071 1] none (32bit) (align=0 flags=1)
IO | l4linux: [N12_GLOBAL__N_112Virtual_sbusE]
IO | Resources: ==== start ====
IO | Resources: ===== end =====
IO | L4ICU: [N2Vi6Sw_icuE]
IO | Resources: ==== start ====
IO | Resources: ===== end =====
IO | gpio0: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IRQ [00000000000060-00000000000060 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000044e07000-00000044e07fff 1000] non-pref (32bit) (align=fff flags=2)
IO | Resources: ===== end =====
IO | ocmcram: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000040300000-00000040301fff 2000] non-pref (32bit) (align=1fff flags=2)
IO | Resources: ===== end =====
IO | mmc1: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000048060000-00000048060fff 1000] non-pref (32bit) (align=fff flags=2)
IO | IRQ [00000000000040-00000000000040 1] none (32bit) (align=0 flags=1)
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Resources: ===== end =====
IO | tptc2: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IRQ [00000000000072-00000000000072 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049a00000-00000049afffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | emif: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [0000004c000000-0000004c000fff 1000] non-pref (32bit) (align=fff flags=2)
IO | Resources: ===== end =====
IO | mmc2: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [000000481d8000-000000481d8fff 1000] non-pref (32bit) (align=fff flags=2)
IO | IRQ [0000000000001c-0000000000001c 1] none (32bit) (align=0 flags=1)
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Resources: ===== end =====
IO | edma: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000049000000-0000004900ffff 10000] non-pref (32bit) (align=ffff flags=2)
IO | IRQ [0000000000000e-0000000000000e 1] none (32bit) (align=0 flags=1)
IO | IRQ [0000000000000d-0000000000000d 1] none (32bit) (align=0 flags=1)
IO | IRQ [0000000000000c-0000000000000c 1] none (32bit) (align=0 flags=1)
IO | Resources: ===== end =====
IO | srcm: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000044e10000-00000044e11fff 2000] non-pref (32bit) (align=1fff flags=2)
IO | Resources: ===== end =====
IO | tptc0: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IRQ [00000000000070-00000000000070 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049800000-000000498fffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | tptc1: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IRQ [00000000000071-00000000000071 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049900000-000000499fffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | prcm: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000044e00000-00000044e03fff 4000] non-pref (32bit) (align=3fff flags=2)
IO | Resources: ===== end =====
IO | Real Hardware -----------------------------------
IO | System Bus: hid=
IO | Resources: ==== start ====
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Resources: ===== end =====
IO | gpio0: hid=GPIO0
IO | Clients: ===== start ====
IO | gpio0: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IRQ [00000000000060-00000000000060 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000044e07000-00000044e07fff 1000] non-pref (32bit) (align=fff flags=2)
IO | Resources: ===== end =====
IO | ocmcram: hid=
IO | Clients: ===== start ====
IO | ocmcram: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000040300000-00000040301fff 2000] non-pref (32bit) (align=1fff flags=2)
IO | Resources: ===== end =====
IO | mmc1: hid=MMC1
IO | Clients: ===== start ====
IO | mmc1: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000048060000-00000048060fff 1000] non-pref (32bit) (align=fff flags=2)
IO | IRQ [00000000000040-00000000000040 1] none (32bit) (align=0 flags=1)
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Resources: ===== end =====
IO | tptc2: hid=EDMA_TPTC2
IO | Clients: ===== start ====
IO | tptc2: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IRQ [00000000000072-00000000000072 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049a00000-00000049afffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | tptc1: hid=EDMA_TPTC1
IO | Clients: ===== start ====
IO | tptc1: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IRQ [00000000000071-00000000000071 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049900000-000000499fffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | emif: hid=EMIF
IO | Clients: ===== start ====
IO | emif: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [0000004c000000-0000004c000fff 1000] non-pref (32bit) (align=fff flags=2)
IO | Resources: ===== end =====
IO | mmc2: hid=MMC2
IO | Clients: ===== start ====
IO | mmc2: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [000000481d8000-000000481d8fff 1000] non-pref (32bit) (align=fff flags=2)
IO | IRQ [0000000000001c-0000000000001c 1] none (32bit) (align=0 flags=1)
IO | DMADOM [00000000000000-00000000000000 1] non-pref (32bit) (align=0 flags=6)
IO | Resources: ===== end =====
IO | tptc0: hid=EDMA_TPTC0
IO | Clients: ===== start ====
IO | tptc0: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IRQ [00000000000070-00000000000070 1] none (32bit) (align=0 flags=1)
IO | IOMEM [00000049800000-000000498fffff 100000] non-pref (32bit) (align=fffff flags=2)
IO | Resources: ===== end =====
IO | edma: hid=EDMA
IO | Clients: ===== start ====
IO | edma: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000049000000-0000004900ffff 10000] non-pref (32bit) (align=ffff flags=2)
IO | IRQ [0000000000000e-0000000000000e 1] none (32bit) (align=0 flags=1)
IO | IRQ [0000000000000d-0000000000000d 1] none (32bit) (align=0 flags=1)
IO | IRQ [0000000000000c-0000000000000c 1] none (32bit) (align=0 flags=1)
IO | Resources: ===== end =====
IO | scrm: hid=
IO | Clients: ===== start ====
IO | srcm: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000044e10000-00000044e11fff 2000] non-pref (32bit) (align=1fff flags=2)
IO | Resources: ===== end =====
IO | prcm: hid=
IO | Clients: ===== start ====
IO | prcm: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000044e00000-00000044e03fff 4000] non-pref (32bit) (align=3fff flags=2)
IO | Resources: ===== end =====
IO | warning: could not register control interface at cap 'platform_ctl'
IO | Ready. Waiting for request.
PH 0 offs=00008000 flags=rwx PH-type=0x1
virt=02000000 evirt=0246d67c
phys=02000000 ephys=0246d67c
f_sz=003e43d5 memsz=0046d67c
PH 1 offs=0039c4f8 flags=r-x PH-type=0x4
virt=023944f8 evirt=0239451c
phys=023944f8 ephys=0239451c
f_sz=00000024 memsz=00000024
PH 2 offs=00000000 flags=rwx PH-type=0x6474e551
virt=00000000 evirt=00000000
phys=00000000 ephys=00000000
f_sz=00000000 memsz=00000000
Starting binary at 0x2000310, argc=8 argv=0xafff4f84 *argv=0xb1007ff4 argv0=rom/vmlinuz
External resolver is at 0xa80007fc
======> L4Linux starting... <========
Linux version 4.7.0-l4 (daniel@daniel-ubuntu14) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #28 Mon Jul 17 15:10:51 EDT 2017
Binary name: rom/vmlinuz
This is an AEABI build.
Linux kernel command line (7 args): mem=128M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd rw root=1:0 ramdisk_size=4000 l4x_dtb=rom/l4-device-tree.dtb
CPU mapping (l:p)[1]: 0:0
Image: 02000000 - 02600000 [6144 KiB].
Areas: Text: 02000000 - 0239451c [3665kB]
RO-Data: 022b2000 - 0237b000 [804kB]
Data: 023bc000 - 023df800 [142kB]
Init: 02395000 - 023bc000 [156kB]
BSS: 023e43d5 - 0246d67c [548kB]
Device scan:
Device: L4ICU
Device: gpio0
IRQ: 00000060 - 00000060
MEM: 44e07000 - 44e07fff
Device: ocmcram
MEM: 40300000 - 40301fff
Device: mmc1
MEM: 48060000 - 48060fff
IRQ: 00000040 - 00000040
DMAD: 00000000 - 00000000
Device: tptc2
IRQ: 00000072 - 00000072
MEM: 49a00000 - 49afffff
Device: emif
MEM: 4c000000 - 4c000fff
Device: mmc2
MEM: 481d8000 - 481d8fff
IRQ: 0000001c - 0000001c
DMAD: 00000000 - 00000000
Device: edma
MEM: 49000000 - 4900ffff
IRQ: 0000000e - 0000000e
IRQ: 0000000d - 0000000d
IRQ: 0000000c - 0000000c
Device: srcm
MEM: 44e10000 - 44e11fff
Device: tptc0
IRQ: 00000070 - 00000070
MEM: 49800000 - 498fffff
Device: tptc1
IRQ: 00000071 - 00000071
MEM: 49900000 - 499fffff
Device: prcm
MEM: 44e00000 - 44e03fff
Device scan done.
IO | DMA: use CPU-phys addresses for DMA
l4lx_thread_create: Created thread 41d (cpu0) (u:b3000e00, v:b3000c00, sp:023bdfa4)
main thread will be 41d
L4x: section-with-init(-data): Virt: 0x2000000 to 0x246dfff [4536 KiB]
section-with-init(-data): Phys: 0x8017c000 to 0x805e9fff, [4536 KiB]
L4x: section-with-init-text: Virt: 0x2000000 to 0x246dfff [4536 KiB]
error: failed to get physical address for 2000000.
L4x: Main thread running, waiting...
L4x: Memory size: 128MB
L4x: Setting superpages for main memory
L4x: Adjusted memory start: 02000000
L4x: Main memory: Virt: 0x2600000 to 0xa5fffff [131072 KiB]
Main memory: Phys: 0x81a00000 to 0x899fffff, [131072 KiB]
l4x: vmalloc area: 0a600000 - 12600000
L4x: text: Virt: 0x2000000 to 0x246dfff [4536 KiB]
error: failed to get physical address for 2000000.
Loading: rom/ramdisk-arm.rd
INITRD: Size of RAMdisk is 3072KiB
RAMdisk from 00002000 to 00302000 [3072KiB]
l4lx_thread_create: Created thread 422 (timer0) (u:b3000a00, v:00000000, sp:02405fa0)
Booting Linux on physical CPU 0x0
Linux version 4.7.0-l4 (daniel@daniel-ubuntu14) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1) ) #28 Mon Jul 17 15:10:51 EDT 2017
DTB: virt=02600100 phys=81a00100
CPU: Fiasco [413fc082] revision 2 (ARMv7), cr=00400000
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine model: L4Linux (DT)
Ignoring RAM at 0x80000000-0x90000000 (!CONFIG_HIGHMEM)
Consider using a HIGHMEM enabled kernel.
Memory policy: Data cache writealloc
CPU: All CPU(s) started in SVC mode.
INITRD: 00002000 - 00302000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 33973
Kernel command line: mem=128M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd rw root=1:0 ramdisk_size=4000 l4x_dtb=rom/l4-device-tree.dtb
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 129676K/137220K available (2861K kernel code, 142K rwdata, 804K rodata, 156K init, 548K bss, 7544K reserved, 0K cma-reserved)
Virtual kernel memory layout:
vector : 0xbffff000 - 0xc0000000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0x0a600000 - 0x12600000 ( 128 MB)
lowmem : 0x00000000 - 0x0a600000 ( 166 MB)
modules : 0x01010000 - 0x02000000 ( 15 MB)
.text : 0x02000000 - 0x0239451c (3666 kB)
.init : 0x02395000 - 0x023bc000 ( 156 kB)
.data : 0x023bc000 - 0x023df800 ( 142 kB)
.bss : 0x023e43d5 - 0x0246d67c ( 549 kB)
NR_IRQS:282
clocksource: l4kipclk: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
l4timer: Using IRQ210
sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
Console: colour dummy device 80x30
console [ttyLv0] enabled
Calibrating delay loop... 990.41 BogoMIPS (lpj=4952064)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x2000000 - 0x2000000
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Failed to create "l4x" debugfs directory: 1
IO | new iomem region: p=49000000 v=400000 s=400000 (bmb=0x2b138)
IO | map mem: p=49000000 v=400000 s=10000: done(0)
__l4x_ioremap: Mapping physaddr 49000000 [0x10000 Bytes, 49000000+010000] to 00302000+000000