Skip to content

openamp_rsc_table example with MBOX: bus fault on TI SK-AM62 M4 #72250

@aleeraser

Description

@aleeraser

I'm using a TI SK-AM62 board running Linux on the main A53 and Zephyr on the M4 core. The Linux image is the stock image provided by TI.

I've been trying to adapt the openamp_rsc_table example for using the newer MBOX subsystem.
The MBOX driver is provided by #71241.

Here's the implementation I'm working on: https://github.com/aleeraser/zephyr/tree/feat/ti-mailbox, in particular this commit contains the changes for the example.

According to TI's documentation, the resource table is correctly loaded at the beginning of the M4 external memory section at 0x9cc00000, while the IPC virtio and vring buffers must be located at 0x9cb00000.

I have therefore created the following device tree overlay:

 / {
	chosen {
		zephyr,ipc_shm = &ipc_shm;
	};

	ipc_shm: memory@9cb00000 {
		compatible = "mmio-sram";
		reg = <0x9cb00000 DT_SIZE_M(1)>;
	};

	mbox-consumer {
		compatible = "vnd,mbox-consumer";
		mboxes = <&mbox0 0>, <&mbox0 1>;
		mbox-names = "tx", "rx";
	};
};

When running the example, I have the following Bus Fault / Precise data bus error:

[00:00:00.000,000] <err> os: ***** BUS FAULT *****
[00:00:00.000,000] <err> os:   Precise data bus error
[00:00:00.000,000] <err> os:   BFAR Address: 0x9cc0002d
[00:00:00.000,000] <err> os: r0/a1:  0x00000048  r1/a2:  0x000000ff  r2/a3:  0x9cc00014
[00:00:00.000,000] <err> os: r3/a4:  0x000077b8 r12/ip:  0x00000000 r14/lr:  0x000006e3
[00:00:00.000,000] <err> os:  xpsr:  0x01000000
[00:00:00.000,000] <err> os: Faulting instruction address (r15/pc): 0x00002bde
[00:00:00.000,000] <err> os: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
[00:00:00.000,000] <err> os: Current thread: 0x75c0 (main)
[00:00:00.000,000] <err> os: Halting system

The BFAR address (0x9cc0002d) should be within the resource table, and in fact addr2line 0x00002bde blames this as the faulting instruction.

Metadata

Metadata

Labels

Stalearea: AMPAsymmetric Multi-processing (AMP)bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions