When I enable GPMC_TIMEOUT_CONTROL and the timeout happens, I get an asynchronous external abort error. Is there a way I can catch this and print an error message instead?
Contents of GPMC_TIMEOUT_CONTROL:
memtool md -w 0x50000040+1
50000040: 00000a01
Other gpmc settings are in this thread:
https://e2e.ti.com/support/processors/f/791/t/884428
When we try to do a read and the WAIT signal is not asserted, we get this error:
[ 2387.519153] Unhandled fault: asynchronous external abort (0x1211) at 0x00000000
[ 2387.519156] pgd = ed0a8d00
[ 2387.519158] ------------[ cut here ]------------
[ 2387.519161] [00000000] *pgd=aea8a003, *pmd=00000000
[ 2387.519184] WARNING: CPU: 1 PID: 58 at /root/ws/devel/roxkernel/linux-4.9.189.rr1/debian/build/source_rt/drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x260/0x370
[ 2387.519192] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET GPMC (Read): Data Access in User mode during Functional access
[ 2387.519197] Modules linked in: lm_serial(O) phytest(O) 8021q garp stp mrp llc rcksapi_common(O) rcksapi(O) sch_tbf xhci_plat_hcd xhci_hcd dwc3 ti_prueth pru_rproc pruss_intc pruss_soc_bus dwc3_omap omap_pru_rs485 pruss remoteproc virtio virtio_ring iptable_nat ip_tables at24 nf_conntrack_ipv4 nvmem_core ltc4215 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack x_tables dummy lm75 uio_pdrv_genirq
[ 2387.519254] CPU: 1 PID: 58 Comm: irq/23-l3-app-i Tainted: G O 4.9.0-11-rt-am5726 #1 Debian 4.9.189-3.deb9u2RR13
[ 2387.519256] Hardware name: Generic DRA74X (Flattened Device Tree)
[ 2387.519259] Backtrace:
[ 2387.519272] [<c0030244>] (dump_backtrace) from [<c0030500>] (show_stack+0x18/0x1c)
[ 2387.519278] r7:00000009 r6:60000013 r5:00000000 r4:c0961d48
[ 2387.519291] [<c00304e8>] (show_stack) from [<c02ec11c>] (dump_stack+0x8c/0xa0)
[ 2387.519301] [<c02ec090>] (dump_stack) from [<c005bdf0>] (__warn+0xf0/0x108)
[ 2387.519305] r7:00000009 r6:c07c4948 r5:00000000 r4:eeb43e20
[ 2387.519312] [<c005bd00>] (__warn) from [<c005be48>] (warn_slowpath_fmt+0x40/0x48)
[ 2387.519317] r9:0000000b r8:eea83210 r7:c07c47b4 r6:00000002 r5:c07c4874 r4:c07c4918
[ 2387.519323] [<c005be0c>] (warn_slowpath_fmt) from [<c031ae2c>] (l3_interrupt_handler+0x260/0x370)
[ 2387.519325] r3:eea83540 r2:c07c4918
[ 2387.519327] r4:80080003
[ 2387.519336] [<c031abcc>] (l3_interrupt_handler) from [<c00af1ac>] (irq_forced_thread_fn+0x28/0xa4)
[ 2387.519341] r10:c00af184 r9:eea83dc0 r8:eea75700 r7:00000001 r6:00000000 r5:eea75700
[ 2387.519342] r4:eea83dc0
[ 2387.519350] [<c00af184>] (irq_forced_thread_fn) from [<c00af548>] (irq_thread+0x124/0x1d0)
[ 2387.519353] r7:00000001 r6:00000000 r5:eeb42000 r4:eea83de4
[ 2387.519360] [<c00af424>] (irq_thread) from [<c007ce88>] (kthread+0x100/0x118)
[ 2387.519365] r10:00000000 r9:00000000 r8:c00af424 r7:eea83dc0 r6:eeb42000 r5:eea83b40
[ 2387.519367] r4:00000000
[ 2387.519372] [<c007cd88>] (kthread) from [<c002c4a8>] (ret_from_fork+0x14/0x2c)
[ 2387.519377] r8:00000000 r7:00000000 r6:00000000 r5:c007cd88 r4:eea83b40
[ 2387.519379] ---[ end trace 0000000000000002 ]---