Other Parts Discussed in Thread: TDA2
Tool/software: Linux
Hello *!
I've got the following problem bringing up the DSP of the TDA2 in a command line custom build environment (OUTSIDE CCS):
Environment descrition
custom resource table (rproc)
... /* Linux - Carve out -> device tree: reg = <0x0 0xA100_0000 0x0 0x200_0000>; */ #define DSP_SHMEM 0xa1004000 #define DSP_SHMEM_SIZE 0x1000000 /* OC_MEMORY */ #define IPC_MEM_VIRT 0x40300000 #define IPC_MEM_PHYS 0x40300000 #define IPC_MEM_VIRT_SIZE 0x80000 ... struct my_resource_table { struct resource_table base; unsigned int offset[RSC_NUM_ENTRIES]; /* Should match 'num' in actual definition */ /* rpmsg vdev entry */ struct fw_rsc_vdev rpmsg_vdev; struct fw_rsc_vdev_vring rpmsg_vring0; struct fw_rsc_vdev_vring rpmsg_vring1; /* text carveout entry */ struct fw_rsc_carveout text_cout; /* devmem entry */ struct fw_rsc_devmem devmem0; }; //extern char ti_trace_SysMin_Module_State_0_outbuf__A; #pragma DATA_SECTION(ti_ipc_remoteproc_ResourceTable, ".resource_table") #pragma DATA_ALIGN (ti_ipc_remoteproc_ResourceTable, 4096) #pragma RETAIN (ti_ipc_remoteproc_ResourceTable) struct my_resource_table ti_ipc_remoteproc_ResourceTable = { 1, /* we're the first version that implements this */ RSC_NUM_ENTRIES, /* number of entries in the table */ 0, 0, /* reserved, must be zero */ /* offsets to entries */ { offsetof(struct my_resource_table, rpmsg_vdev), offsetof(struct my_resource_table, text_cout), offsetof(struct my_resource_table, devmem0), }, /* rpmsg vdev entry */ { TYPE_VDEV, VIRTIO_ID_RPMSG, 0, RPMSG_DSP_C0_FEATURES, 0, 0, 0, 2, { 0, 0 }, /* no config data */ }, /* the two vrings */ { DSP_MEM_RPMSG_VRING0, 4096, DSP_RPMSG_VQ0_SIZE, 1, 0 }, { DSP_MEM_RPMSG_VRING1, 4096, DSP_RPMSG_VQ1_SIZE, 2, 0 }, { TYPE_CARVEOUT, DSP_SHMEM, 0, DSP_SHMEM_SIZE, 0, 0, "DSP_SHMEM", }, { TYPE_DEVMEM, IPC_MEM_VIRT, IPC_MEM_PHYS, IPC_MEM_VIRT_SIZE, 0, 0, "IPC_MEM_VIRT", }, };
linker cmd file
MEMORY { IRAM_MEM: o = 0x00800000 l = 0x00008000 /* 32kB internal SRAM */ OCMC_RAM1: o = 0x40300000 l = 0x00080000 /* 512kB L3 OCMC SRAM1 */ SHMEM: o = 0xa1004000 l = 0xF00000 } SECTIONS { .text > SHMEM .stack > SHMEM .bss > SHMEM .cio > SHMEM .const > SHMEM .data > SHMEM .switch > SHMEM .sysmem > SHMEM .far > SHMEM .args > SHMEM .ppinfo > SHMEM .ppdata > SHMEM /* COFF sections */ .pinit > SHMEM .cinit > SHMEM /* EABI sections */ .binit > SHMEM .init_array > SHMEM .neardata > SHMEM .fardata > SHMEM .rodata > SHMEM .c6xabi.exidx > SHMEM .c6xabi.extab > SHMEM .resource_table > SHMEM { main.obj(.resource_table) } }
call of cl6x in Makefile
... TOP=${PWD} TOOLCHAIN=$(TOP)/linux_toolchain/C6000_7.4.2 TICL=$(TOOLCHAIN)/bin/cl6x INCLUDE=$(TOOLCHAIN)/lib TARGET_NAME=dra7-dsp1-fw.xe66 CL6X_OPTIONS= --abi=eabi --run_linker --ram_model --unused_section_elimination=on --map_file=link.map --stack_size=0x1000 linker.cmd LDFLAGS= -w -q -u _c_int00 -c -m linker.map BUILD_FLAGS=-mv6600 -g --diag_warning=225 --diag_wrap=off --display_error_number --preproc_with_compile --preproc_dependency="depend.d" --c99 LINK= -l $(INCLUDE)/libc.a all: build_objects link_together build_objects: $(TICL) --abi=eabi -c main.c $(BUILD_FLAGS) link_together: $(TICL) $(CL6X_OPTIONS) -o $(TARGET_NAME) -i $(INCLUDE) $(LINK) -u _c_int00 ...
Result in Error:
[ 835.520532] remoteproc remoteproc2: rsc: type 3 [ 835.520544] remoteproc remoteproc2: rsc: type 0 [ 835.520553] remoteproc remoteproc2: rsc: type 1 [ 835.520561] remoteproc remoteproc2: rsc: type 3 [ 835.520571] remoteproc remoteproc2: vdev rsc: id 7, dfeatures 1, cfg len 0, 2 vrings [ 835.520582] remoteproc remoteproc2: vdev rsc: vring0: da a0000000, qsz 256, align 4096 [ 835.520591] remoteproc remoteproc2: vdev rsc: vring1: da a0004000, qsz 256, align 4096 [ 835.521595] remoteproc remoteproc2: vring0: va e1000000 dma 0xa1000000 size 3000 idr 0 [ 835.521646] remoteproc remoteproc2: vring1: va e1004000 dma 0xa1004000 size 3000 idr 1 [ 835.521667] remoteproc remoteproc2: powering up 40800000.dsp [ 835.521679] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 28540 [ 835.528810] omap_hwmod: mmu0_dsp1: _wait_target_disable failed [ 835.528854] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0 [ 835.528946] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0 [ 835.528966] remoteproc remoteproc2: rsc: type 3 [ 835.528975] remoteproc remoteproc2: rsc: type 0 [ 835.528984] remoteproc remoteproc2: carveout rsc: da a1004000, pa 0, len 1000000, flags 0 [ 835.535316] remoteproc remoteproc2: carveout va e1100000, dma 0xa1100000, len 0x1000000 [ 835.662825] remoteproc remoteproc2: carveout mapped 0xa1004000 to 0xa1100000 [ 835.662836] remoteproc remoteproc2: rsc: type 1 [ 835.663096] remoteproc remoteproc2: mapped devmem pa 0x40300000, da 0x40300000, len 0x80000 [ 835.663115] remoteproc remoteproc2: rsc: type 3 [ 835.663123] remoteproc remoteproc2: rsc: type 0 [ 835.663131] remoteproc remoteproc2: rsc: type 1 [ 835.663640] omap-iommu 40d01000.mmu: iommu fault: da 0xb3175f30 flags 0x0 [ 835.663651] remoteproc remoteproc2: crash detected in 40800000.dsp: type mmufault [ 835.663663] omap-iommu 40d01000.mmu: 40d01000.mmu: errs:0x00000002 da:0xb3175f30 pgd:0xee5f2cc 4 *pgd:px00000000 [ 835.663699] remoteproc remoteproc2: remote processor 40800000.dsp is now up [ 835.664010] virtio_rpmsg_bus virtio0: rpmsg host is online [ 835.664950] remoteproc remoteproc2: registered virtio0 (type 7) [ 835.664962] remoteproc remoteproc2: rsc: type 0 [ 835.664971] remoteproc remoteproc2: rsc: type 1 [ 835.664995] remoteproc remoteproc2: enter rproc_crash_handler_work [ 835.665004] remoteproc remoteproc2: handling crash #1 in 40800000.dsp [ 835.665012] remoteproc remoteproc2: recovering 40800000.dsp [ 835.806178] omap_hwmod: mmu1_dsp1: _wait_target_disable failed [ 835.813328] omap_hwmod: mmu0_dsp1: _wait_target_disable failed [ 835.813366] remoteproc remoteproc2: stopped remote processor 40800000.dsp
Something is going wrong in my mappings, but what.... and: Why?
TNX - Marco.