cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
7,348 Views
Registered: ‎05-31-2015

Xillinux 1.3C Hanging On Startup After Adding UART0 [Zynq 7000]

Hey everyone,

I'm using Xillinux 1.3c on a Zynq 7000 development board. I used the demo bundle and everything worked very well. The only thing it was missing was that I need an additional UART besides the one micro usb connector.

 

In Vivado 2014.4, I added UART_0 to the PS, and made the pins external. I added a design wrapper for a uart_tx and uart_rx, and in the constraints file, I simply replaced 2 of the GPIO ports (54 and 55) with my uart_tx and uart_rx ports. I  was told that if I add a peripherial to a bus connection that was used anyways, then I wouldn't need to update the FSBL and hence boot.bin so that's why I went that route. I successfully generated a new .bit bitstream file and updated the device tree accordingly. When I go to boot, it gets a good portion of the way through but then it hangs. Here is the console output:

U-Boot 2013.07 (Aug 10 2014 - 11:28:31)

Zynq PS_VERSION = 3
Memory: ECC disabled
DRAM:  512 MiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Hit any key to stop autoboot:  0
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SS16G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Booting Xillinux...
reading xillydemo.bit
2083845 bytes read in 154 ms (12.9 MiB/s)
  design filename = "xillydemo;UserID=0XFFFFFFFF;Version=2014.4"
  part number = "7z010clg400"
  date = "2015/08/26"
  time = "14:40:05"
  bytes in bitstream = 2083740
zynq_load: Align buffer at 100069 to 100080(swap 1)
reading uImage
3499448 bytes read in 252 ms (13.2 MiB/s)
reading devicetree.dtb
9515 bytes read in 15 ms (619.1 KiB/s)
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.12.0-xillinux-1.3
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3499384 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x2a00000
   Loading Kernel Image ... OK
   Loading Device Tree to 1fb4e000, end 1fb5352a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.12.0-xillinux-1.3 (eli@ocho.localdomain) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-62) ) #1 SMP PREEMPT Thu Mar 13 18:39:32 IST 2014
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Xilinx Zynq Platform, model: xlnx,zynq-7000
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 7 pages/cpu @c0af8000 s7936 r8192 d12544 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] allocated 1048576 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 511532K/524288K available (4631K kernel code, 296K rwdata, 1744K rodata, 199K init, 200K bss, 12756K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0641e24   (6376 kB)
[    0.000000]       .init : 0xc0642000 - 0xc0673f00   ( 200 kB)
[    0.000000]       .data : 0xc0674000 - 0xc06be3c0   ( 297 kB)
[    0.000000]        .bss : 0xc06be3cc - 0xc06f065c   ( 201 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Dump stacks of tasks blocking RCU-preempt GP.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] slcr mapped to e0802000
[    0.000000] Zynq clock init
[    0.000000] sched_clock: 16 bits at 52kHz, resolution 18904ns, wraps every 1238ms
[    0.000000] timer #0 at e0804000, irq=43
[    0.000000] Console: colour dummy device 80x30
[    0.008450] Calibrating delay loop... 1292.69 BogoMIPS (lpj=6463488)
[    0.044066] pid_max: default: 32768 minimum: 301
[    0.046240] Mount-cache hash table entries: 512
[    0.053122] Initializing cgroup subsys memory
[    0.055069] Initializing cgroup subsys devices
[    0.059455] Initializing cgroup subsys freezer
[    0.063916] Initializing cgroup subsys blkio
[    0.068245] Initializing cgroup subsys perf_event
[    0.073028] CPU: Testing write buffer coherency: ok
[    0.078132] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.083577] Setting up static identity map for 0xc045ffb0 - 0xc0460008
[    0.090231] L310 cache controller enabled
[    0.094145] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 512 kB
[    0.154848] CPU1: Booted secondary processor
[    0.244078] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.244210] Brought up 2 CPUs
[    0.251696] SMP: Total of 2 processors activated.
[    0.256441] CPU: All CPU(s) started in SVC mode.
[    0.261678] devtmpfs: initialized
[    0.267047] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.273134] regulator-dummy: no parameters
[    0.276764] NET: Registered protocol family 16
[    0.282076] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.297011] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.299525] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.334952] bio: create slab <bio-0> at 0
[    0.335935] VCCPINT: 1000 mV
[    0.337145] vgaarb: loaded
[    0.339962] SCSI subsystem initialized
[    0.343762] usbcore: registered new interface driver usbfs
[    0.349225] usbcore: registered new interface driver hub
[    0.354122] usbcore: registered new device driver usb
[    0.359547] media: Linux media interface: v0.10
[    0.363669] Linux video capture interface: v2.00
[    0.368678] pps_core: LinuxPPS API ver. 1 registered
[    0.373159] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.382441] PTP clock support registered
[    0.386638] EDAC MC: Ver: 3.0.0
[    0.390551] Advanced Linux Sound Architecture Driver Initialized.
[    0.396695] Switched to clocksource ttc_clocksource
[    0.418776] NET: Registered protocol family 2
[    0.419437] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.424825] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.431404] TCP: Hash tables configured (established 4096 bind 4096)
[    0.437605] TCP: reno registered
[    0.440818] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.446679] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.453182] NET: Registered protocol family 1
[    0.458097] RPC: Registered named UNIX socket transport module.
[    0.463258] RPC: Registered udp transport module.
[    0.468060] RPC: Registered tcp transport module.
[    0.472711] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.479649] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[    0.490386] VFS: Disk quotas dquot_6.5.2
[    0.491313] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.498402] NFS: Registering the id_resolver key type
[    0.502845] Key type id_resolver registered
[    0.507060] Key type id_legacy registered
[    0.511106] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.518346] msgmni has been set to 999
[    0.522676] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.529330] io scheduler noop registered
[    0.533262] io scheduler deadline registered
[    0.537610] io scheduler cfq registered (default)
[    0.558311] xuartps e0000000.serial: aper_clk clock not found.
[    0.558689] xuartps: probe of e0000000.serial failed with error -2
[    0.564890] xuartps e0001000.serial: aper_clk clock not found.
[    0.570769] xuartps: probe of e0001000.serial failed with error -2
[    0.587859] brd: module loaded
[    0.593114] loop: module loaded
[    0.603002] libphy: Fixed MDIO Bus: probed
[    0.604987] libphy: XEMACPS mii bus: probed
[    0.605856] Unable to handle kernel NULL pointer dereference at virtual address 0000001c
[    0.613947] pgd = c0004000
[    0.616689] [0000001c] *pgd=00000000
[    0.620299] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    0.625630] Modules linked in:
[    0.628731] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.0-xillinux-1.3 #1
[    0.635782] task: df46bb40 ti: df46c000 task.ti: df46c000
[    0.641227] PC is at of_get_next_available_child+0x1c/0x5c
[    0.646709] LR is at of_get_next_available_child+0x14/0x5c
[    0.652210] pc : [<c036cc90>]    lr : [<c036cc88>]    psr: 60000193
[    0.652210] sp : df46ddf0  ip : 00000000  fp : df4f5d1c
[    0.663742] r10: 00000000  r9 : deffc800  r8 : df4c0000
[    0.668979] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00000000
[    0.675520] r3 : c06e82d4  r2 : 00000e1e  r1 : 00000e1e  r0 : 60000113
[    0.682061] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    0.689453] Control: 18c5387d  Table: 0000404a  DAC: 00000015
[    0.695219] Process swapper/0 (pid: 1, stack limit = 0xdf46c240)
[    0.701230] Stack: (0xdf46ddf0 to 0xdf46e000)
[    0.705616] dde0:                                     deffc800 deff9d00 00000000 c0370824
[    0.713802] de00: deff9d0c deff9800 deff9d00 00000000 df4c0010 df4c0000 deffc800 deff9800
[    0.721969] de20: deff9d00 00000000 df4c0010 df4c0000 deffc800 deff9d0c df4f5d1c c02c2c5c
[    0.730135] de40: c011c138 00000000 deff4340 deff7208 00000000 c011c138 df4c0010 c0268074
[    0.738302] de60: df4a1f04 00000003 df4ccc08 00000000 df4c0044 df4c0010 df4c0044 c06a0e3c
[    0.746469] de80: c06a0e3c 00000000 00000000 00000000 00000000 c0261264 c0261250 c02601cc
[    0.754636] dea0: 00000000 df4c0010 df4c0044 c06a0e3c 00000000 c026035c c06a0e3c c02602fc
[    0.762822] dec0: 00000000 c025eb0c df4a1edc df4c9c74 c06a0e3c deff4340 c0696a80 c025f914
[    0.770988] dee0: c05bcd0e c05bcd10 00000000 c06a0e3c c0668a58 c0668a38 c065ccb0 00000000
[    0.779155] df00: 00000000 c0260970 00000000 00000006 c0668a58 c000876c c0464ac8 df4b3dc0
[    0.787322] df20: 00000000 c0685958 60000100 00000001 c061454c c05c2441 c0642450 c061454c
[    0.795489] df40: c05c2441 c0038e54 c06137cc 000000d9 00000006 00000006 c0685928 00000006
[    0.803656] df60: c0668a54 c0668a38 00000006 c0668a58 c0668a38 000000d9 c0671298 c0642c00
[    0.811822] df80: 00000006 00000006 c0642450 00000000 00000000 c0459f80 00000000 00000000
[    0.820008] dfa0: 00000000 c0459f88 00000000 c000dbf8 00000000 00000000 00000000 00000000
[    0.828175] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    0.836342] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 67a7bc31 c5019282
[    0.844528] [<c036cc90>] (of_get_next_available_child+0x1c/0x5c) from [<c0370824>] (of_mdiobus_register+0x60/0x2bc)
[    0.854925] [<c0370824>] (of_mdiobus_register+0x60/0x2bc) from [<c02c2c5c>] (xemacps_probe+0x36c/0x6b4)
[    0.864302] [<c02c2c5c>] (xemacps_probe+0x36c/0x6b4) from [<c0261264>] (platform_drv_probe+0x14/0x18)
[    0.873508] [<c0261264>] (platform_drv_probe+0x14/0x18) from [<c02601cc>] (driver_probe_device+0xb4/0x1e4)
[    0.883131] [<c02601cc>] (driver_probe_device+0xb4/0x1e4) from [<c026035c>] (__driver_attach+0x60/0x84)
[    0.892508] [<c026035c>] (__driver_attach+0x60/0x84) from [<c025eb0c>] (bus_for_each_dev+0x4c/0x80)
[    0.901525] [<c025eb0c>] (bus_for_each_dev+0x4c/0x80) from [<c025f914>] (bus_add_driver+0xa8/0x234)
[    0.910562] [<c025f914>] (bus_add_driver+0xa8/0x234) from [<c0260970>] (driver_register+0x9c/0xe0)
[    0.919503] [<c0260970>] (driver_register+0x9c/0xe0) from [<c000876c>] (do_one_initcall+0x98/0x13c)
[    0.928540] [<c000876c>] (do_one_initcall+0x98/0x13c) from [<c0642c00>] (kernel_init_freeable+0x14c/0x21c)
[    0.938181] [<c0642c00>] (kernel_init_freeable+0x14c/0x21c) from [<c0459f88>] (kernel_init+0x8/0xe4)
[    0.947293] [<c0459f88>] (kernel_init+0x8/0xe4) from [<c000dbf8>] (ret_from_fork+0x14/0x3c)
[    0.955630] Code: e1a05001 eb03ca0b e3550000 15954020 (0594401c)
[    0.961755] ---[ end trace 577660f43679b010 ]---
[    0.966368] note: swapper/0[1] exited with preempt_count 1
[    0.972021] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    0.972021]
[    0.981076] CPU0: stopping
[    0.983836] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G      D      3.12.0-xillinux-1.3 #1
[    0.991852] [<c00143d8>] (unwind_backtrace+0x0/0xe0) from [<c0010ba8>] (show_stack+0x10/0x14)
[    1.000359] [<c0010ba8>] (show_stack+0x10/0x14) from [<c045bdd8>] (dump_stack+0x84/0xcc)
[    1.008431] [<c045bdd8>] (dump_stack+0x84/0xcc) from [<c0012e5c>] (ipi_cpu_stop+0x3c/0x6c)
[    1.016692] [<c0012e5c>] (ipi_cpu_stop+0x3c/0x6c) from [<c0013458>] (handle_IPI+0x5c/0x7c)
[    1.024935] [<c0013458>] (handle_IPI+0x5c/0x7c) from [<c00084ec>] (gic_handle_irq+0x54/0x5c)
[    1.033366] [<c00084ec>] (gic_handle_irq+0x54/0x5c) from [<c0011640>] (__irq_svc+0x40/0x70)
[    1.041703] Exception stack(0xc0675f70 to 0xc0675fb8)
[    1.046789] 5f60:                                     c0af89e8 00000000 00000000 00000000
[    1.054955] 5f80: c067cd88 c06be400 ffffffff c0668c38 c0af5c00 413fc090 00000000 00000000
[    1.063122] 5fa0: 00000000 c0675fb8 c000e70c c000e710 60000113 ffffffff
[    1.069758] [<c0011640>] (__irq_svc+0x40/0x70) from [<c000e710>] (arch_cpu_idle+0x24/0x2c)
[    1.078019] [<c000e710>] (arch_cpu_idle+0x24/0x2c) from [<c0052a68>] (cpu_startup_entry+0xb4/0x124)
[    1.087037] [<c0052a68>] (cpu_startup_entry+0xb4/0x124) from [<c0642a54>] (start_kernel+0x2d8/0x334)
[    1.096149] [<c0642a54>] (start_kernel+0x2d8/0x334) from [<00008074>] (0x8074)

A few things stick out to me:
1. The following few lines in regard to the UART seem to be causing a problem: 

[    0.558311] xuartps e0000000.serial: aper_clk clock not found.
[    0.558689] xuartps: probe of e0000000.serial failed with error -2
[    0.564890] xuartps e0001000.serial: aper_clk clock not found.
[    0.570769] xuartps: probe of e0001000.serial failed with error -2

Another post I found on the matter mentioned that aper_clk is deprecated for uart and that my dts needs to be updated. However, when I look at my dts, it has no mention of aper_clk in the uart entries. However, aper_clk does appear for the gem/ethernet entries, and in the slcr entry, there is a uart0_aper and uart1_aper in the clock-output-names= area.

 

2. The mention of the kernel null pointer

[    0.605856] Unable to handle kernel NULL pointer dereference at virtual address 0000001c

Just to clarify, all I did was add uart_0 to the xillydemo. I have a new xillydemo.bit file with my updated design, an updated devicetree.dtb, I am still using the same boot.bin (and therefore the same fsbl.elf and uboot.elf). Does boot.bin need to be updated with a new fsbl.elf and uboot.elf or are my problems related to something else? Any help would be very much appreciated.

Regards,
Chris

0 Kudos
1 Reply
Anonymous
Not applicable
1,699 Views

I am having this EXACT same problem. Did you happen to find a solution?  Thanks.

0 Kudos