QEMU Linux Kernel Panic With BusyBox - linux

I am following this guide to run a minimal linux kernel on top of QEMU, and keep running into the same issue. I have also tried other similar tutorials and end up with the same panic. Since the panic seems to be related to the /init script, I have tried swapping this out with a (statically linked) binary but still end up with the panic. The only thing I have done differently from the tutorial is using the latest stable version of BusyBox (currently 1.34.1). The text of the panic is here and linked below. If anyone has any insight on this that would be great!
Linux version 5.15.0+ (michael#tree) (gcc (Gentoo Hardened 10.3.0-r2 p3) 10.3.0, GNU ld (G1
Command line: console=ttyS0
x86/fpu: x87 FPU will use FXSAVE
signal: max sigframe size: 1040
BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
NX (Execute Disable) protection: active
SMBIOS 2.8 present.
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS d55cb5a 04/01/2014
tsc: Fast TSC calibration using PIT
tsc: Detected 3992.482 MHz processor
last_pfn = 0x7fe0 max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
found SMP MP-table at [mem 0x000f5c80-0x000f5c8f]
RAMDISK: [mem 0x07cf6000-0x07fdffff]
Zone ranges:
DMA [mem 0x0000000000001000-0x0000000000ffffff]
DMA32 [mem 0x0000000001000000-0x0000000007fdffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000001000-0x000000000009efff]
node 0: [mem 0x0000000000100000-0x0000000007fdffff]
Initmem setup node 0 [mem 0x0000000000001000-0x0000000007fdffff]
On node 0, zone DMA: 1 pages in unavailable ranges
On node 0, zone DMA: 97 pages in unavailable ranges
On node 0, zone DMA32: 32 pages in unavailable ranges
Intel MultiProcessor Specification v1.4
MPTABLE: OEM ID: BOCHSCPU
MPTABLE: Product ID: 0.1
MPTABLE: APIC at: 0xFEE00000
Processor #0 (Bootup-CPU)
IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
Processors: 1
[mem 0x08000000-0xfffbffff] available for PCI devices
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 764551s
Built 1 zonelists, mobility grouping on. Total pages: 31968
Kernel command line: console=ttyS0
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 114084K/130552K available (4097K kernel code, 768K rwdata, 484K rodata, 532K init,)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS: 4352, nr_irqs: 48, preallocated irqs: 16
Console: colour VGA+ 80x25
printk: console [ttyS0] enabled
APIC: Switch to symmetric I/O mode setup
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x73193cf9da3, max_idle_ns: 8s
Calibrating delay loop (skipped), value calculated using timer frequency.. 7984.96 BogoMIP)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
CPU: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
Spectre V2 : Spectre mitigation: kernel not compiled with retpoline; no mitigation availab!
Speculative Store Bypass: Vulnerable
Performance Events: PMU not available due to virtualization, using software events only.
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417851000s
futex hash table entries: 256 (order: 0, 6144 bytes, linear)
clocksource: Switched to clocksource tsc-early
platform rtc_cmos: registered platform RTC device (no PNP device found)
Unpacking initramfs...
workingset: timestamp_bits=62 max_order=15 bucket_order=0
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
random: get_random_bytes called from init_oops_id+0x2f/0x40 with crng_init=0
sched_clock: Marking stable (333996480, 16836404)->(354705829, -3872945)
Freeing initrd memory: 2984K
Freeing unused kernel image (initmem) memory: 532K
Write protecting the kernel read-only data: 8192k
Freeing unused kernel image (text/rodata gap) memory: 2044K
Freeing unused kernel image (rodata/data gap) memory: 1564K
Run /init as init process
Failed to execute /init (error -13)
Run /sbin/init as init process
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. Se.
CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.0+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS d55cb5a 04/01/2014
Call Trace:
<TASK>
dump_stack+0x20/0x22
panic+0xd0/0x246
? rest_init+0x90/0x90
kernel_init+0xfc/0x100
ret_from_fork+0x1f/0x30
</TASK>
Kernel Offset: disabled
---[ end Kernel panic - not syncing: No working init found. Try passing init= option to k-
QEMU 6.0.0 monitor - type 'help' for more information
(qemu) quit
Additionally, I have actually tried very similar steps on a completely different computer, so I'm pretty sure there is something I am missing in-general. Both machines are running Gentoo but I have successfully used QEMU to emulate other existing operating systems on both devices (so I think I can exclude a missing kernel configuration)?

Add execute mode to /init file before you build CPIO initramfs:
chmod +x <path-to-your-initrd-root>/init

Related

Glitch Booting Linux with Spike?

I used Spike to boot linux using the riscv tools but the linux boot sequence seems to stop at Bootconsole[early0] disabled.
I tried adding kernel command line root=/dev/vda ro console=ttyS0 but didn't work. The same console settings works in QEMU. Also checked the .config file for the line CONFIG_HVC_RISCV_SBI=y. It was there. Still coulnd't get past it.
Tried with Linux kernel version 4.19 to 5.2. No luck. Am I doing something wrong here?
Steps I followed:
Compiled linux with Riscv toolchain
compiled riscv-pk with ../configure --host=riscv64-unknown-elf --with-payload= [path to vmlinux]
used "Spike bbl" to start spike image.
Please let me know if any more info is required.
Sorry, noob here.
Attaching terminal output
bbl loader
OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
Linux version 4.19.59 (root#AsusFX504) (gcc version 8.2.0 (GCC)) #2 SMP Sat Jul 20 05:11:32 IST 2019
bootconsole [early0] enabled
initrd not found or empty - disabling initrd
Zone ranges:
DMA32 [mem 0x0000000080200000-0x00000000ffffffff]
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080200000-0x00000000ffffffff]
Initmem setup node 0 [mem 0x0000000080200000-0x00000000ffffffff]
software IO TLB: mapped [mem 0xfa3fe000-0xfe3fe000] (64MB)
elf_hwcap is 0x112d
percpu: Embedded 17 pages/cpu s29912 r8192 d31528 u69632
Built 1 zonelists, mobility grouping on. Total pages: 516615
Kernel command line:
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Sorting __ex_table...
Memory: 1988760K/2095104K available (5468K kernel code, 329K rwdata, 1751K rodata, 193K init, 806K bss, 106344K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
Console: colour dummy device 80x25
console [tty0] enabled
bootconsole [early0] disabled
This might be because Virtual Terminal is enabled in your linux config. Disabling Virtual Terminal might solve your issue.
In Linux make menuconfig go to :-
Location:
-> Device Drivers
-> Character devices
and Disble Virtual terminal .
Symbol: VT [=y] n
Type : bool
Prompt: Virtual terminal
As mentioned previously, the reason is that VT is enabled so kernel has a dummy VT framebuffer that simply goes nowhere, but you don't have to disable it. console=ttyS0 will also not work, since SPIKE doesn't emulate it. Note that this won't work on the HiFive Unleashed, either, since serial terminals there are ttySIF0 and ttySIF1. What you want is console=hvc0 and SPIKE will be able to continue from there, e.g. in your kernel .config:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="earlyprintk console=hvc0"
CONFIG_CMDLINE_FORCE=y

cma buffer memory allocation failed

I am trying to write a driver for DMA Linux,
and my driver has been failing to execute dma_coherent_alloc,
I already increased CMA memory, and coherent_pool ...
what am I missing ?
dmesg
Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-v2018.2 (oe-user#oe-host) (gcc version 7.2.0 (GCC)) #5 SMP PREEMPT Sun Feb 17 23:20:49 PST 2019
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
OF: fdt: Reserved memory: unsupported node format, ignoring
cma: dma_contiguous_reserve(limit ffffffff)
cma: dma_contiguous_reserve: reserving 60 MiB for global area
cma: cma_declare_contiguous(size 0x03c00000, base 0x00000000, limit 0xffffffff alignment 0x00000000)
cma: Reserved 60 MiB at 0x3c400000
On node 0 totalpages: 262144
free_area_init_node: node 0, pgdat c183af40, node_mem_map ef7f7000
Normal zone: 1536 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 196608 pages, LIFO batch:31
HighMem zone: 65536 pages, LIFO batch:15
percpu: Embedded 16 pages/cpu #ef7ce000 s34764 r8192 d22580 u65536
pcpu-alloc: s34764 r8192 d22580 u65536 alloc=16*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists, mobility grouping on. Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk coherent_pool=32MiB
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 953428K/1048576K available (6144K kernel code, 238K rwdata, 1568K rodata, 15360K init, 218K bss, 33708K reserved, 61440K cma-reserved, 200704K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0700000 (7136 kB)
.init : 0xc0900000 - 0xc1800000 (15360 kB)
.data : 0xc1800000 - 0xc183bb40 ( 239 kB)
.bss : 0xc183bb40 - 0xc1872344 ( 219 kB)
Preemptible hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0804100
Zynq clock init
sched_clock: 64 bits at 249MHz, resolution 4ns, wraps every 4398046511102ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x7350b89c29, max_idle_ns: 881590431910 ns
Switching to timer-based delay loop, resolution 4ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 716713566 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 499.99 BogoMIPS (lpj=2499999)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (999.99 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
DMA-API: preallocated 4096 debug entries
DMA-API: debugging enabled by kernel config
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
random: fast init done
NET: Registered protocol family 16
cma: cma_alloc(cma c184d3e0, count 8192, align 8)
cma: cma_alloc(): returned eff7f000
DMA: preallocated 32768 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB # 0xf2840000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 28, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
hw perfevents: no interrupt-affinity property for /pmu#f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
cma: cma_alloc(cma c184d3e0, count 1, align 0)
cma: cma_alloc(): returned effbf000
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl128s, expected n25q512a
m25p80 spi0.0: s25fl128s (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
cma: cma_alloc(cma c184d3e0, count 1, align 0)
cma: cma_alloc(): returned effbf020
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Freeing unused kernel memory: 15360K
udevd[758]: starting version 3.2.2
udevd[759]: starting eudev-3.2.2
cma: cma_alloc(cma c184d3e0, count 1, align 0)
cma: cma_alloc(): returned effbf040
cma: cma_alloc(cma c184d3e0, count 1, align 0)
cma: cma_alloc(): returned effbf060
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
macb e000b000.ethernet eth0: link up (1000/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
luscher2: disagrees about version of symbol module_layout
random: crng init done
luscher2: disagrees about version of symbol module_layout
luscher2: disagrees about version of symbol module_layout
luscher3: loading out-of-tree module taints kernel.
luscher 40400000.dma: Device Tree Probing
luscher 40400000.dma: luscher at 0x40400000 mapped to 0xf2990000, irq=49
buff size 0x00000000
buff number 0x00000000
cma: cma_alloc(cma c184d3e0, count 0, align 8)
luscher 40400000.dma: Buffer memory allocation failed
Buffer memory allocation failed
luscher: probe of 40400000.dma failed with error -12
The function cma_alloc parameter count is equal to 0, it directly returns the failure, please check the count parameter below:
cma: cma_alloc(cma c184d3e0, count 0, align 8)
in my case it was a difference between the name set in the field "compatible" of the device tree and the name of the module (they must match).
I also increase the coherent_pool with :
chosen {
bootargs = "console=ttyPS0,115200 earlyprintk coherent_pool=32MiB";
};

linux-xlnx: Kernel hangs at Registering SWP/SWPB emulation handler

I'm attempting to get a persistent distribution (Linaro) on an SD card, up and running on the ZedBoard. I built the kernel from the linux-xlnx source, and have run into a number of issues during startup. I've managed to overcome most of the kernel hangs I've been experiencing at bootup, but I'm stuck at "Registering SWP/SWPB emulation handler".
I've noticed an option in the .config file "CONFIG_SWP_EMULATE=y", but even if I comment this out (and I don't know if I should be doing this anyway, to be honest), when I go to rebuild the kernel with "make UIMAGE_LOADADDR=0x8000 uImage", this line just gets re-enabled in the .config file for whatever reason, and the problem persists.
The original configuration was created using "make xilinx_zynq_defconfig". I then used "make menuconfig" to enable earlyprintk and low-level debugging in the kernel hacking menu (displaying the output on UART1). From there, I directly edited the .config file each time the kernel got stuck at some point. The notable changes from the "xilinx_zynq_defconfig" thus far are:
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_ZYNQ_UART1=y
CONFIG_EARLY_PRINTK=y
# CONFIG_SERIAL_XILINX_PS_UART is not set
# CONFIG_RTC_HCTOSYS is not set
CONFIG_ARM_THUMB=y
CONFIG_ARM_THUMBEE=y
Any suggestions on how to overcome this issue would be appreciated. Thank you in advance :)
U-Boot 2016.07-00057-g2931a7a-dirty (Nov 17 2016 - 02:58:29 -0500)
Model: Zynq Zed Development Board
Board: Xilinx Zynq
DRAM: ECC disabled 512 MiB
MMC: sdhci#e0100000: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
In: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Zynq Zed Development Board
Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet#e000b000
reading uEnv.txt
135 bytes read in 10 ms (12.7 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot: 0
Device: sdhci#e0100000
Manufacturer ID: 28
OEM: 4245
Name: 2$AGO
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
135 bytes read in 10 ms (12.7 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.6.0-xilinx-00040-g786228
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3828432 Bytes = 3.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02020000
Booting using the fdt blob at 0x2020000
Loading Kernel Image ... OK
Loading Device Tree to 1eb0e000, end 1eb13595 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-00040-g7862283 (steven#sjk) (gcc version 4.9.2 (Sourcery CodeBench Lite 2015.05-17) ) #1 SMP PREEMPT Thu Nov 17 20:58:49 EST 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Zynq Zed Development Board
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c0938a80, node_mem_map debef000
Normal zone: 1024 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 131072 pages, LIFO batch:31
percpu: Embedded 12 pages/cpu #debcd000 s19776 r8192 d21184 u49152
pcpu-alloc: s19776 r8192 d21184 u49152 alloc=12*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyACM0,115200 debug root=/dev/mmcblk0p2 rw earlyprintk=serial,uart1,115200 rootfstype=ext4 rootwait devtmpfs.mount=0
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 494532K/524288K available (5303K kernel code, 229K rwdata, 1836K rodata, 1024K init, 221K bss, 13372K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc07f8d68 (8132 kB)
.init : 0xc0800000 - 0xc0900000 (1024 kB)
.data : 0xc0900000 - 0xc09397e0 ( 230 kB)
.bss : 0xc09397e0 - 0xc0970ee8 ( 222 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
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 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB # 0xe0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
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
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 64
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl256s1, expected n25q128a11
m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
5 ofpart partitions found on MTD device spi0.0
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"
0x000000100000-0x000000600000 : "qspi-linux"
0x000000600000-0x000000620000 : "qspi-device-tree"
0x000000620000-0x000000c00000 : "qspi-rootfs"
0x000000c00000-0x000001000000 : "qspi-bitstream"
CAN device driver interface
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:01:22)
Marvell 88E1510 e000b000.etherne:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0451/0x1507
Found TI TUSB1210 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
mmc0: new high speed SDHC card at address 59b4
can: broadcast manager protocol (rev 20120528 t)
mmcblk0: mmc0:59b4 2$AGO 7.46 GiB
mmcblk0: p1 p2
can: netlink gateway (rev 20130117) max_hops=1
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler

unexpected crash of embedded-linux on Zynq-Device (Zybo)

We have created, following the instruction on wiki-xilinx-linux web page, a system Zybo + embedded linux kernel (I want to remark that we didn't use PetaLinux but we have built all the file with the Xilinx tools).
When we turn on the system everything works fine and this is the output at the boot time:
U-Boot 2016.07-03720-g95e11f6-dirty (Oct 17 2016 - 02:56:48 -0700)
Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
I2C: ready
DRAM: ECC disabled 512 MiB
MMC: sdhci#e0100000: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
I2C EEPROM MAC address read failed
eth0: ethernet#e000b000
Hit any key to stop autoboot: 0
Device: sdhci#e0100000
Manufacturer ID: 3
OEM: 8368
Name: NCard
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
3843104 bytes read in 367 ms (10 MiB/s)
reading devicetree.dtb
10331 bytes read in 17 ms (592.8 KiB/s)
reading uramdisk.image.gz
5310018 bytes read in 504 ms (10 MiB/s)
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.6.0-xilinx-22285-g0e4e40
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3843040 Bytes = 3.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5309954 Bytes = 5.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 1e601000, end 1eb11602 ... OK
Loading Device Tree to 1e5fb000, end 1e60085a ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-22285-g0e4e407-dirty (leonardo#ubuntu) (gcc version 4.9.2 (Sourcery CodeBench Lite 2015.05-17) ) #1 SMP PREEMPT Mon Oct 17 03:54:44 PDT 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu #debcc000 s19776 r8192 d21184 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 489332K/524288K available (5304K kernel code, 230K rwdata, 1844K rodata, 1024K init, 222K bss, 18572K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc07fb004 (8141 kB)
.init : 0xc0800000 - 0xc0900000 (1024 kB)
.data : 0xc0900000 - 0xc0939b60 ( 231 kB)
.bss : 0xc0939b60 - 0xc09714e8 ( 223 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 325MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4af477f6aa, max_idle_ns: 440795207830 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 551318127 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 650.00 BogoMIPS (lpj=3250000)
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 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1300.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB # 0xe0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
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
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 5188K (de601000 - deb12000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 143, base_baud = 6250000) is a xuartps
�console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:01:22)
RTL8211E Gigabit Ethernet e000b000.etherne:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
ALSA device list:
mmc0: new high speed SDHC card at address b368
No soundcards found.
mmcblk0: mmc0:b368 NCard 3.72 GiB
mmcblk0: p1 p2
RAMDISK: gzip image found at block 0
EXT4-fs warning (device ram0): ext4_update_dynamic_rev:746: updating to rev 1 because of new feature flag, running e2fsck is recommended
EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 1:0.
Starting rcS...
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
++ Setting up mdev
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting ssh daemon
random: sshd urandom read with 1 bits of entropy available
rcS Complete
zynq>
zynq>
zynq>
The problem is that, after some instructions, the system crash with this output:
zynq> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
Trying to move old root to /initrd ... /initrd does not exist. Ignored.
Unmounting old root
Trying to free ramdisk memory ... failed
devtmpfs: error mounting -2
Unable to handle kernel NULL pointer dereference at virtual address 00000020
pgd = c0004000
[00000020] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 10 Comm: migration/0 Not tainted 4.6.0-xilinx-22285-g0e4e407-dirty #1
Hardware name: Xilinx Zynq Platform
task: de060040 ti: de06a000 task.ti: de06a000
PC is at set_section_perms+0x8c/0x110
LR is at set_section_perms+0x18/0x110
pc : [<c0113404>] lr : [<c0113390>] psr: 80000093
sp : de06bec0 ip : dc4f3018 fp : 00000600
r10: 00000000 r9 : 00000000 r8 : 00000001
r7 : 00000003 r6 : c0902468 r5 : 00000000 r4 : c0908508
r3 : 00000000 r2 : c0000000 r1 : 00000003 r0 : 00000009
Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 1c4f804a DAC: 00000051
Process migration/0 (pid: 10, stack limit = 0xde06a210)
Stack: (0xde06bec0 to 0xde06c000)
bec0: c0908508 00000003 00000001 de0db780 de0db780 de0db998 00000003 c0908508
bee0: c09065c0 00000000 00000000 c01134f4 de04df70 00000001 a0000013 de04df84
bf00: 00000003 00000000 00000000 c011355c c011354c c017c420 de04df30 debccf64
bf20: de06a000 debccf68 00000000 c017c4f8 c017c478 de06a000 de02db40 c090cd94
bf40: 00000001 c0135454 de060040 de02d9c0 00000000 de02db40 c0135218 00000000
bf60: 00000000 c0132a40 4dff1176 00000001 00000000 de02db40 00000000 00030003
bf80: de06bf80 de06bf80 00000000 00000000 de06bf90 de06bf90 de06bfac de02d9c0
bfa0: c0132968 00000000 00000000 c0106ef8 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 dfefe0f2 77e519c8
[<c0113404>] (set_section_perms) from [<c01134f4>] (update_sections_early+0x6c/0xc4)
[<c01134f4>] (update_sections_early) from [<c011355c>] (__fix_kernmem_perms+0x10/0x1c)
[<c011355c>] (__fix_kernmem_perms) from [<c017c420>] (multi_cpu_stop+0xb0/0x108)
[<c017c420>] (multi_cpu_stop) from [<c017c4f8>] (cpu_stopper_thread+0x80/0xb0)
[<c017c4f8>] (cpu_stopper_thread) from [<c0135454>] (smpboot_thread_fn+0x23c/0x254)
[<c0135454>] (smpboot_thread_fn) from [<c0132a40>] (kthread+0xd8/0xec)
[<c0132a40>] (kthread) from [<c0106ef8>] (ret_from_fork+0x14/0x3c)
Code: e1520003 2a00001b e5943014 e1a0baa2 (e599a020)
---[ end trace 07a0838423ee7708 ]---
note: migration/0[10] exited with preempt_count 2
It is clear that there is an error with the "mounted filesystem":
zynq> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
Trying to move old root to /initrd ... /initrd does not exist. Ignored.
Unmounting old root
Trying to free ramdisk memory ... failed
devtmpfs: error mounting -2
Why does this happen? Why before I can do everything with the system and, suddenly, I have a crash? Yes, the system crashes when I am doing nothing on it and not when I am working with it.
Are there some advice to solve this? to not to have anymore these crashes?
From the Linux Kernel Command line I can see "root=/dev/mmcblk0p2" and also the target is started with initial ramdisk image "uramdisk.image.gz". So the init process or scripts inside ramdisk image should be responsible to mount the real file system from SD i.e. from /dev/mmcblk0p2 and remove the used memory of ramdisk. To narrow down the problem, you need to analyze the steps taken in ramdisk image to mount the real filesystem and make sure you have the proper RFS flashed inside SD in /dev/mmcblk0p2. I can also seen some missing directories to mount the /dev/mmcblk0p1 and /dev/mmcblk0.
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
In simple words, check the init scripts inside the ramdisk image and make sure the RFS is mounted properly.

Linux 2.6.28 crashes when mem=1024M is passed as boot parameter from u-boot

I am working on building an linux for powerpc 8641d board. My U-boot has been modified to recognize 1 GB of memory(RAM) and it does. But Linux 2.6.28 crashes when mem=1024M is passed as boot parameter from u-boot. I have specified the memory size as 0x40000000 (1GB) in DTS file. Can any one help me to findout the reason?
But the same Linux image works when I specify bootargs as 'mem=256M'. But OS idetifies the total memory of 256MB only but I want it to identify complete 1GB memory.
Here is the dump of linux boot: ** It hangs at this point:
CPU: 8641D, Version: 3.0, (0x80900130)
Core: E600 Core 0, Version: 2.2, (0x80040202)
Clock Configuration:
CPU:1000 MHz, MPX:400 MHz
DDR:200 MHz (400 MT/s data rate), LBC:25 MHz
L1: D-cache 32 KB enabled
I-cache 32 KB enabled
L2: 512 KB enabled
Board: Wind River SBC8641D
I2C: ready
DRAM: DDR: 1 GiB
FLASH: 16 MiB
PCI-EXPRESS 1: Configured as Host
IGAPS: PCIE link is Up
Scanning PCI bus 01
01 00 10cf 2034 0380 ff
PCI-EXPRESS 1 on bus 00 - 01
PCI-EXPRESS 2: Disabled
In: serial
Out: serial
Err: serial
IGAPS: Interrupts enabled...!!!!
Net: eTSEC1, eTSEC2, eTSEC3, eTSEC4
Hit any key to stop autoboot: 0
=> bootm 1000000 - 2000000
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-2.6.28
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2417424 Bytes = 2.3 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Uncompressing Kernel Image ... OK
Loading Device Tree to 007fb000, end 007ffb2d ... OK
WARNING: your dts/dtb is old. You must update before the next kernel release
Using MPC86xx HPCN machine description
Total memory = 1024MB; using 2048kB for hash table (at cfe00000)
Linux version 2.6.28 (TCS#localhost) (gcc version 4.5.4 (Buildroot 2012.11.1) ) #42 SMP Tue Aug 20 22:32:49 IST 2013
CPU maps initialized for 1 thread per core
console [udbg0] enabled
setup_arch: bootmem
mpc86xx_hpcn_setup_arch()
Found FSL PCI host bridge at 0x00000000f8008000. Firmware bus number: 0->1
Zone PFN ranges:
DMA 0x00000000 -> 0x00030000
Normal 0x00030000 -> 0x00030000
HighMem 0x00030000 -> 0x00040000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00040000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: console=ttyS0,115200 mem=1024M ip=172.19.180.10:172.19.180.30:172.19.180.1:255.255.255.0:sbc8641d:eth0:off rw root=/dev/nfs nfsroot=172.19.180.30:/opt/nfsRootfs
PID hash table entries: 4096 (order: 12, 16384 bytes)
clocksource: timebase mult[2800000] shift[22] registered
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1031376k/1048576k available (4632k kernel code, 16396k reserved, 144k data, 175k bss, 208k init)
Any reason why it hangs here?

Resources