This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4372: L3 bus error

Part Number: AM4372
Other Parts Discussed in Thread: TPS65218

Hello,

Randomly it happens that during secure call execution, during authentication, l3 bus errors is triggered.

[  363.535361] ------------[ cut here ]------------

[  363.540290] WARNING: CPU: 0 PID: 596 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x24c/0x394()
[  363.550322] 44000000.ocp:L3 Standard Error: MASTER M1 (128-bit) TARGET EMIF (Write Non-Posted): At Address: 0x5BA4ABF0 : Data Access in User mode during Functional access
[  363.566415] Modules linked in: nfsv3 nfs_acl nfs lockd sunrpc uinput ipv6 bcmdhd cfg80211 asix libphy usbnet mii usb_f_acm u_serial usb_f_rndis u_ether libcomposite configfs xhci_plat_hcd xhci_hcd usbcore omapdrm printer_core(O) vfi_sysmode vfi_powerbutton joydev evdev panel_gpm syscopyarea sysfillrect mousedev vfraptor_matrix_keypad sysimgblt dwc3 fb_sys_fops atmf_rotate udc_core drm_kms_helper fb phy_omap_usb2 drm snd_soc_davinci_mcasp snd_soc_tlv320aic31xx snd_soc_simple_card snd_soc_edma snd_soc_core rtc_vf2111_sec snd_compress snd_pcm_dmaengine vf2111_swcharger rtc_pcf85063 vfi_panel_probe vbus_flt_mon snd_pcm platinfomod(O) rtc_vfsetget omapdss printer_io(O) scr(O) snd_timer bq27xxx_battery snd pn512(O) atmel_mxt_ts omap_hsmmc pwm_beeper ti_magadc matrix_keymap ntc_thermistor pinctrl_wkup mmc_core soundcore iio_ntc_thermistor bq2416x_charger dwc3_omap regmap_spi ti_am335x_adc kfifo_buf pwm_bl gpio_vf6111(O) ti_am335x_tscadc extcon_usb_vf2111 regmap_mmio extcon_class vf6111(O) phy_omap_control backlight gpio_tps65218 omap_ocp2scp
[  363.663921] CPU: 0 PID: 596 Comm: secins Tainted: G           O 3.14.43 #1
[  363.671193] Backtrace: 
[  363.673813] [<c010a6a0>] (dump_backtrace+0x0/0x10c) from [<c010a83c>] (show_stack+0x18/0x1c)
[  363.682739]  r6:00000093 r5:00000009 r4:de13bbd8 r3:a900f5ca
[  363.688771] [<c010a824>] (show_stack+0x0/0x1c) from [<c04b02c0>] (dump_stack+0x20/0x28)
[  363.697253] [<c04b02a0>] (dump_stack+0x0/0x28) from [<c0133180>] (warn_slowpath_common+0x6c/0x8c)
[  363.706650] [<c0133114>] (warn_slowpath_common+0x0/0x8c) from [<c0133244>] (warn_slowpath_fmt+0x38/0x40)
[  363.716677]  r8:c05b2618 r7:c05b2220 r6:c04dba28 r5:80080001 r4:de8ff690
[  363.723799] [<c0133210>] (warn_slowpath_fmt+0x4/0x40) from [<c0327814>] (l3_interrupt_handler+0x24c/0x394)
[  363.734010]  r3:de8ff900 r2:c05b22ec
[  363.737817] [<c03275c8>] (l3_interrupt_handler+0x0/0x394) from [<c0169ba0>] (handle_irq_event_percpu+0x54/0x1c4)
[  363.748581]  r10:de807e00 r9:c073cbdb r8:0000003a r7:00000000 r6:00000000 r5:de8ff300
[  363.756893]  r4:de8ff300
[  363.759587] [<c0169b4c>] (handle_irq_event_percpu+0x0/0x1c4) from [<c0169d68>] (handle_irq_event+0x58/0x8c)
[  363.769891]  r10:00000000 r9:00000000 r8:00000000 r7:de13bd9c r6:00000000 r5:de8ff300
[  363.778205]  r4:de807e00
[  363.780898] [<c0169d10>] (handle_irq_event+0x0/0x8c) from [<c016ca0c>] (handle_fasteoi_irq+0x7c/0x160)
[  363.790742]  r5:0000003a r4:de807e00
[  363.794541] [<c016c990>] (handle_fasteoi_irq+0x0/0x160) from [<c01693f4>] (generic_handle_irq+0x28/0x38)
[  363.804567]  r4:0000003a r3:c016c990
[  363.808370] [<c01693cc>] (generic_handle_irq+0x0/0x38) from [<c0107880>] (handle_IRQ+0x38/0x8c)
[  363.817570]  r4:c072a8c0 r3:00000218
[  363.821369] [<c0107848>] (handle_IRQ+0x0/0x8c) from [<c0100808>] (gic_handle_irq+0x3c/0x54)
[  363.830200]  r6:de13bd68 r5:c070841c r4:fa24010c r3:00000100
[  363.836216] [<c01007cc>] (gic_handle_irq+0x0/0x54) from [<c010b5b8>] (__irq_svc+0x78/0xd4)
[  363.844960] Exception stack(0xde13bd68 to 0xde13bdb0)
[  363.850309] bd60:                   00000000 00000000 00000000 00000000 00000000 00000000
[  363.858966] bd80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 de13bdb8
[  363.867617] bda0: c0120ff0 c0120f14 800f0193 ffffffff
[  363.872958]  r6:ffffffff r5:800f0193 r4:c0120f14 r3:c0120ff0
[  363.878967] ---[ end trace 93a5fb48ee9ce1e5 ]---
It happens when omap_smc2 is executed, even if the ouput is not corrupted.
Code below is the same as reported here git.ti.com/.../omap-smc.S
/**
 * u32 omap_smc2(u32 id, u32 falg, u32 pargs)
 * Low level common routine for secure HAL and PPA APIs.
 * @id: Application ID of HAL APIs
 * @flag: Flag to indicate the criticality of operation
 * @pargs: Physical address of parameter list starting
 *	    with number of parametrs
 */
ENTRY(omap_smc2)
	stmfd   sp!, {r4-r12, lr}
	mov	r3, r2
	mov	r2, r1
	mov	r1, #0x0	@ Process ID
	mov	r6, #0xff
	mov	r12, #0x00	@ Secure Service ID
	mov	r7, #0
	mcr	p15, 0, r7, c7, c5, 6
	dsb
	isb
	dmb
	smc	#0

	b	end_omap_smc2	@ Execution reaches here if there was no
				@ interruption in the secure world.

	nop			@ Execution reaches here if secure world
				@ is interrupted.

	mov	r12, #0xfe
	mcr	p15, 0, r12, c7, c5, 6
	dsb
	isb
	dmb
	smc     #0
end_omap_smc2:
	ldmfd   sp!, {r4-r12, pc}
ENDPROC(omap_smc2)

Can the secure side where ROM code run, trigger an l3 bus error? Bus error is triggered just after executing first smc code above and before leaving the omap_smc2() function