We have a 4-core ZYNQMP and there is a single interrupt controller in
the PL.
We get a kernel crash when the device tree is processed for the PL.
It looks to me that xil_intc_start is called once per CPU, and it works
for the first CPU (CPU 0)
and fails for the second CPU (CPU 1).
xil_intc_start(0xffff00007fa82c80);
will call
xil_intc_initial_setup(0xffff00007fa82c80);
which will call
xintc_write(0xffff00007fa82c80, IER, 0);
We have
#define IER 0x08
and xintc_write will do:
iowrite32(data, irqc->base + reg (==0x8));
resulting in a kernel NULL pointer reference
* What do we need to do to get irqc->base to a non-NULL value?
==========================
The generated device-tree has an interrupt controller axi_intc_0
We have some questions:
We have a single interrupt controller.
* Do we need 4 interrupt controllers? I.E: one per CPU?
* Can the device-tree be tweaked to be content with a single interrupt
controller?
* The driver has a property "cpu-id" which is not in the generated
device tree.
Should that be used?
* Is there an example device tree for a 4-CPU connected to a PL
[ 2.407050] of-fpga-region fpga-full: FPGA Region probed
[ 2.412480] irq-xilinx: /amba_pl@0/interrupt-controller@80090000:
num_irq=1, sw_irq=0, edge=0x0
[ 2.421186] Setup on no cpu_id: 0
[ 2.434533] xil_intc_start: irqc = [0]
[ 2.448276] xil_intc_start: irqc = [ffff00007fa70c80]
[ 2.463318] xil_intc_start: irqc = [ffff00007fa70c80]
[ 2.468360] xil_intc_initial_setup: Xilinx IRQC = 0xffff00007fa70c80
[ 2.484735] xil_intc_start: irqc = [1]
[ 2.498482] xil_intc_start: irqc = [ffff00007fa82c80]
[ 2.513524] xil_intc_start: irqc = [ffff00007fa82c80]
[ 2.518565] xil_intc_initial_setup: Xilinx IRQC = 0xffff00007fa82c80
[ 2.534923] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000008
[ 2.543697] Mem abort info:
[ 2.546479] ESR = 0x96000044
[ 2.549526] EC = 0x25: DABT (current EL), IL = 32 bits
[ 2.554830] SET = 0, FnV = 0
[ 2.557876] EA = 0, S1PTW = 0
[ 2.561010] FSC = 0x04: level 0 translation fault
[ 2.565880] Data abort info:
[ 2.568752] ISV = 0, ISS = 0x00000044
[ 2.572581] CM = 0, WnR = 1
[ 2.575541] [0000000000000008] user address but active_mm is swapper
[ 2.581889] Internal error: Oops: 96000044 [#1] SMP
[ 2.586757] Modules linked in:
[ 2.589805] CPU: 1 PID: 13 Comm: cpuhp/1 Not tainted
5.15.19-xilinx-v2022.1 #1
[ 2.597018] Hardware name: ZynqMP Signe RevA (DT)
[ 2.601713] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS
BTYPE=--)
[ 2.608665] pc : xintc_write+0x24/0xbc
[ 2.612423] lr : xil_intc_initial_setup+0x7c/0x168
[ 2.617214] sp : ffff800009463d40
[ 2.620520] x29: ffff800009463d40 x28: 0000000000000000 x27:
0000000000000000
[ 2.627657] x26: 0000000000000000 x25: ffff0000019316c0 x24:
0000000000418958
[ 2.634792] x23: 0000000000000000 x22: 0000000000418958 x21:
0000000000000000
[ 2.641928] x20: ffff800008ce10a8 x19: ffff00007fa82c80 x18:
ffffffffffffffff
[ 2.649062] x17: 000000000000001d x16: 0000000000000004 x15:
0766077807300720
[ 2.656197] x14: 073d072007430751 x13: ffff800009205b28 x12:
0000000000000249
[ 2.663332] x11: 00000000000000c3 x10: ffff800009205b28 x9 :
ffff800009205b28
[ 2.670467] x8 : 00000000fffff7ff x7 : ffff800009231b28 x6 :
ffff800009231b28
[ 2.677602] x5 : 0000000000005ff4 x4 : 0000000000000000 x3 :
0000000000000000
[ 2.684737] x2 : 0000000000000000 x1 : 0000000000000008 x0 :
0000000000000008
[ 2.691874] Call trace:
[ 2.694312] xintc_write+0x24/0xbc
[ 2.697704] xil_intc_start+0xc4/0x10c
[ 2.701445] cpuhp_invoke_callback+0x104/0x20c
[ 2.705890] cpuhp_thread_fun+0x8c/0x194
[ 2.709804] smpboot_thread_fn+0x144/0x190
[ 2.713893] kthread+0x120/0x130
[ 2.717121] ret_from_fork+0x10/0x20
[ 2.720694] Code: 5400038c f9400000 8b010000 d50332bf (b9000002)
[ 2.726779] ---[ end trace 5701a8b913cda592 ]---
--
Best Regards
Ulf Samuelsson
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5092):
https://lists.yoctoproject.org/g/meta-xilinx/message/5092
Mute This Topic: https://lists.yoctoproject.org/mt/95181231/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-