Jump to content
  • 0

Fatal exception in interrupt zcu102 GPIO PL Interrupt Petalinux


eduardoparra

Question

Hi,

  I am using Xilinx Zynq UltraScale+ MPSoC ZCU102 Evaluation Kit and I am newbie for using this board. I'm following this link to generate an interrupt using GPIO switches and turn off a led : http://www.wiki.xilinx.com/Linux+GPIO+Driver. The drivers works correctly and the led is heartbeating, when i check /proc/interrupts i get:

...

223:          0          0          0          0     GICv2 154 Level     fd4c0000.dma
224:          0          0          0          0     xgpio   0 Edge      sw14
233:          0          0          0          0     GICv2  97 Level     xhci-hcd:usb1

...

but when i switch on cpu stops and i get this error:

root@Xilinx-ZCU102-2016_1:~# [   18.111391] Unable to handle kernel paging request at virtual address b9410a80aa13043f
[   18.119243] pgd = ffffffc87ad07000
[   18.122615] [b9410a80aa13043f] *pgd=0000000000000000, *pud=0000000000000000
[   18.129559] Internal error: Oops: 96000004 [#1] SMP
[   18.134420] Modules linked in:
[   18.137460] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0 #78
[   18.143361] Hardware name: ZynqMP ZCU102 RevB (DT)
[   18.148136] task: ffffffc00224efc0 ti: ffffffc002240000 task.ti: ffffffc002240000
[   18.155613] PC is at xgpio_irqhandler+0x2c/0x144
[   18.160202] LR is at xgpio_irqhandler+0x1c/0x144
[   18.164801] pc : [<ffffffc0003c8ee0>] lr : [<ffffffc0003c8ed0>] pstate: 600001c5
[   18.172185] sp : ffffffc002243d00
[   18.175476] x29: ffffffc002243d00 x28: 0000000000000000 
[   18.180769] x27: 0000000000000000 x26: ffffffc0022c2000 
[   18.186063] x25: ffffffc00078acf0 x24: ffffff8000015000 
[   18.191358] x23: ffffffc0003c8eb4 x22: b9410a80aa1303f7 
[   18.196653] x21: 0000000000000000 x20: 0000000000000000 
[   18.201948] x19: ffffffc002227000 x18: 0000000000000001 
[   18.207242] x17: 0000000000000006 x16: ffffffbe1dae9f68 
[   18.212537] x15: ffffffc87b08f000 x14: 0000000000000007 
[   18.217832] x13: ffffffc87b801128 x12: 0000004000000000 
[   18.223127] x11: ffffffc002246000 x10: 00000000000006e0 
[   18.228422] x9 : ffffffc002243e70 x8 : ffffffc87b400058 
[   18.233716] x7 : ffffffc87b400d88 x6 : 0000000000000002 
[   18.239011] x5 : 00000000fffffffa x4 : ffffffc87b400d89 
[   18.244306] x3 : 0000000000000000 x2 : 0000000000000000 
[   18.249601] x1 : 0000000000000020 x0 : 0000000000000000 
[   18.254895] 
[   18.256373] Process swapper/0 (pid: 0, stack limit = 0xffffffc002240020)
[   18.263060] Stack: (0xffffffc002243d00 to 0xffffffc002244000)
[   18.268790] 3d00: ffffffc002243d50 ffffffc0000d1088 ffffffc002227000 0000000000000000
[   18.276609] 3d20: 0000000000000000 ffffffc002249040 ffffff8000014010 ffffffc0000d13cc
[   18.284421] 3d40: ffffffc002243d50 ffffffc0000d107c ffffffc002243d60 ffffffc0000d13a0
[   18.292232] 3d60: ffffffc002243da0 ffffffc000080cec ffffff800001400c ffffffc002279000
[   18.300045] 3d80: ffffffc002243de0 ffffffc0000e5ed0 ffffffc87b808000 00000079000ec410
[   18.307857] 3da0: ffffffc002243f00 ffffffc000083da8 ffffffc002240000 ffffffc002246000
[   18.315668] 3dc0: ffffffc002243f00 ffffffc000084e70 0000000060000145 ffffffc002228f40
[   18.323480] 3de0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   18.331292] 3e00: 0000000000000000 000000001999999a 002aad4b00000000 00000000fffeecaa
[   18.339104] 3e20: 00000000fffeecab ffffffc002243e70 00000000000006e0 ffffffc002246000
[   18.346916] 3e40: 0000004000000000 ffffffc87b801128 0000000000000007 ffffffc87b08f000
[   18.354729] 3e60: ffffffbe1dae9f68 0000000000000006 0000000000000001 ffffffc002240000
[   18.362541] 3e80: ffffffc002246000 ffffffc002246ad0 ffffffc0022259c0 ffffffc002243f20
[   18.370352] 3ea0: ffffffc002228f40 ffffffc00078acf0 ffffffc0022c2000 0000000000000000
[   18.378164] 3ec0: 0000000000000000 ffffffc002243f00 ffffffc000084e6c ffffffc002243f00
[   18.385977] 3ee0: ffffffc000084e70 0000000060000145 ffffffc00078acf0 ffffffc00077c278
[   18.393789] 3f00: ffffffc002243f10 ffffffc0000ca2e0 ffffffc002243f20 ffffffc0000ca418
[   18.401600] 3f20: ffffffc002243f90 ffffffc000779080 ffffffc0022c5000 ffffffc0022c5000
[   18.409413] 3f40: ffffffc0022c5000 ffffffc002246000 ffffffc87ffa2580 ffffffc000a6fca8
[   18.417224] 3f60: 000000000231c000 000000000231f000 ffffffc0000801d8 0000000000000000
[   18.425037] 3f80: ffffffc002243f90 ffffffc000779078 ffffffc002243fa0 ffffffc000a3d94c
[   18.432848] 3fa0: 0000000000000000 0000000000780000 0000000000000000 0000000000000e12
[   18.440660] 3fc0: 0000000004080000 0000000000000000 0000000000000000 0000000000000000
[   18.448472] 3fe0: 0000000000000000 ffffffc000a6fca8 0000000000000000 0000000000000000
[   18.456281] Call trace:
[   18.458707] [<ffffffc0003c8ee0>] xgpio_irqhandler+0x2c/0x144
[   18.464353] [<ffffffc0000d1088>] generic_handle_irq+0x24/0x38
[   18.470079] [<ffffffc0000d13a0>] __handle_domain_irq+0x60/0xac
[   18.475895] [<ffffffc000080cec>] gic_handle_irq+0x60/0xb4
[   18.481274] Exception stack(0xffffffc002243db0 to 0xffffffc002243ed0)
[   18.487699] 3da0:                                   ffffffc002240000 ffffffc002246000
[   18.495518] 3dc0: ffffffc002243f00 ffffffc000084e70 0000000060000145 ffffffc002228f40
[   18.503329] 3de0: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   18.511142] 3e00: 0000000000000000 000000001999999a 002aad4b00000000 00000000fffeecaa
[   18.518954] 3e20: 00000000fffeecab ffffffc002243e70 00000000000006e0 ffffffc002246000
[   18.526766] 3e40: 0000004000000000 ffffffc87b801128 0000000000000007 ffffffc87b08f000
[   18.534578] 3e60: ffffffbe1dae9f68 0000000000000006 0000000000000001 ffffffc002240000
[   18.542390] 3e80: ffffffc002246000 ffffffc002246ad0 ffffffc0022259c0 ffffffc002243f20
[   18.550202] 3ea0: ffffffc002228f40 ffffffc00078acf0 ffffffc0022c2000 0000000000000000
[   18.558013] 3ec0: 0000000000000000 ffffffc002243f00
[   18.562868] [<ffffffc000083da8>] el1_irq+0x68/0xc0
[   18.567643] [<ffffffc0000ca2e0>] default_idle_call+0x1c/0x30
[   18.573284] [<ffffffc0000ca418>] cpu_startup_entry+0x124/0x1dc
[   18.579101] [<ffffffc000779080>] rest_init+0x74/0x7c
[   18.584049] [<ffffffc000a3d94c>] start_kernel+0x394/0x3a8
[   18.589427] [<0000000000780000>] 0x780000
[   18.593421] Code: b4000820 f9400800 f9400414 f9401ef6 (f94026c0) 
[   18.599503] ---[ end trace fc72e20977be1640 ]---
[   18.604096] Kernel panic - not syncing: Fatal exception in interrupt
[   18.610435] CPU3: stopping
[   18.613125] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D         4.4.0 #78
[   18.620241] Hardware name: ZynqMP ZCU102 RevB (DT)
[   18.625013] Call trace:
[   18.627447] [<ffffffc000087da8>] dump_backtrace+0x0/0x114
[   18.632829] [<ffffffc000087ed0>] show_stack+0x14/0x1c
[   18.637865] [<ffffffc000393cf8>] dump_stack+0x84/0xa0
[   18.642897] [<ffffffc00008d4cc>] handle_IPI+0x18c/0x1a0
[   18.648104] [<ffffffc000080d28>] gic_handle_irq+0x9c/0xb4
[   18.653486] Exception stack(0xffffffc87b8efdf0 to 0xffffffc87b8eff10)
[   18.659910] fde0:                                   ffffffc87b8ec000 ffffffc002246000
[   18.667730] fe00: ffffffc87b8eff40 ffffffc000084e70 0000000060000145 ffffffc002228f40
[   18.675541] fe20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   18.683353] fe40: 0000000000000000 000000001999999a 000a037a00000000 00000000fffeed1b
[   18.691165] fe60: 00000000fffeed1c ffffffc87b8efeb0 00000000000006e0 0000000000000005
[   18.698977] fe80: ffffffc00078b5d4 ffffffc073ad7b80 ffffffc87b325380 ffffffc87ba30000
[   18.706789] fea0: ffffffbe1db0baa0 0000000000000006 0000000000000001 ffffffc87b8ec000
[   18.714601] fec0: ffffffc002246000 ffffffc002246ad0 ffffffc0022259c0 ffffffc87b8eff60
[   18.722413] fee0: ffffffc002228f40 ffffffc00078acf0 ffffffc0022c2000 0000000000000000
[   18.730224] ff00: 0000000000000000 ffffffc87b8eff40
[   18.735078] [<ffffffc000083da8>] el1_irq+0x68/0xc0
[   18.739853] [<ffffffc0000ca2e0>] default_idle_call+0x1c/0x30
[   18.745496] [<ffffffc0000ca418>] cpu_startup_entry+0x124/0x1dc
[   18.751310] [<ffffffc00008cfcc>] secondary_start_kernel+0x11c/0x140
[   18.757559] [<000000000008103c>] 0x8103c
[   18.761464] CPU2: stopping
[   18.764157] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G      D         4.4.0 #78
[   18.771273] Hardware name: ZynqMP ZCU102 RevB (DT)
[   18.776045] Call trace:
[   18.778479] [<ffffffc000087da8>] dump_backtrace+0x0/0x114
[   18.783861] [<ffffffc000087ed0>] show_stack+0x14/0x1c
[   18.788895] [<ffffffc000393cf8>] dump_stack+0x84/0xa0
[   18.793929] [<ffffffc00008d4cc>] handle_IPI+0x18c/0x1a0
[   18.799136] [<ffffffc000080d28>] gic_handle_irq+0x9c/0xb4
[   18.804518] Exception stack(0xffffffc87b8ebdf0 to 0xffffffc87b8ebf10)
[   18.810942] bde0:                                   ffffffc87b8e8000 ffffffc002246000
[   18.818762] be00: ffffffc87b8ebf40 ffffffc000084e70 0000000060000145 ffffffc002228f40
[   18.826573] be20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   18.834385] be40: 0000000000000000 000000001999999a 000f424000000000 00000000fffeed31
[   18.842197] be60: 00000000fffeed32 ffffffc87b8ebeb0 00000000000006e0 ffffffc002246000
[   18.850009] be80: 0000004000000000 ffffffc87b801128 000000000000001c ffffffc87ac9c000
[   18.857821] bea0: ffffffbe1dadc240 0000000000000006 0000000000000001 ffffffc87b8e8000
[   18.865633] bec0: ffffffc002246000 ffffffc002246ad0 ffffffc0022259c0 ffffffc87b8ebf60
[   18.873445] bee0: ffffffc002228f40 ffffffc00078acf0 ffffffc0022c2000 0000000000000000
[   18.881256] bf00: 0000000000000000 ffffffc87b8ebf40
[   18.886110] [<ffffffc000083da8>] el1_irq+0x68/0xc0
[   18.890885] [<ffffffc0000ca2e0>] default_idle_call+0x1c/0x30
[   18.896527] [<ffffffc0000ca418>] cpu_startup_entry+0x124/0x1dc
[   18.902342] [<ffffffc00008cfcc>] secondary_start_kernel+0x11c/0x140
[   18.908591] [<000000000008103c>] 0x8103c
[   18.912496] CPU1: stopping
[   18.915188] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.4.0 #78
[   18.922305] Hardware name: ZynqMP ZCU102 RevB (DT)
[   18.927077] Call trace:
[   18.929511] [<ffffffc000087da8>] dump_backtrace+0x0/0x114
[   18.934893] [<ffffffc000087ed0>] show_stack+0x14/0x1c
[   18.939927] [<ffffffc000393cf8>] dump_stack+0x84/0xa0
[   18.944961] [<ffffffc00008d4cc>] handle_IPI+0x18c/0x1a0
[   18.950168] [<ffffffc000080d28>] gic_handle_irq+0x9c/0xb4
[   18.955550] Exception stack(0xffffffc87b8e3df0 to 0xffffffc87b8e3f10)
[   18.961974] 3de0:                                   ffffffc87b8e0000 ffffffc002246000
[   18.969794] 3e00: ffffffc87b8e3f40 ffffffc000084e70 0000000060000145 ffffffc002228f40
[   18.977605] 3e20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[   18.985417] 3e40: 0000000000000000 000000001999999a 000cdfe600000000 00000000fffeed27
[   18.993229] 3e60: 00000000fffeed28 ffffffc87b8e3eb0 00000000000006e0 ffffffc002246000
[   19.001041] 3e80: 0000004000000000 ffffffc87b801128 000000000000000e ffffffc87b3de000
[   19.008853] 3ea0: ffffffbe1daf58b0 0000000000000006 0000000000000001 ffffffc87b8e0000
[   19.016665] 3ec0: ffffffc002246000 ffffffc002246ad0 ffffffc0022259c0 ffffffc87b8e3f60
[   19.024477] 3ee0: ffffffc002228f40 ffffffc00078acf0 ffffffc0022c2000 0000000000000000
[   19.032288] 3f00: 0000000000000000 ffffffc87b8e3f40
[   19.037142] [<ffffffc000083da8>] el1_irq+0x68/0xc0
[   19.041917] [<ffffffc0000ca2e0>] default_idle_call+0x1c/0x30
[   19.047559] [<ffffffc0000ca418>] cpu_startup_entry+0x124/0x1dc
[   19.053374] [<ffffffc00008cfcc>] secondary_start_kernel+0x11c/0x140
[   19.059623] [<000000000008103c>] 0x8103c
[   19.063529] ---[ end Kernel panic - not syncing: Fatal exception in interrupt

 

This is my pl.dtsi:

/ {
	amba_pl: amba_pl {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;		
		axi_gpio_0: gpio@80000000 {
			#gpio-cells = <2>;
			#interrupt-cells = <2>;
			compatible = "xlnx,xps-gpio-1.00.a";
			gpio-controller ;
			interrupt-controller ;
			interrupt-parent = <&gic>;
			interrupts = <0 89 1>;
			reg = <0x0 0x80000000 0x0 0x10000>;
			xlnx,all-inputs = <0x1>;
			xlnx,all-inputs-2 = <0x0>;
			xlnx,all-outputs = <0x0>;
			xlnx,all-outputs-2 = <0x0>;
			xlnx,dout-default = <0x00000000>;
			xlnx,dout-default-2 = <0x00000000>;
			xlnx,gpio-width = <0x8>;
			xlnx,gpio2-width = <0x20>;
			xlnx,interrupt-present = <0x1>;
			xlnx,is-dual = <0x0>;
			xlnx,tri-default = <0xFFFFFFFF>;
			xlnx,tri-default-2 = <0xFFFFFFFF>;
		};
		gpio-keys {
		    compatible = "gpio-keys";
		    #address-cells = <1>;
		    #size-cells = <0>;
		    autorepeat;
		    sw14 {
			label = "sw14";
			gpios = <&axi_gpio_0 0 0>;
			linux,code = <108>; /* down */
			gpio-key,wakeup;
			autorepeat;
		    };
		};
		axi_gpio_1: gpio@80010000 {
			#gpio-cells = <2>;
			compatible = "xlnx,xps-gpio-1.00.a";
			gpio-controller ;
			reg = <0x0 0x80010000 0x0 0x10000>;
			xlnx,all-inputs = <0x0>;
			xlnx,all-inputs-2 = <0x0>;
			xlnx,all-outputs = <0x1>;
			xlnx,all-outputs-2 = <0x0>;
			xlnx,dout-default = <0x00000000>;
			xlnx,dout-default-2 = <0x00000000>;
			xlnx,gpio-width = <0x8>;
			xlnx,gpio2-width = <0x20>;
			xlnx,interrupt-present = <0x0>;
			xlnx,is-dual = <0x0>;
			xlnx,tri-default = <0xFFFFFFFF>;
			xlnx,tri-default-2 = <0xFFFFFFFF>;
		};
				
		gpio-leds {
		    compatible = "gpio-leds";
		    led-ds23 {
			label = "led-ds23";
			gpios = <&axi_gpio_1 0 0>;
			default-state = "on";
			linux,default-trigger = "heartbeat";
		    };
		};
	};
};
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Sorry, I've got little experience with cpu stops. Your guess is as good as mine as to what is triggering the kernel oops. It does seem like it must be linked to the axi_gpio_0 (attached to the switches) because it is being triggered in the interrupt handler, and the axi_gpio_1 (attached to LED) does not have interrupts enabled. When does the oops occur? After flipping SW14?

If you end up not being able to figure out the problem, or it seems like it is a bug in the axi_gpio driver beyond your ability to fix, then I would recommend trying to use the UIO driver instead to trigger an interrupt. I think Xilinx has some documentation on doing this. You might have more luck with that driver

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...