Starting from a previous work [1] , I ported the i.MX6 FEC ethernet device driver to L4Linux (l4re-snapshot-2014092821).
There is no compilation error, but when I tested on the Freescale i.MX6 Sabre SDB, it seems that L4Linux does not start the device. Below are the boot messages of L4 Fiasco + L4Linux.
Does someone have an idea of what might be missing or wrong.
To reproduce the test case using l4re-snapshot-2014092821, all configuration files and patches are given below.
Thank you very much in advance.
L4 Bootstrapper
Build: #10 Thu Oct 29 12:00:00 CET 2015, 4.8.3 20140320 (prerelease)
Scanning up to 1024 MB RAM, starting at offset 32MB
Memory size is 1024MB (10000000 - 4fffffff)
RAM: 0000000010000000 - 000000004fffffff: 1048576kB
Total RAM: 1024MB
Scanning fiasco
Scanning sigma0
Scanning moe
Moving up to 10 modules behind 11100000
moving module 02 { 11928000-1196163f } -> { 11a18000-11a5163f } [235072]
moving module 01 { 1191e000-1192738b } -> { 11a0e000-11a1738b } [37772]
moving module 00 { 118b8000-1191d98b } -> { 119a8000-11a0d98b } [416140]
moving module 09 { 115b8000-118b7fff } -> { 116a8000-119a7fff } [3145728]
moving module 08 { 111d6000-115b7497 } -> { 112c6000-116a7497 } [4068504]
moving module 07 { 111d5000-111d517b } -> { 112c5000-112c517b } [380]
moving module 06 { 1107e000-111d446f } -> { 1116e000-112c446f } [1401968]
moving module 05 { 1107d000-1107d35b } -> { 1116d000-1116d35b } [860]
moving module 04 { 1102a000-1107cc1f } -> { 1111a000-1116cc1f } [338976]
moving module 03 { 11010000-11029473 } -> { 11100000-11119473 } [103540]
Loading fiasco
Loading sigma0
Loading moe
find kernel info page...
found kernel info page at 0x10002000
Regions of list 'regions'
[ 10000000, 1000015f] { 160} Root mbi_rt
[ 10001000, 10001aff] { b00} Kern fiasco
[ 10002000, 10072fff] { 71000} Kern fiasco
[ 10090000, 10096edf] { 6ee0} Sigma0 sigma0
[ 10098000, 1009e177] { 6178} Sigma0 sigma0
[ 10140000, 10171d77] { 31d78} Root moe
[ 10178000, 101934ab] { 1b4ac} Root moe
[ 11000000, 1100f58f] { f590} Boot bootstrap
[ 11100000, 119a7fff] { 8a8000} Root Module
API Version: (87) experimental
Sigma0 config ip:10090100 sp:00000000
Roottask config ip:10140260 sp:00000000
Starting kernel fiasco at 100012c8
Hello from Startup::stage2
Per_cpu_data_alloc: (orig: 0xf0062390-0xf0062d58)
Number of IRQs available at this GIC: 160
FPU0: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
L2: ID=410000c7 Type=9e340340 Aux=32070000 WMask=ffff S=0
L2: Type L2C-310 Size = 1024kB Ways=16 Waysize=64
GIC: Switching IRQ 9 to secure
GIC: Switching IRQ 8 to secure
GIC: Switching IRQ 10 to secure
GIC: Switching IRQ 11 to secure
GIC: Switching IRQ 58 to secure
SERIAL ESC: allocated IRQ 58 for serial uart
Not using serial hack in slow timer handler.
Welcome to Fiasco.OC (arm)!
L4/Fiasco.OC arm microkernel (C) 1998-2013 TU Dresden
Rev: rexported compiled with gcc 4.8.3 for i.MX6 []
Build: #173 Thu Oct 29 11:16:01 CET 2015
Per_cpu_data_alloc: (orig: 0xf0062390-0xf0062d58)
KERNEL: Warning: Buddy::alloc: Size mismatch: 9c8 v 1000
Allocate 2504 bytes (2KB) for CPU[4] local storage (offset=1187c70, 0xf11ea000-0xf11ea9c8)
GIC: Switching IRQ 29 to secure
Number of CPUs: 4
Calibrating timer loop... Per_cpu_data_alloc: (orig: 0xf0062390-0xf0062d58)
done.
KERNEL: Warning: Buddy::alloc: Size mismatch: 9c8 v 1000
Allocate 2504 bytes (2KB) for CPU[1] local storage (offset=1189c70, 0xf11ec000-0xf11ec9c8)
MDB: use page size: 20
MDB: use page size: 12
SIGMA0: Hello!
KIP @ 10002000
allocated 4KB for maintenance structures
SIGMA0: Dump of all resource maps
RAM:------------------------
[4:10000000;10000fff]
[0:10073000;1008ffff]
[0:10097000;10097fff]
[0:1009f000;1013ffff]
[4:10140000;10171fff]
[0:10172000;10177fff]
[4:10178000;10193fff]
[0:10194000;110fffff]
[4:11100000;119a7fff]
[0:119a8000;4effffff]
IOMEM:----------------------
[0:0;fffffff]
[0:50000000;ffffffff]
MOE: Hello world
FPU1: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
MGIC: Switching IRQ 29 to secure
OCache config: ON
EID_PFR[01]: 00001231 00000011: foPer_cpu_data_alloc: (orig: 0xf0062390-0xf0062d58)
und ID_[DA]FR0: 00010444 00000000
ID_MMFR[04]: 00100103 20000000 01230000 00102111
1CPU[1]: goes to idle loop
0
KERNEL: Warning: Buddy::alloc: Size mismatch: 9c8 v 1000
2250Allocate 2504 bytes (2KB) for CPU[2] local storage (offset=113fc70, 0xf11a2000-0xf11a29c8)
0 KByte free memory
MOE: found RAM from 10000000 to 4f000000
MOE: allocated 1008 KByte for the page array @0x10194000
MOE: virtual user address space [0-bfffffff]
MOE: rom name space cap -> [C:501000]
BOOTFS: [11100000-11119474] [C:503000] l4re
BOOTFS: [1111a000-1116cc20] [C:504000] ned
BOOTFS: [1116d000-1116d35c] [C:505000] l4lx.cfg
BOOTFS: [1116e000-112c4470] [C:506000] io
BOOTFS: [112c6000-116a7498] [C:50800FPU2: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
0GIC: Switching IRQ 29 to secure
] vmlinCache config: ON
Per_cpu_data_alloc: (orig: 0xf0062390-0xf0062d58)
KERNEL: Warning: Buddy::alloc: Size mismatch: 9c8 v 1000
m
ID_[DA]FR0: 00010444 00000000
Allocate 2504 bytes (2KB) for CPU[3] local storage (offset=1149c70, 0xf11ac000-0xf11ac9c8)
ID_MMFR[04]: 00100103 20000000 01230000 00102111
CPU[2]: goes to idle loop
BOOTFS: [116a8000-119a8000] [C:509000] ramdisk-arm.rd
MOE: cmdline: moe rom/l4lx.cfg
MOE: Starting: rom/ned rom/l4lx.cfg
MOE: loading 'rom/ned'
Ned says: Hi World!
Ned: loading file: 'rom/l4lx.cfg'
IO | Io service
IO | Verboseness level: 4
FPU3: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
IC: Switching IRQ 29 to secure
[Cache config: ON
3ID_PFR[01]: 00001231 000000113mIO ID_[DA]FR0: 00010444 00000000
ID_MMFR[04]: 00100103 20000000 01230000 00102111
CPU[3]: goes to idle loop
| unused physical memory space:
IO | [00000000000000-0000000fffffff]
IO | [00000050000000-000000ffffffff]
IO | l4linux: [N12_GLOBAL__N_112Virtual_sbusE]
IO | Resources: ==== start ====
IO | Resources: ===== end =====
IO | L4ICU: [N2Vi6Sw_icuE]
IO | Resources: ==== start ====
IO | Resources: ===== end =====
IO | imx6q-fec.dev: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000002188000-0000000218bfff 4000] non-pref (32bit) (align=3fff flags=2)
IO | IRQ [00000000000096-00000000000096 1] none (32bit) (align=0 flags=1)
IO | IRQ [00000000000097-00000000000097 1] none (32bit) (align=0 flags=1)
IO | Resources: ===== end =====
IO | dmamem: [N2Vi9Proxy_devE]
IO | Resources: ==== start ====
IO | IOMEM [00000010430000-000000104affff 80000] non-pref (32bit) (align=7ffff flags=2)
IO | Resources: ===== end =====
IO | Real Hardware -----------------------------------
IO | System Bus: hid=
IO | Resources: ==== start ====
IO | Resources: ===== end =====
IO | NIC: hid=imx6q-fec.0
IO | Clients: ===== start ====
IO | imx6q-fec.dev: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000002188000-0000000218bfff 4000] non-pref (32bit) (align=3fff flags=2)
IO | IRQ [00000000000096-00000000000096 1] none (32bit) (align=0 flags=1)
IO | IRQ [00000000000097-00000000000097 1] none (32bit) (align=0 flags=1)
IO | Resources: ===== end =====
IO | DMAMEM: hid=dmamem
IO | Clients: ===== start ====
IO | dmamem: [N2Vi9Proxy_devE]
IO | Clients: ===== end ====
IO | Resources: ==== start ====
IO | IOMEM [00000010430000-000000104affff 80000] non-pref (32bit) (align=7ffff flags=2)
IO | Resources: ===== end =====
IO | warning: could not register control interface at cap 'platform_ctl'
IO | Ready. Waiting for request.
l4linux | PH 0 (t: 1) offs=00008000 vaddr=02000000 vend=02486494
l4linux | phys=02000000 ephys=02486494
l4linux | f_sz=003c339c memsz=00486494 flgs=rwx
l4linux | L4LINUX: Ma DBG: Virtual Address 02000000 End 02486494
l4linux | Physical Address 02000000 End 02486494
l4linux | PH 1 (t: 4) offs=00373e1c vaddr=0236be1c vend=0236be40
l4linux | phys=0236be1c ephys=0236be40
l4linux | f_sz=00000024 memsz=00000024 flgs=r-x
l4linux | L4LINUX: Ma DBG: Virtual Address 0236be1c End 0236be40
l4linux | Physical Address 0236be1c End 0236be40
l4linux | PH 2 (t: 1685382481) offs=00000000 vaddr=00000000 vend=00000000
l4linux | phys=00000000 ephys=00000000
l4linux | f_sz=00000000 memsz=00000000 flgs=rwx
l4linux | L4LINUX: Ma DBG: Virtual Address 00000000 End 00000000
l4linux | Physical Address 00000000 End 00000000
l4linux | L4LINUX: Ma DBG: Starting binary at 0x2000360, argc=13 argv=0xafff4f74 *argv=0xb1007ff0 argv0=rom/vmlinuz.arm
l4linux | External resolver is at 0xa800075c
l4linux | ======> L4Linux starting... <========
l4linux | Linux version 3.16.0-l4 (aichouch@aichouch-ThinkCentre-M90) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #41 SMP Thu Oct 29 11:59:28 CET 2015
l4linux | Binary name: rom/vmlinuz.arm
l4linux | This is an AEABI build.
l4linux | Linux kernel command line (12 args): mem=64M console=ttyLv0 l4x_rd=rom/ramdisk-arm.rd root=1:0 ramdisk_size=4000 rw init=/linuxrc earlyprintk=1 showpfexc=1 showghost=1 print-fatal-signals=1 ip=dhp
l4linux | CPU mapping (l:p)[1]: 0:0
l4linux | Image: 020000a0 - 02600000 [6143 KiB].
l4linux | Areas: Text: 020000a0 - 02396000 [3671kB] (a bit longer)
l4linux | Data: 02396000 - 023be4a0 [161kB]
l4linux | Initdata: 0236c000 - 02395900 [166kB]
l4linux | BSS: 023c339c - 02486494 [780kB]
l4linux | Device scan:
l4linux | Device: L4ICU
l4linux | Device: imx6q-fec.dev
l4linux | MEM: 02188000 - 0218bfff
l4linux | IRQ: 00000096 - 00000096
l4linux | IRQ: 00000097 - 00000097
l4linux | Device: dmamem
l4linux | MEM: 10430000 - 104affff
l4linux | Device scan done.
l4linux | L4LINUX: Ma DBG: l4lx_thread_create: Created thread 415 (cpu0) (u:b3000e00, v:b3000c00, sp:02397fa4)
l4linux | main thread will be 415
l4linux | l4x_register_pointer_section: addr = 02000000 size = 4747264
l4linux | section-with-init: Virt: 0x2000000 to 0x2486493 [4633 KiB]
l4linux | section-with-init: Phys: 0x104bb000 to 0x10941493, [4633 KiB]
l4linux | Main thread running, waiting...
l4linux | Main thread running, waiting...
l4linux | stext virt 020000a0, phys 104bb0a0
l4linux | etext virt 02396000, phys 10851000
l4linux | L4x: Memory size: 64MB
l4linux | L4x: Setting superpages for main memory
l4linux | L4x: Adjusted memory start: 02000000
l4linux | Main memory: Virt: 0x2600000 to 0x65fffff [65536 KiB]
l4linux | Main memory: Phys: 0x11a00000 to 0x159fffff, [65536 KiB]
l4linux | l4x: vmalloc area: 06600000 - 0e600000
l4linux | l4x_register_pointer_section: addr = 02000000 size = 4747264
l4linux | text: Virt: 0x2000000 to 0x2486493 [4633 KiB]
l4linux | text: Phys: 0x104bb000 to 0x10941493, [4633 KiB]
l4linux | Booting Linux on physicl CPU 0x0
Linux version 3.16.0-l (aichouch@aichouch-ThinCentre-M90) (gcc versionm 4.8.3 20140320 (prerelease) (Sourcery CodeBenc Lite 2014.05-29) ) #41 MP Thu Oct 29 11:59:28 CmET 2015
CPU: Fiasco [412fc09a]revision 10 (ARMv7), cr=0000000
CPU: PIPT / VIPT nonalasing data cache, VIPT nnaliasing instruction camche
Machine: L4
Ignoring unrecognised ag 0x00000000
bootconsole [earlykdb0 enabled
Forcing write-allocatecache policy for SMP
Forcing shared mapping for SMP
Memory policy: Data cahe writealloc
Page fault: addr = bffff003 pc = 0236fb80 (rw, T)
l4linux | Forward PF to our pager
l4linux | Loading: rom/ramdisk-arm.rd
l4linux | INITRD: Size of RAMdisk is 3072KiB
l4linux | INITRD: 00002000 - 0030000
l4x_virt_to_phys: Could not translate virt. address 0x2000
l4linux | v2p: 0: v:00000000-00001000 p:00000000-00001000 sz:00001000
l4linux | v2p: 1: v:02000000-02486494 p:104bb000-10941494 sz:00486494
l4linux | v2p: 2: v:02600000-06600000 p:11a00000-15a00000 sz:04000000
l4linux | v2p: 3: v:02000000-02486494 p:104bb000-10941494 sz:00486494
l4linux | ------------[ cut here ------------
WARNING: CPU: 0 PID: 0at /home/aichouch/dev/l4e-snapshot-2014092821/srmc/l4linux/arch/l4/kernel/main.c:392 l4x_virt_tophys+0x7c/0xac()
Modules linked in:
CPU: 0 PID: 0 Comm: swpper Not tainted 3.16.0-4 #41
[<020109b4>] (unwind_bcktrace) from [<02007684] (show_stack+0x10/0x14)m
[<02007684>] (show_stak) from [<0228f2ec>] (dup_stack+0x84/0x94)
[<0228f2ec>] (dump_stak) from [<02020f5c>] (wan_slowpath_common+0x6c/0mx88)
[<02020f5c>] (warn_slopath_common) from [<0202014>] (warn_slowpath_nulml+0x1c/0x24)
[<02021014>] (warn_slopath_null) from [<0200298>] (l4x_virt_to_phys+0xm7c/0xac)
[<02002908>] (l4x_virtto_phys) from [<0236ef4c] (l4x_load_initrd+0x208m/0x240)
[<0236ef4c>] (l4x_loadinitrd) from [<02370860> (setup_arch+0x89c/0x8d4m)
[<02370860>] (setup_arh) from [<0236c5c8>] (strt_kernel+0x8c/0x370)
[<0236c5c8>] (start_kenel) from [<00000000>] ( (null))
---[ end trace 3406ff2bd97382e ]---
l4x_virt_to_phys: Could not translate virt. address 0x302000
l4linux | v2p: 0: v:00000000-00001000 p:00000000-00001000 sz:00001000
l4linux | v2p: 1: v:02000000-02486494 p:104bb000-10941494 sz:00486494
l4linux | v2p: 2: v:02600000-06600000 p:11a00000-15a00000 sz:04000000
l4linux | v2p: 3: v:02000000-02486494 p:104bb000-10941494 sz:00486494
l4linux | ------------[ cut here ------------
WARNING: CPU: 0 PID: 0at /home/aichouch/dev/l4e-snapshot-2014092821/srmc/l4linux/arch/l4/kernel/main.c:392 l4x_virt_tophys+0x7c/0xac()
Modules linked in:
CPU: 0 PID: 0 Comm: swpper Tainted: G W 3.16.0-l4 #41
[<020109b4>] (unwind_bcktrace) from [<02007684] (show_stack+0x10/0x14)m
[<02007684>] (show_stak) from [<0228f2ec>] (dup_stack+0x84/0x94)
[<0228f2ec>] (dump_stak) from [<02020f5c>] (wan_slowpath_common+0x6c/0mx88)
[<02020f5c>] (warn_slopath_common) from [<0202014>] (warn_slowpath_nulml+0x1c/0x24)
[<02021014>] (warn_slopath_null) from [<0200298>] (l4x_virt_to_phys+0xm7c/0xac)
[<02002908>] (l4x_virtto_phys) from [<0236ef58] (l4x_load_initrd+0x214m/0x240)
[<0236ef58>] (l4x_loadinitrd) from [<02370860> (setup_arch+0x89c/0x8d4m)
[<02370860>] (setup_arh) from [<0236c5c8>] (strt_kernel+0x8c/0x370)
[<0236c5c8>] (start_kenel) from [<00000000>] ( (null))
---[ end trace 3406ff2bd97382f ]---
RAMdisk from 00002000 (00002000) to 00302000 (00302000) [3072KiB]
l4linux | PERCPU: Embedded 7 page/cpu @06521000 s6400 r812 d14080 u32768
Built 1 zonelists in Zne order, mobility groupng on. Total pages: 177m16
Kernel command line: mm=64M console=ttyLv0 l4xrd=rom/ramdisk-arm.rd romot=1:0 ramdisk_size=4000 rw init=/linuxrc earlyrintk=1 showpfexc=1 showhost=1 print-fatal-signamls=1 ip=dhcp
L4LINUX CEA version
PID hash table entries 512 (order: -1, 2048 byes)
Dentry cache hash tabl entries: 16384 (order: , 65536 bytes)
Inode-cache hash tableentries: 8192 (order: 3,32768 bytes)
Memory: 64776K/71680K vailable (2739K kernel cde, 161K rwdata, 764K romdata, 166K init, 780K bss, 6904K reserved)
Virtual kernel memory ayout:
vector : 0xbffff00 - 0xc0000000 ( 4 k)
fixmap : 0xffc0000 - 0xffe00000 (2048 k)
vmalloc : 0x0660000 - 0x0e600000 ( 128 M)
lowmem : 0x0000000 - 0x06600000 ( 102 M)
modules : 0x0101000 - 0x02000000 ( 15 M)
.text : 0x0200000 - 0x0236be40 (3504 k)
.init : 0x0236c00 - 0x02395900 ( 167 k)
.data : 0x0239600 - 0x023be4a0 ( 162 k)
.bss : 0x023c33c - 0x02486494 ( 781 k)
Hierarchical RCU impleentation.
l4linux RCU restricting CPUs rom NR_CPUS=4 to nr_cpu_ds=1.
RCU: Adjusting geometr for rcu_fanout_leaf=16,nr_cpu_ids=1
NR_IRQS:220
l4timer: Using IRQ210
L4LINUX: Ma DBG: l4lx_thread_create: Created thread 41b (timer0) (u:b3000a00, v:00000000, sp:0241dfa0)
l4linux | sched_clock: 64 bits at1000kHz, resolution 1000s, wraps every 214748364m8000ns
Console: colour dummy evice 80x30
console [ttyLv0] enabled
console [ttyLv0] enabld
bootconsole [earlykdb0] disabled
bootconsole [earlykdb0 disabled
Calibrating delay loop... 1574.50 BogoMIPS (lpj=7872512)
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
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x2294850 - 0x2294850
Brought up 1 CPUs
SMP: Total of 1 processors activated.
CPU: All CPU(s) started in SVC mode.
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Added static device 'L4ICU' with 0 resources.
Added static device 'imx6q-fec.dev' with 3 resources.
DMA mem phys at 10430000 - 104affff
DMA mem virt at 00302000 - 00381fff
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <
giometti@linux.it>
PTP clock support registered
Switched to clocksource l4kipclk
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (junk in compressed archive); looks like an initrd
INITRD: Freeing memory.
l4x: Checks passed.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: 2, 16384 bytes)
msgmni has been set to 126
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
L4 serial driver
ttyLv0 at MMIO 0x1 (irq = 211, base_baud = 230400) is a L4
l4ser_shm: L4 shared mem serial driver
l4cdds: No name given, not starting.
brd: module loaded
l4bdds: No name given, not starting.
mousedev: PS/2 mouse device common for all mice
TCP: cubic registered
NET: Registered protocol family 17
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 3072KiB [1 disk] into ram disk... done.
EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 164K (0236c000 - 02395000)
mount: mounting proc on /proc failed: Device or resource busy
mount: mounting devtmpfs on /dev failed: No such device
ifconfig: SIOCSIFADDR: No such device
Please press Enter to activate this console.
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------