cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
raj
Adventurer
Adventurer
1,001 Views
Registered: ‎05-24-2020

PL UART causes kernel panic

Jump to solution

@stephenm @abhinayp 

Board - ZCU102 rev1.0

Vivado and Petalinux version 2018.3

Boot from SD card

The vivado design has 4 AXI Uartlite IPs including the PL UART board preset. Linux boots successfully if there are no UART IPs present in the design but it fails when there are UART IPs present. I followed https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842249/Uartlite+Driver  but that did not help. How can this be resolved ?

raj_0-1607100459267.png

All the UART IPs are detected and present in pl.dtsi and system.dtb. The contents of pl.dtsi are below - 

/*
* CAUTION: This file is automatically generated by Xilinx.
* Version:
* Today is: Thu Dec 3 19:47:33 2020
*/


/ {
amba_pl: amba_pl@0 {
#address-cells = <2>;
#size-cells = <2>;
compatible = "simple-bus";
ranges ;
USBserial: serial@80002000 {
clock-names = "s_axi_aclk";
clocks = <&clk 71>;
compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a";
current-speed = <9600>;
device_type = "serial";
port-number = <1>;
reg = <0x0 0x80002000 0x0 0x1000>;
xlnx,baudrate = <0x2580>;
xlnx,data-bits = <0x8>;
xlnx,odd-parity = <0x0>;
xlnx,s-axi-aclk-freq-hz-d = "99.990005";
xlnx,use-parity = <0x0>;
};
fpgaout3: serial@8000d000 {
clock-names = "s_axi_aclk";
clocks = <&clk 71>;
compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a";
current-speed = <9600>;
device_type = "serial";
port-number = <2>;
reg = <0x0 0x8000d000 0x0 0x1000>;
xlnx,baudrate = <0x2580>;
xlnx,data-bits = <0x8>;
xlnx,odd-parity = <0x0>;
xlnx,s-axi-aclk-freq-hz-d = "99.990005";
xlnx,use-parity = <0x0>;
};
fpgaout4: serial@8000e000 {
clock-names = "s_axi_aclk";
clocks = <&clk 71>;
compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a";
current-speed = <9600>;
device_type = "serial";
port-number = <3>;
reg = <0x0 0x8000e000 0x0 0x1000>;
xlnx,baudrate = <0x2580>;
xlnx,data-bits = <0x8>;
xlnx,odd-parity = <0x0>;
xlnx,s-axi-aclk-freq-hz-d = "99.990005";
xlnx,use-parity = <0x0>;
};
psu_ctrl_ipi: PERIPHERAL@ff380000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff380000 0x0 0x80000>;
};
psu_message_buffers: PERIPHERAL@ff990000 {
compatible = "xlnx,PERIPHERAL-1.0";
reg = <0x0 0xff990000 0x0 0x10000>;
};
rf_eeprom: i2c@8000c000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&clk 71>;
compatible = "xlnx,axi-iic-2.0", "xlnx,xps-iic-2.00.a";
reg = <0x0 0x8000c000 0x0 0x1000>;
};
stepper5phase: serial@8000b000 {
clock-names = "s_axi_aclk";
clocks = <&clk 71>;
compatible = "xlnx,axi-uartlite-2.0", "xlnx,xps-uartlite-1.00.a";
current-speed = <9600>;
device_type = "serial";
port-number = <5>;
reg = <0x0 0x8000b000 0x0 0x1000>;
xlnx,baudrate = <0x2580>;
xlnx,data-bits = <0x8>;
xlnx,odd-parity = <0x0>;
xlnx,s-axi-aclk-freq-hz-d = "99.990005";
xlnx,use-parity = <0x0>;
};
};
};

 

The contents of system-user.dtsi are below - 

/include/ "system-conf.dtsi"
/ {
chosen {
bootargs = "earlycon console=ttyPS0,115200 earlyprintk clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait";
};

};

&stepper5phase {
status = "okay";
};
&USBserial {
status = "okay";
};
&fpgaout3 {
status = "okay";
};
&fpgaout4 {
status = "okay";
};

 

 

 Below is the boot log - 

 

Xilinx Zynq MP First Stage Boot Loader
Release 2018.3 Dec 3 2020 - 19:56:01
NOTICE: ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE: BL31: Secure code at 0x0
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v1.5(release):xilinx-v2018.2-919-g08560c36
NOTICE: BL31: Built : 19:56:32, Dec 3 2020
PMUFW: v1.1


U-Boot 2018.01 (Dec 03 2020 - 19:49:41 +0000) Xilinx ZynqMP ZCU102 rev1.0

I2C: ready
DRAM: 4 GiB
EL Level: EL2
Chip ID: zu9eg
MMC: mmc@ff170000: 0 (SD)
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
In: serial@ff000000
Out: serial@ff000000
Err: serial@ff000000
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Net: ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
eth0: ethernet@ff0e0000
Hit any key to stop autoboot: 0
Device: mmc@ff170000
Manufacturer ID: 3
OEM: 5344
Name: SF128
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 119.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7104024 bytes read in 479 ms (14.1 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x10000104
Data Size: 7057763 Bytes = 6.7 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x00080000
Entry Point: 0x00080000
Hash algo: sha1
Hash value: 3754097fa94ad721cd66e7615be9b5ee98b2d3b4
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Trying 'fdt@system-top.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x106bb36c
Data Size: 44342 Bytes = 43.3 KiB
Architecture: AArch64
Hash algo: sha1
Hash value: 0676b3b088d5b2ac58238f260a965c1c2f60b792
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x106bb36c
Uncompressing Kernel Image ... OK
Loading Device Tree to 0000000007ff2000, end 0000000007fffd35 ... OK

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Thu Dec 3 20:05:45 UTC 2020
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: ZynqMP ZCU102 Rev1.0
[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[ 0.000000] bootconsole [cdns0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 21 pages/cpu @ffffffc87ff60000 s46488 r8192 d31336 u86016
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1033987
[ 0.000000] Kernel command line: earlycon console=ttyPS0,115200n8 earlyprintk clk_ignore_unused root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] software IO TLB [mem 0x6bc00000-0x6fc00000] (64MB) mapped at [ffffffc06bc00000-ffffffc06fbfffff]
[ 0.000000] Memory: 3784240K/4193280K available (10108K kernel code, 664K rwdata, 3220K rodata, 512K init, 2167K bss, 146896K reserved, 262144K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff8008a60000 ( 10112 KB)
[ 0.000000] .rodata : 0xffffff8008a60000 - 0xffffff8008d90000 ( 3264 KB)
[ 0.000000] .init : 0xffffff8008d90000 - 0xffffff8008e10000 ( 512 KB)
[ 0.000000] .data : 0xffffff8008e10000 - 0xffffff8008eb6200 ( 665 KB)
[ 0.000000] .bss : 0xffffff8008eb6200 - 0xffffff80090d40b0 ( 2168 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf1dc00000 ( 476 MB actual)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc880000000 ( 34816 MB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x170f8de2d3, max_idle_ns: 440795206112 ns
[ 0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511101ns
[ 0.008341] Console: colour dummy device 80x25
[ 0.012390] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.98 BogoMIPS (lpj=399960)
[ 0.022756] pid_max: default: 32768 minimum: 301
[ 0.027438] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.034012] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.041653] ASID allocator initialised with 65536 entries
[ 0.046503] Hierarchical SRCU implementation.
[ 0.051140] EFI services will not be available.
[ 0.055303] zynqmp_plat_init Platform Management API v1.1
[ 0.060648] zynqmp_plat_init Trustzone version v1.0
[ 0.065580] smp: Bringing up secondary CPUs ...
[ 0.070230] Detected VIPT I-cache on CPU1
[ 0.070258] CPU1: Booted secondary processor [410fd034]
[ 0.070524] Detected VIPT I-cache on CPU2
[ 0.070542] CPU2: Booted secondary processor [410fd034]
[ 0.070794] Detected VIPT I-cache on CPU3
[ 0.070812] CPU3: Booted secondary processor [410fd034]
[ 0.070853] smp: Brought up 1 node, 4 CPUs
[ 0.101565] SMP: Total of 4 processors activated.
[ 0.106238] CPU features: detected feature: 32-bit EL0 Support
[ 0.112037] CPU: All CPU(s) started at EL2
[ 0.116108] alternatives: patching kernel code
[ 0.121233] devtmpfs: initialized
[ 0.128635] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.133495] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.145119] xor: measuring software checksum speed
[ 0.183785] 8regs : 2302.000 MB/sec
[ 0.223815] 8regs_prefetch: 2052.000 MB/sec
[ 0.263847] 32regs : 2830.000 MB/sec
[ 0.303878] 32regs_prefetch: 2378.000 MB/sec
[ 0.303906] xor: using function: 32regs (2830.000 MB/sec)
[ 0.308276] pinctrl core: initialized pinctrl subsystem
[ 0.313881] NET: Registered protocol family 16
[ 0.318439] cpuidle: using governor menu
[ 0.322340] vdso: 2 pages (1 code @ ffffff8008a66000, 1 data @ ffffff8008e14000)
[ 0.329072] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.336255] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.363037] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[ 0.365058] ARM CCI_400_r1 PMU driver probed
[ 0.370043] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[ 0.383564] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.449663] raid6: int64x1 gen() 401 MB/s
[ 0.517632] raid6: int64x1 xor() 446 MB/s
[ 0.585652] raid6: int64x2 gen() 686 MB/s
[ 0.653731] raid6: int64x2 xor() 603 MB/s
[ 0.721795] raid6: int64x4 gen() 1042 MB/s
[ 0.789844] raid6: int64x4 xor() 742 MB/s
[ 0.857903] raid6: int64x8 gen() 980 MB/s
[ 0.925923] raid6: int64x8 xor() 745 MB/s
[ 0.994016] raid6: neonx1 gen() 726 MB/s
[ 1.062039] raid6: neonx1 xor() 852 MB/s
[ 1.130128] raid6: neonx2 gen() 1169 MB/s
[ 1.198143] raid6: neonx2 xor() 1207 MB/s
[ 1.266190] raid6: neonx4 gen() 1507 MB/s
[ 1.334247] raid6: neonx4 xor() 1442 MB/s
[ 1.402302] raid6: neonx8 gen() 1652 MB/s
[ 1.470359] raid6: neonx8 xor() 1533 MB/s
[ 1.470385] raid6: using algorithm neonx8 gen() 1652 MB/s
[ 1.474353] raid6: .... xor() 1533 MB/s, rmw enabled
[ 1.479284] raid6: using neon recovery algorithm
[ 1.485309] SCSI subsystem initialized
[ 1.487737] usbcore: registered new interface driver usbfs
[ 1.493070] usbcore: registered new interface driver hub
[ 1.498351] usbcore: registered new device driver usb
[ 1.503389] media: Linux media interface: v0.10
[ 1.507850] Linux video capture interface: v2.00
[ 1.512447] pps_core: LinuxPPS API ver. 1 registered
[ 1.517348] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 1.526442] PTP clock support registered
[ 1.530340] EDAC MC: Ver: 3.0.0
[ 1.533733] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[ 1.540508] FPGA manager framework
[ 1.543745] fpga-region fpga-full: FPGA Region probed
[ 1.548759] Advanced Linux Sound Architecture Driver Initialized.
[ 1.554951] Bluetooth: Core ver 2.22
[ 1.558283] NET: Registered protocol family 31
[ 1.562680] Bluetooth: HCI device and connection manager initialized
[ 1.568997] Bluetooth: HCI socket layer initialized
[ 1.573840] Bluetooth: L2CAP socket layer initialized
[ 1.578865] Bluetooth: SCO socket layer initialized
[ 1.584281] clocksource: Switched to clocksource arch_sys_counter
[ 1.589844] VFS: Disk quotas dquot_6.6.0
[ 1.593689] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.604300] NET: Registered protocol family 2
[ 1.605079] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[ 1.612190] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[ 1.618939] TCP: Hash tables configured (established 32768 bind 32768)
[ 1.625112] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.631090] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.637565] NET: Registered protocol family 1
[ 1.641929] RPC: Registered named UNIX socket transport module.
[ 1.647637] RPC: Registered udp transport module.
[ 1.652302] RPC: Registered tcp transport module.
[ 1.656973] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.663786] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[ 1.670623] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 1.678835] audit: initializing netlink subsys (disabled)
[ 1.683628] audit: type=2000 audit(1.631:1): state=initialized audit_enabled=0 res=1
[ 1.683928] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[ 1.698279] NFS: Registering the id_resolver key type
[ 1.702667] Key type id_resolver registered
[ 1.706803] Key type id_legacy registered
[ 1.710787] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.717455] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.746750] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 1.748505] io scheduler noop registered
[ 1.752394] io scheduler deadline registered
[ 1.756643] io scheduler cfq registered (default)
[ 1.761304] io scheduler mq-deadline registered
[ 1.765801] io scheduler kyber registered
[ 1.770367] nwl-pcie fd0e0000.pcie: Link is DOWN
[ 1.774404] OF: PCI: host bridge /amba/pcie@fd0e0000 ranges:
[ 1.780010] OF: PCI: MEM 0xe0000000..0xefffffff -> 0xe0000000
[ 1.785877] OF: PCI: MEM 0x600000000..0x7ffffffff -> 0x600000000
[ 1.792138] nwl-pcie fd0e0000.pcie: PCI host bridge to bus 0000:00
[ 1.798161] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.803608] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 1.810442] pci_bus 0000:00: root bus resource [mem 0x600000000-0x7ffffffff pref]
[ 1.818127] pci 0000:00:00.0: PCI bridge to [bus 01-0c]
[ 1.823957] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[ 1.829744] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[ 1.836462] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[ 1.843377] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[ 1.850293] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[ 1.857218] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[ 1.864139] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[ 1.871060] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[ 1.877981] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[ 1.884953] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[ 1.891826] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[ 1.898742] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[ 1.905657] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[ 1.912585] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[ 1.919502] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[ 1.926427] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[ 1.933345] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[ 1.964511] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 1.966488] Unable to handle kernel NULL pointer dereference at virtual address 00000038
[ 1.973282] Mem abort info:
[ 1.976030] Exception class = DABT (current EL), IL = 32 bits
[ 1.981917] SET = 0, FnV = 0
[ 1.984944] EA = 0, S1PTW = 0
[ 1.988053] Data abort info:
[ 1.990913] ISV = 0, ISS = 0x00000005
[ 1.994719] CM = 0, WnR = 0
[ 1.997661] [0000000000000038] user address but active_mm is swapper
[ 2.003977] Internal error: Oops: 96000005 [#1] SMP
[ 2.008817] Modules linked in:
[ 2.011848] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.14.0-xilinx-v2018.3 #1
[ 2.019024] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
[ 2.023957] task: ffffffc87b846d00 task.stack: ffffff8008038000
[ 2.029845] PC is at uart_unregister_driver+0x10/0x70
[ 2.034858] LR is at ulite_probe+0x1d8/0x5d0
[ 2.039095] pc : [<ffffff8008503bf8>] lr : [<ffffff8008512dc0>] pstate: a0000045
[ 2.046447] sp : ffffff800803bbd0
[ 2.049735] x29: ffffff800803bbd0 x28: 00000000fffffffa
[ 2.055012] x27: 0000000000000001 x26: ffffff80090bb000
[ 2.060289] x25: ffffffc87a98d098 x24: ffffffc87b13c800
[ 2.065566] x23: ffffffc87a88a098 x22: ffffff8008e4a000
[ 2.070843] x21: ffffffc87b13c810 x20: 0000000000000000
[ 2.076120] x19: ffffffc87b133100 x18: 0000000000000001
[ 2.081397] x17: 0000000000000001 x16: 0000000000000019
[ 2.086674] x15: ffffffffffffffff x14: ffffffc87b264f9f
[ 2.091951] x13: ffffffc87b264f9e x12: 0000000000000000
[ 2.097228] x11: 0000000000000005 x10: 0101010101010101
[ 2.102505] x9 : fffffffffffffffe x8 : 7f7f7f7f7f7f7f7f
[ 2.107782] x7 : fefefeff646c606d x6 : 070f1900f2f2f5f0
[ 2.113059] x5 : 7075727200190f07 x4 : ffffffc87b133100
[ 2.118336] x3 : 0000000000000001 x2 : 0000000000000200
[ 2.123613] x1 : 0000000000000200 x0 : 0000000000000000
[ 2.128891] Process swapper/0 (pid: 1, stack limit = 0xffffff8008038000)
[ 2.135551] Call trace:
[ 2.137975] Exception stack(0xffffff800803ba90 to 0xffffff800803bbd0)
[ 2.144377] ba80: 0000000000000000 0000000000000200
[ 2.152163] baa0: 0000000000000200 0000000000000001 ffffffc87b133100 7075727200190f07
[ 2.159949] bac0: 070f1900f2f2f5f0 fefefeff646c606d 7f7f7f7f7f7f7f7f fffffffffffffffe
[ 2.167735] bae0: 0101010101010101 0000000000000005 0000000000000000 ffffffc87b264f9e
[ 2.175520] bb00: ffffffc87b264f9f ffffffffffffffff 0000000000000019 0000000000000001
[ 2.183306] bb20: 0000000000000001 ffffffc87b133100 0000000000000000 ffffffc87b13c810
[ 2.191092] bb40: ffffff8008e4a000 ffffffc87a88a098 ffffffc87b13c800 ffffffc87a98d098
[ 2.198878] bb60: ffffff80090bb000 0000000000000001 00000000fffffffa ffffff800803bbd0
[ 2.206664] bb80: ffffff8008512dc0 ffffff800803bbd0 ffffff8008503bf8 00000000a0000045
[ 2.214450] bba0: ffffffc87b13c810 ffffffc87aa60d00 ffffffffffffffff 0cc000017a88a098
[ 2.222234] bbc0: ffffff800803bbd0 ffffff8008503bf8
[ 2.227081] [<ffffff8008503bf8>] uart_unregister_driver+0x10/0x70
[ 2.233135] [<ffffff8008512dc0>] ulite_probe+0x1d8/0x5d0
[ 2.238413] [<ffffff800857fcc0>] platform_drv_probe+0x58/0xb8
[ 2.244123] [<ffffff800857e0a4>] driver_probe_device+0x22c/0x2d8
[ 2.250091] [<ffffff800857e20c>] __driver_attach+0xbc/0xc0
[ 2.255541] [<ffffff800857c1e4>] bus_for_each_dev+0x4c/0x98
[ 2.261078] [<ffffff800857d9a0>] driver_attach+0x20/0x28
[ 2.266355] [<ffffff800857d4f0>] bus_add_driver+0x1b8/0x228
[ 2.271892] [<ffffff800857ebb8>] driver_register+0x60/0xf8
[ 2.277341] [<ffffff800857fc10>] __platform_driver_register+0x40/0x48
[ 2.283744] [<ffffff8008db23ec>] ulite_init+0x18/0x20
[ 2.288762] [<ffffff8008083980>] do_one_initcall+0x38/0x128
[ 2.294299] [<ffffff8008d90c48>] kernel_init_freeable+0x138/0x1d8
[ 2.300354] [<ffffff8008a4d4c8>] kernel_init+0x10/0x100
[ 2.305543] [<ffffff8008084a08>] ret_from_fork+0x10/0x18
[ 2.310821] Code: a9bd7bfd 910003fd a90153f3 aa0003f4 (f9401c13)
[ 2.316878] ---[ end trace 4b7e1455a0554461 ]---
[ 2.321473] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.321473]
[ 2.330544] SMP: stopping secondary CPUs
[ 2.334437] Kernel Offset: disabled
[ 2.337896] CPU features: 0x002004
[ 2.341269] Memory Limit: none
[ 2.344299] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.344299]

 

 

 

0 Kudos
1 Solution

Accepted Solutions
patocarr
Teacher
Teacher
958 Views
Registered: ‎01-28-2008

Hi @raj 

  I suspect the UART's may need their interrupt lines connected properly to be controlled from Linux. They are not connected in the block design as shown.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

View solution in original post

9 Replies
stephenm
Moderator
Moderator
969 Views
Registered: ‎09-12-2007

Do these work in baremetal? This would rule out a HW issue.

 

For a SW issue you can debug using the flow discussed below:

https://forums.xilinx.com/t5/Design-and-Debug-Techniques-Blog/PetaLinux-Image-Debug-Series-Debugging-the-Linux-Kernel-in-Vitis/ba-p/1156809

patocarr
Teacher
Teacher
959 Views
Registered: ‎01-28-2008

Hi @raj 

  I suspect the UART's may need their interrupt lines connected properly to be controlled from Linux. They are not connected in the block design as shown.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

View solution in original post

raj
Adventurer
Adventurer
952 Views
Registered: ‎05-24-2020

@stephenm 

Yes, they work in baremetal. Thank you for the link on debugging

0 Kudos
raj
Adventurer
Adventurer
948 Views
Registered: ‎05-24-2020

@patocarr 

Thank you for the recommendation. I also came across an old post Solved: Axi-uartlite in petalinux 2014.4 - Community Forums (xilinx.com) 

The issue was resolved by concatenating the interrupts and OR ing them before connecting to the zynq processor like shown in Uartlite Driver - Xilinx Wiki - Confluence (atlassian.net) 

 

0 Kudos
vanmierlo
Mentor
Mentor
842 Views
Registered: ‎06-10-2008

It is best to connect all interrupts to the CPU, but if you are short on interrupt inputs you can now also insert an AXI Interrupt Controller. If you do decide to use an OR make sure you also set the shared interupt flag in the device tree.

raj
Adventurer
Adventurer
746 Views
Registered: ‎05-24-2020

@vanmierlo 

Thank you for the suggestion. I have modified the system-user.dtsi like below - 

 

&stepper5phase {
interrupts = <0 93 4>;
};
&USBserial {
interrupts = <0 93 4>;
};
&fpgaout3 {
interrupts = <0 93 4>;
};
&fpgaout4 {
interrupts = <0 93 4>;
};
&rf_eeprom {
interrupts = <0 93 4>;
};

Is this understanding of shared interrupt correct ?

I came across this https://forums.xilinx.com/t5/Embedded-Linux/Axi-intc-hangs-on-boot-testcase-on-zcu104/m-p/1179852 regading issues with use of AXI interrupt controller. Could you please suggest how to use AXI interrupt controller ? Thank you 

0 Kudos
vanmierlo
Mentor
Mentor
703 Views
Registered: ‎06-10-2008

interrupts = <0 93 4>;

The last value 4 means IRQ_TYPE_LEVEL_HIGH, but the uartlite produces a single pulse, so the value should be 1 for IRQ_TYPE_EDGE_RISING.

For the AXI IIC it is not clear to me from the product guide (PG090) if the interrupt is edge or level:

It generates a single iic2intc_irpt signal.

 

vanmierlo
Mentor
Mentor
663 Views
Registered: ‎06-10-2008

Looking in the uartlite kernel driver source it doesn't seem to matter much what the the interrupt type value is set to. The driver always registers a SHARED, RISING edge interrupt with the interrupt controller.

ret = request_irq(port->irq, ulite_isr, IRQF_SHARED | IRQF_TRIGGER_RISING, "uartlite", port);

 

raj
Adventurer
Adventurer
662 Views
Registered: ‎05-24-2020

@vanmierlo Thank you for the information. I appreciate your time and help

I'm experiencing some issues accessing uio . Is it possible for you to provide help with it? My post is here https://forums.xilinx.com/t5/Embedded-Linux/Custom-AXI-peripherals-not-present-in-dev-uio/m-p/1183899 

0 Kudos