UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
635 Views
Registered: ‎10-18-2017

MPSoC AXI DMA Proxy Kernel Module Fails to Load

Jump to solution

Hello I am trying to use the DMA Proxy Driver from this post on Zynq UltraScale+.

https://forums.xilinx.com/t5/Embedded-Linux/BRAM-DMA-transfer-limitation/m-p/555953#M11603

I am able to build the kernel module and application into the kernel, but when I try to load the kernel module I get these failure messages.

root@dma_basic_project_linux:~# insmod /lib/modules/4.14.0-xilinx-v2018.2/extra/dma-proxy.ko
[   62.549578] dma_proxy: loading out-of-tree module taints kernel.
[   62.555836] dma_proxy module initialized
[   62.561254] Allocating uncached memory at 0x00000000
[   62.566160] dma dma1chan0: DMA allocation error
insmod: can't insert '/lib/modules/4.14.0-xilinx-v2018.2/extra/dma-proxy.ko': Operation not permitted
root@dma_basic_project_linux:~# insmod /lib/modules/4.14.0-xilinx-v2018.2/extra/dma-proxy.ko
[   65.677875] dma_proxy module initialized
[   65.682213] sysfs: cannot create duplicate filename '/class/dma_proxy'
[   65.688681] ------------[ cut here ]------------
[   65.693263] WARNING: CPU: 1 PID: 2237 at /kernel-source//fs/sysfs/dir.c:31 sysfs_warn_dup+0x5c/0x78
[   65.702283] Modules linked in: dma_proxy(O+) uio_pdrv_genirq
[   65.707926] CPU: 1 PID: 2237 Comm: insmod Tainted: G           O    4.14.0-xilinx-v2018.2 #1
[   65.716344] Hardware name: xlnx,zynqmp (DT)
[   65.720508] task: ffffffc06c0a1200 task.stack: ffffff800bf00000
[   65.726412] PC is at sysfs_warn_dup+0x5c/0x78
[   65.730751] LR is at sysfs_warn_dup+0x5c/0x78
[   65.735090] pc : [<ffffff80082125ac>] lr : [<ffffff80082125ac>] pstate: 60000145
[   65.742470] sp : ffffff800bf03aa0
[   65.745766] x29: ffffff800bf03aa0 x28: ffffff800bf05000
[   65.751061] x27: ffffff8000a52100 x26: ffffff8000a51290
[   65.756356] x25: 0000000000000001 x24: ffffff8000a52438
[   65.761651] x23: ffffff8000a51028 x22: ffffffc06d90ca18
[   65.766946] x21: ffffffc06d836e80 x20: ffffffc06b5ce200
[   65.772241] x19: ffffffc06d3e1000 x18: 0000000000000010
[   65.777535] x17: 00000000004a59b0 x16: 0000000000000001
[   65.782830] x15: ffffffffffffffff x14: 0720072007200720
[   65.788125] x13: 0720072007200727 x12: 07790778076f0772
[   65.793420] x11: 0770075f0761076d x10: 0764072f07730773
[   65.798714] x9 : 0761076c0763072f x8 : 072707200765076d
[   65.804009] x7 : 0761076e0765076c x6 : 0000000000000168
[   65.809304] x5 : ffffff800849d410 x4 : 0000000000000000
[   65.814599] x3 : 0000000000000000 x2 : ffffffffffffffff
[   65.819894] x1 : ffffff8008dfce68 x0 : 000000000000003a
[   65.825189] Call trace:
[   65.827619] Exception stack(0xffffff800bf03960 to 0xffffff800bf03aa0)
[   65.834045] 3960: 000000000000003a ffffff8008dfce68 ffffffffffffffff 0000000000000000
[   65.841859] 3980: 0000000000000000 ffffff800849d410 0000000000000168 0761076e0765076c
[   65.849671] 39a0: 072707200765076d 0761076c0763072f 0764072f07730773 0770075f0761076d
[   65.857483] 39c0: 07790778076f0772 0720072007200727 0720072007200720 ffffffffffffffff
[   65.865294] 39e0: 0000000000000001 00000000004a59b0 0000000000000010 ffffffc06d3e1000
[   65.873107] 3a00: ffffffc06b5ce200 ffffffc06d836e80 ffffffc06d90ca18 ffffff8000a51028
[   65.880919] 3a20: ffffff8000a52438 0000000000000001 ffffff8000a51290 ffffff8000a52100
[   65.888731] 3a40: ffffff800bf05000 ffffff800bf03aa0 ffffff80082125ac ffffff800bf03aa0
[   65.896542] 3a60: ffffff80082125ac 0000000060000145 ffffffc06b5ce200 0000000000000073
[   65.904355] 3a80: 0000008000000000 0000000000000000 ffffff800bf03aa0 ffffff80082125ac
[   65.912166] [<ffffff80082125ac>] sysfs_warn_dup+0x5c/0x78
[   65.917546] [<ffffff80082126e4>] sysfs_create_dir_ns+0xac/0xb8
[   65.923364] [<ffffff8008a1871c>] kobject_add_internal+0x9c/0x2c8
[   65.929352] [<ffffff8008a1899c>] kset_register+0x54/0x98
[   65.934648] [<ffffff8008582ba4>] __class_register+0xbc/0x170
[   65.940288] [<ffffff8008582cac>] __class_create+0x54/0x80
[   65.945675] [<ffffff8000a50558>] create_channel+0x120/0x300 [dma_proxy]
[   65.952270] [<ffffff8000a55028>] dma_proxy_init+0x28/0x1000 [dma_proxy]
[   65.958865] [<ffffff8008083980>] do_one_initcall+0x38/0x128
[   65.964420] [<ffffff800810bcd0>] do_init_module+0x58/0x1b0
[   65.969887] [<ffffff800810ac44>] load_module+0x19fc/0x2150
[   65.975355] [<ffffff800810b490>] SyS_init_module+0xf8/0x178
[   65.980909] Exception stack(0xffffff800bf03ec0 to 0xffffff800bf04000)
[   65.987334] 3ec0: 000000003080a2e0 0000000000002f00 000000003080a260 000000003080a280
[   65.995147] 3ee0: 0000000000000000 0000007f93585580 0000007f93660700 0000007f93660700
[   66.002959] 3f00: 0000000000000069 0000000000003001 0101010101010101 0000000000000000
[   66.010771] 3f20: 0000000000000018 0000000000005b76 0000007f93448d98 0000007f9343bd00
[   66.018583] 3f40: 0000007f93500a80 00000000004a59b0 000000000000073f 0000007f93660720
[   66.026395] 3f60: 000000003080a2e0 000000003080a260 0000000000000002 0000007ff8e21198
[   66.034207] 3f80: 0000000000000049 0000000000000000 00000000004a5000 0000000000000000
[   66.042019] 3fa0: 0000000000000000 0000007ff8e21060 000000000040f368 0000007ff8e20f40
[   66.049831] 3fc0: 0000007f93500aa4 0000000080000000 000000003080a2e0 0000000000000069
[   66.057643] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   66.065455] [<ffffff80080837b0>] el0_svc_naked+0x24/0x28
[   66.070746] ---[ end trace c54ee1296e7b908c ]---
[   66.075371] kobject_add_internal failed for dma_proxy with -EEXIST, don't try to register things with the same name in the same directory.
[   66.087814] ------------[ cut here ]------------
[   66.092364] WARNING: CPU: 1 PID: 2237 at /kernel-source//lib/kobject.c:240 kobject_add_internal+0x194/0x2c8
[   66.102083] Modules linked in: dma_proxy(O+) uio_pdrv_genirq
[   66.107725] CPU: 1 PID: 2237 Comm: insmod Tainted: G        W  O    4.14.0-xilinx-v2018.2 #1
[   66.116145] Hardware name: xlnx,zynqmp (DT)
[   66.120309] task: ffffffc06c0a1200 task.stack: ffffff800bf00000
[   66.126213] PC is at kobject_add_internal+0x194/0x2c8
[   66.131247] LR is at kobject_add_internal+0x194/0x2c8
[   66.136280] pc : [<ffffff8008a18814>] lr : [<ffffff8008a18814>] pstate: 00000145
[   66.143659] sp : ffffff800bf03b00
[   66.146955] x29: ffffff800bf03b00 x28: ffffff800bf05000
[   66.152251] x27: ffffff8000a52100 x26: ffffff8000a51290
[   66.157545] x25: 0000000000000001 x24: ffffff8000a52438
[   66.162840] x23: ffffff8000a51028 x22: ffffffc06d90ca18
[   66.168135] x21: 00000000ffffffef x20: ffffffc06b5cef80
[   66.173430] x19: ffffffc06c11ba18 x18: 0000000000000010
[   66.178725] x17: 00000000004a59b0 x16: 0000000000000001
[   66.184020] x15: ffffffffffffffff x14: 0720072007200720
[   66.189315] x13: 0720072007200720 x12: 0720072007200720
[   66.194609] x11: 0720072007200720 x10: 072007200720072e
[   66.199904] x9 : 07790772076f0774 x8 : 0763076507720769
[   66.205199] x7 : 076407200765076d x6 : 00000000000001a7
[   66.210494] x5 : 0000000000000000 x4 : 0000000000000000
[   66.215788] x3 : 0000000000000000 x2 : ffffffc07fe93568
[   66.221083] x1 : 00000040770c4000 x0 : 000000000000007e
[   66.226378] Call trace:
[   66.228808] Exception stack(0xffffff800bf039c0 to 0xffffff800bf03b00)
[   66.235235] 39c0: 000000000000007e 00000040770c4000 ffffffc07fe93568 0000000000000000
[   66.243048] 39e0: 0000000000000000 0000000000000000 00000000000001a7 076407200765076d
[   66.250860] 3a00: 0763076507720769 07790772076f0774 072007200720072e 0720072007200720
[   66.258672] 3a20: 0720072007200720 0720072007200720 0720072007200720 ffffffffffffffff
[   66.266484] 3a40: 0000000000000001 00000000004a59b0 0000000000000010 ffffffc06c11ba18
[   66.274296] 3a60: ffffffc06b5cef80 00000000ffffffef ffffffc06d90ca18 ffffff8000a51028
[   66.282108] 3a80: ffffff8000a52438 0000000000000001 ffffff8000a51290 ffffff8000a52100
[   66.289920] 3aa0: ffffff800bf05000 ffffff800bf03b00 ffffff8008a18814 ffffff800bf03b00
[   66.297732] 3ac0: ffffff8008a18814 0000000000000145 ffffffc06b5ce200 0000000000000000
[   66.305544] 3ae0: 0000008000000000 ffffff800849d410 ffffff800bf03b00 ffffff8008a18814
[   66.313357] [<ffffff8008a18814>] kobject_add_internal+0x194/0x2c8
[   66.319430] [<ffffff8008a1899c>] kset_register+0x54/0x98
[   66.324726] [<ffffff8008582ba4>] __class_register+0xbc/0x170
[   66.330368] [<ffffff8008582cac>] __class_create+0x54/0x80
[   66.335752] [<ffffff8000a50558>] create_channel+0x120/0x300 [dma_proxy]
[   66.342349] [<ffffff8000a55028>] dma_proxy_init+0x28/0x1000 [dma_proxy]
[   66.348943] [<ffffff8008083980>] do_one_initcall+0x38/0x128
[   66.354498] [<ffffff800810bcd0>] do_init_module+0x58/0x1b0
[   66.359966] [<ffffff800810ac44>] load_module+0x19fc/0x2150
[   66.365435] [<ffffff800810b490>] SyS_init_module+0xf8/0x178
[   66.370988] Exception stack(0xffffff800bf03ec0 to 0xffffff800bf04000)
[   66.377413] 3ec0: 000000003080a2e0 0000000000002f00 000000003080a260 000000003080a280
[   66.385226] 3ee0: 0000000000000000 0000007f93585580 0000007f93660700 0000007f93660700
[   66.393038] 3f00: 0000000000000069 0000000000003001 0101010101010101 0000000000000000
[   66.400850] 3f20: 0000000000000018 0000000000005b76 0000007f93448d98 0000007f9343bd00
[   66.408662] 3f40: 0000007f93500a80 00000000004a59b0 000000000000073f 0000007f93660720
[   66.416474] 3f60: 000000003080a2e0 000000003080a260 0000000000000002 0000007ff8e21198
[   66.424286] 3f80: 0000000000000049 0000000000000000 00000000004a5000 0000000000000000
[   66.432098] 3fa0: 0000000000000000 0000007ff8e21060 000000000040f368 0000007ff8e20f40
[   66.439910] 3fc0: 0000007f93500aa4 0000000080000000 000000003080a2e0 0000000000000069
[   66.447722] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   66.455534] [<ffffff80080837b0>] el0_svc_naked+0x24/0x28
[   66.460825] ---[ end trace c54ee1296e7b908d ]---
[   66.465444] dma dma1chan1: unable to create the device
[   66.470563] Unable to handle kernel NULL pointer dereference at virtual address 000001fd
[   66.478629] Mem abort info:
[   66.481403]   Exception class = DABT (current EL), IL = 32 bits
[   66.487307]   SET = 0, FnV = 0
[   66.490342]   EA = 0, S1PTW = 0
[   66.493467] Data abort info:
[   66.496331]   ISV = 0, ISS = 0x00000006
[   66.500151]   CM = 0, WnR = 0
[   66.503097] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc06cd87000
[   66.509615] [00000000000001fd] *pgd=000000006c0a5003, *pud=000000006c0a5003, *pmd=0000000000000000
[   66.518556] Internal error: Oops: 96000006 [#1] SMP
[   66.523408] Modules linked in: dma_proxy(O+) uio_pdrv_genirq
[   66.529052] CPU: 1 PID: 2237 Comm: insmod Tainted: G        W  O    4.14.0-xilinx-v2018.2 #1
[   66.537472] Hardware name: xlnx,zynqmp (DT)
[   66.541636] task: ffffffc06c0a1200 task.stack: ffffff800bf00000
[   66.547544] PC is at create_channel+0x1ec/0x300 [dma_proxy]
[   66.553098] LR is at create_channel+0x1a8/0x300 [dma_proxy]
[   66.558649] pc : [<ffffff8000a50624>] lr : [<ffffff8000a505e0>] pstate: 60000145
[   66.566028] sp : ffffff800bf03bc0
[   66.569324] x29: ffffff800bf03bc0 x28: ffffff800bf05000
[   66.574620] x27: ffffff8000a52100 x26: ffffff8000a51290
[   66.579914] x25: 0000000000000001 x24: ffffff8000a52438
[   66.585209] x23: ffffff8000a51028 x22: ffffffffffffffef
[   66.590504] x21: ffffffffffffffed x20: 0000000000000000
[   66.595799] x19: ffffff8000a52410 x18: 0000000000000010
[   66.601094] x17: 00000000004a59b0 x16: 0000000000000001
[   66.606389] x15: ffffffffffffffff x14: 0720072007200720
[   66.611683] x13: 0720072007200720 x12: 0720072007200720
[   66.616978] x11: 0720072007200720 x10: 0720072007200720
[   66.622273] x9 : 0720072007200765 x8 : 0763076907760765
[   66.627568] x7 : 0764072007650768 x6 : 00000000000001e4
[   66.632862] x5 : 00000000000000f3 x4 : ffffffbf0177ecc7
[   66.638157] x3 : ffffffbf0177ecc8 x2 : 000000000f200001
[   66.643452] x1 : 0000000000000024 x0 : 0000000000000000
[   66.648748] Process insmod (pid: 2237, stack limit = 0xffffff800bf00000)
[   66.655431] Call trace:
[   66.657861] Exception stack(0xffffff800bf03a80 to 0xffffff800bf03bc0)
[   66.664287] 3a80: 0000000000000000 0000000000000024 000000000f200001 ffffffbf0177ecc8
[   66.672101] 3aa0: ffffffbf0177ecc7 00000000000000f3 00000000000001e4 0764072007650768
[   66.679913] 3ac0: 0763076907760765 0720072007200765 0720072007200720 0720072007200720
[   66.687724] 3ae0: 0720072007200720 0720072007200720 0720072007200720 ffffffffffffffff
[   66.695536] 3b00: 0000000000000001 00000000004a59b0 0000000000000010 ffffff8000a52410
[   66.703348] 3b20: 0000000000000000 ffffffffffffffed ffffffffffffffef ffffff8000a51028
[   66.711160] 3b40: ffffff8000a52438 0000000000000001 ffffff8000a51290 ffffff8000a52100
[   66.718973] 3b60: ffffff800bf05000 ffffff800bf03bc0 ffffff8000a505e0 ffffff800bf03bc0
[   66.726785] 3b80: ffffff8000a50624 0000000060000145 000000000f200001 ffffff8000a52438
[   66.734597] 3ba0: 0000008000000000 ffffff8000a505e0 ffffff800bf03bc0 ffffff8000a50624
[   66.742412] [<ffffff8000a50624>] create_channel+0x1ec/0x300 [dma_proxy]
[   66.749007] [<ffffff8000a55028>] dma_proxy_init+0x28/0x1000 [dma_proxy]
[   66.755601] [<ffffff8008083980>] do_one_initcall+0x38/0x128
[   66.761156] [<ffffff800810bcd0>] do_init_module+0x58/0x1b0
[   66.766624] [<ffffff800810ac44>] load_module+0x19fc/0x2150
[   66.772093] [<ffffff800810b490>] SyS_init_module+0xf8/0x178
[   66.777646] Exception stack(0xffffff800bf03ec0 to 0xffffff800bf04000)
[   66.784071] 3ec0: 000000003080a2e0 0000000000002f00 000000003080a260 000000003080a280
[   66.791885] 3ee0: 0000000000000000 0000007f93585580 0000007f93660700 0000007f93660700
[   66.799696] 3f00: 0000000000000069 0000000000003001 0101010101010101 0000000000000000
[   66.807508] 3f20: 0000000000000018 0000000000005b76 0000007f93448d98 0000007f9343bd00
[   66.815320] 3f40: 0000007f93500a80 00000000004a59b0 000000000000073f 0000007f93660720
[   66.823132] 3f60: 000000003080a2e0 000000003080a260 0000000000000002 0000007ff8e21198
[   66.830944] 3f80: 0000000000000049 0000000000000000 00000000004a5000 0000000000000000
[   66.838756] 3fa0: 0000000000000000 0000007ff8e21060 000000000040f368 0000007ff8e20f40
[   66.846568] 3fc0: 0000007f93500aa4 0000000080000000 000000003080a2e0 0000000000000069
[   66.854380] 3fe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[   66.862192] [<ffffff80080837b0>] el0_svc_naked+0x24/0x28
[   66.867486] Code: 95da2ba1 1400001b f9400a75 b4000075 (f9410aa0)

My guess is that it is failing on dmam_alloc_coherent. I will try setting CACHED_BUFFERS and use kzalloc, but I have not clue why it is failing.

On boot however, it looks like the driver is probed successfully.

[    1.613193] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.613578] xilinx-vdma a0000000.dma: Xilinx AXI DMA Engine Driver Probed!!
[    1.613864] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.614009] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.614150] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.614301] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.614445] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.614592] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.614736] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.614881] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.615091] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.615235] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.615377] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.615520] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.615664] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.615840] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.615985] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.616126] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success

Just for reference, here is my pl.dtsi

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Wed Feb  6 08:57:01 2019
 */


/ {
	amba_pl: amba_pl@0 {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;
		axi_dma_0: dma@a0000000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk", "m_axi_s2mm_aclk";
			clocks = <&clk 71>, <&clk 71>, <&clk 71>, <&misc_clk_0>;
			compatible = "xlnx,axi-dma-1.00.a";
			interrupt-names = "mm2s_introut", "s2mm_introut";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4 0 90 4>;
			reg = <0x0 0xa0000000 0x0 0x1000>;
			xlnx,addrwidth = <0x28>;
			xlnx,sg-length-width = <0xe>;
			dma-channel@a0000000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				dma-channels = <0x1>;
				interrupts = <0 89 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
				xlnx,include-dre ;
			};
			dma-channel@a0000030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 90 4>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
				xlnx,include-dre ;
			};
		};
		psu_ctrl_ipi: PERIPHERAL@ff380000 {
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff380000 0x0 0x80000>;
		};
		psu_message_buffers: PERIPHERAL@ff990000 {
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff990000 0x0 0x10000>;
		};
		misc_clk_0: misc_clk_0 {
			#clock-cells = <0>;
			clock-frequency = <100000002>;
			compatible = "fixed-clock";
		};
	};
};

Not sure what the misc_clk is doing there, but it seems to map to 100MHz clk "pl_clk0" on hardware design.

If anyone has experienced these issues with dmam_alloc_coherent on UltraScale+, I would appreciate any advice.

Thanks.

 

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
580 Views
Registered: ‎10-18-2017

Re: MPSoC AXI DMA Proxy Kernel Module Fails to Load

Jump to solution

I was able to get the DMA to work using this tutorial.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space

I did not use High Address under Address Fragmentation in MPSoC setup menu. Everything else is the same.

0 Kudos
2 Replies
Explorer
Explorer
607 Views
Registered: ‎10-18-2017

Re: MPSoC AXI DMA Proxy Kernel Module Fails to Load

Jump to solution

With a little debugging, it looks like dmam_alloc_coherent is failing.

int can_perform_dma;
can_perform_dma = dma_set_coherent_mask(pchannel_p->proxy_device_p, 0xFFFFFFFF);
printk(KERN_INFO "Card DMA capability: %d\n", can_perform_dma);
pchannel_p->interface_p = (struct dma_proxy_channel_interface *) 
dmam_alloc_coherent(pchannel_p->proxy_device_p,
sizeof(struct dma_proxy_channel_interface), &pchannel_p->interface_phys_addr, GFP_KERNEL);
printk(KERN_INFO "Allocating uncached memory at 0x%08X\n", (unsigned int)pchannel_p->interface_p);

dma_set_coherent_mask is faililng, which of course makes dmam_alloc_coherent fail. I changed the hardware designs to ensure that all interfaces from PS had data widths of 32. 

0 Kudos
Explorer
Explorer
581 Views
Registered: ‎10-18-2017

Re: MPSoC AXI DMA Proxy Kernel Module Fails to Load

Jump to solution

I was able to get the DMA to work using this tutorial.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842418/Linux+DMA+From+User+Space

I did not use High Address under Address Fragmentation in MPSoC setup menu. Everything else is the same.

0 Kudos