取消
显示结果 
搜索替代 
您的意思是: 
Highlighted
Contributor
Contributor
258 次查看
注册日期: ‎08-29-2019

加速设备映射失败!Failed to map accelerator device @44a00000. Aborting

大家好,请问我该如何解决这个问题?困扰了很长时间一直没有解决。

我是通过在SDx中创建sdx paltform project来实现自定义平台,并基于这个平台创建了一个SDx application project工程,导入官方matrix案例,并把mmult_accel函数用硬件来加速。正常编译并在我的zynq7010开发板上运行,然后出现了上面的问题。谢谢!

我已经按照ug1146用petalinux配置了内核,依次打开了 Device Drivers → Staging drivers → Xilinx APF Accelerator driver → Xilinx APF DMA engines support (ON)驱动,并调整了 CMA size , Zynq-7000 SoC: Device Drivers→ Generic Driver Options → Size in Mega Bytes(256),也配置了设备树/{ xlnk { compatible = "xlnx,xlnk-1.0"; }; }; 

下面是我的linux打印出来的信息,我看到了xlnx驱动正确加载,没有发现什么异常:

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Sat Oct 12 12:05:38 UTC 2019
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: xlnx,zynq-7000
Memory policy: Data cache writealloc
cma: Reserved 256 MiB at 0x30000000
random: get_random_bytes called from start_kernel+0x80/0x3c4 with crng_init=0
percpu: Embedded 16 pages/cpu @(ptrval) s35916 r8192 d21428 u65536
Built 1 zonelists, mobility grouping on. Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/nfs nfsroot=192.168.8.200:/nfsroot,proto=tcp,nfsvers=3,nolock ip=dhcp rw
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 767096K/1048576K available (6144K kernel code, 204K rwdata, 1612K rodata, 1024K init, 246K bss, 19336K reserved, 262144K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0x(ptrval) - 0x(ptrval) (7136 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 205 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 247 kB)
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Tasks RCU enabled.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to (ptrval)
slcr mapped to (ptrval)
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at (ptrval)
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at (ptrval), irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: Spectre v2: using BPIALL workaround
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU1: Spectre v2: using BPIALL workaround
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 26, base_baud = 3125000) is a xuartps
console [ttyPS0] enabled
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
videodev: Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
brd: module loaded
loop: module loaded
m25p80 spi0.0: found w25q128, expected n25q512a
m25p80 spi0.0: w25q128 (16384 Kbytes)
4 fixed-partitions partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
Generic PHY e000b000.ethernet-ffffffff:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:03, irq=POLL)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:0a:35:00:1e:53)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at (ptrval) with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
xlnk xlnk: Major 244
xlnk xlnk: xlnk driver loaded
xlnk xlnk: xlnk_pdev is not null
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
of-fpga-region fpga-full: FPGA Region probed
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
mmc0: new high speed SDHC card at address 59b4
mmcblk0: mmc0:59b4 USD00 7.33 GiB (ro)
mmcblk0: p1
macb e000b000.ethernet eth0: link up (100/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.8.1, my address is 192.168.8.141
IP-Config: Complete:
device=eth0, hwaddr=00:0a:35:00:1e:53, ipaddr=192.168.8.141, mask=255.255.255.0, gw=192.168.8.1
host=192.168.8.141, domain=Home, nis-domain=(none)
bootserver=192.168.8.1, rootserver=192.168.8.200, rootpath=
nameserver0=192.168.8.1
ALSA device list:
No soundcards found.
VFS: Mounted root (nfs filesystem) on device 0:12.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
Run /sbin/init as init process
random: fast init done
INIT: version 2.88 booting
mount: /proc: operation permitted for root only.
mount: only root can use "--types" option (effective UID is 1000)
grep: /proc/filesystems: No such file or directory
mount: only root can use "--no-mtab" option (effective UID is 1000)
grep: /proc/filesystems: No such file or directory
bootlogd: cannot allocate pseudo tty: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/conf/default/rp_filter: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/conf/all/rp_filter: No such file or directory
hwclock: can't open '/dev/misc/rtc': No such file or directory
Fri Oct 11 14:11:02 UTC 2019
hwclock: can't open '/dev/misc/rtc': No such file or directory
/etc/rcS.d/S37populate-volatile.sh: line 219: /proc/cmdline: No such file or directory
/etc/rcS.d/S38dmesg.sh: line 17: /var/log/dmesg: No such file or directory
random: dd: uninitialized urandom read (512 bytes read)
INIT: Entering runlevel: 5
Configuring network interfaces... RTNETLINK answers: File exists
/etc/network/if-pre-up.d/nfsroot: line 12: /proc/mounts: No such file or directory
run-parts: /etc/network/if-pre-up.d/nfsroot: exit status 1
Starting Dropbear SSH server: random: dropbear: uninitialized urandom read (32 bytes read)
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
Starting syslogd/klogd: done
Oct 11 14:11:06 hglnx syslog.info syslogd started: BusyBox v1.29.2
Oct 11 14:11:06 hglnx user.notice kernel: klogd started: BusyBox v1.29.2 (2019-10-11 11:34:37 UTC)
Oct 11 14:11:06 hglnx user.info kernel: Booting Linux on physical CPU 0x0
Oct 11 14:11:06 hglnx user.notice kernel: Linux version 4.19.0-xilinx-v2019.1 (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP PREEMPT Sat Oct 12 12:05:38 UTC 2019
Oct 11 14:11:06 hglnx user.info kernel: CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
Oct 11 14:11:06 hglnx user.info kernel: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Oct 11 14:11:06 hglnx user.info kernel: OF: fdt: Machine model: xlnx,zynq-7000
Oct 11 14:11:06 hglnx user.info kernel: Memory policy: Data cache writealloc
Oct 11 14:11:06 hglnx user.info kernel: cma: Reserved 256 MiB at 0x30000000
Oct 11 14:11:06 hglnx user.debug kernel: On node 0 totalpages: 262144
Oct 11 14:11:06 hglnx user.debug kernel: Normal zone: 1536 pages used for memmap
Oct 11 14:11:06 hglnx user.debug kernel: Normal zone: 0 pages reserved
Oct 11 14:11:06 hglnx user.debug kernel: Normal zone: 196608 pages, LIFO batch:63
Oct 11 14:11:06 hglnx user.debug kernel: HighMem zone: 65536 pages, LIFO batch:15
Oct 11 14:11:06 hglnx user.notice kernel: random: get_random_bytes called from start_kernel+0x80/0x3c4 with crng_init=0
Oct 11 14:11:06 hglnx user.info kernel: percpu: Embedded 16 pages/cpu @(ptrval) s35916 r8192 d21428 u65536
Oct 11 14:11:06 hglnx user.debug kernel: pcpu-alloc: s35916 r8192 d21428 u65536 alloc=16*4096
Oct 11 14:11:06 hglnx user.debug kernel: pcpu-alloc: [0] 0 [0] 1
Oct 11 14:11:06 hglnx user.info kernel: Built 1 zonelists, mobility grouping on. Total pages: 260608
Oct 11 14:11:06 hglnx user.notice kernel: Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/nfs nfsroot=192.168.8.200:/nfsroot,proto=tcp,nfsvers=3,nolock ip=dhcp rw
Oct 11 14:11:06 hglnx user.info kernel: Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Oct 11 14:11:06 hglnx user.info kernel: Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Oct 11 14:11:06 hglnx user.info kernel: Memory: 767096K/1048576K available (6144K kernel code, 204K rwdata, 1612K rodata, 1024K init, 246K bss, 19336K reserved, 262144K cma-reserved, 0K highmem)
Oct 11 14:11:06 hglnx user.notice kernel: Virtual kernel memory layout:
Oct 11 14:11:06 hglnx user.notice kernel: vector : 0xffff0000 - 0xffff1000 ( 4 kB)
Oct 11 14:11:06 hglnx user.notice kernel: fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
Oct 11 14:11:06 hglnx user.notice kernel: vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
Oct 11 14:11:06 hglnx user.notice kernel: lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
Oct 11 14:11:06 hglnx user.notice kernel: pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
Oct 11 14:11:06 hglnx user.notice kernel: modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
Oct 11 14:11:06 hglnx user.notice kernel: .text : 0x(ptrval) - 0x(ptrval) (7136 kB)
Oct 11 14:11:06 hglnx user.notice kernel: .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
Oct 11 14:11:06 hglnx user.notice kernel: .data : 0x(ptrval) - 0x(ptrval) ( 205 kB)
Oct 11 14:11:06 hglnx user.notice kernel: .bss : 0x(ptrval) - 0x(ptrval) ( 247 kB)
Oct 11 14:11:06 hglnx user.info kernel: rcu: Preemptible hierarchical RCU implementation.
Oct 11 14:11:06 hglnx user.info kernel: rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
Oct 11 14:11:06 hglnx user.info kernel: Tasks RCU enabled.
Oct 11 14:11:06 hglnx user.info kernel: rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
Oct 11 14:11:06 hglnx user.info kernel: NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
Oct 11 14:11:06 hglnx user.info kernel: efuse mapped to (ptrval)
Oct 11 14:11:06 hglnx user.info kernel: slcr mapped to (ptrval)
Oct 11 14:11:06 hglnx user.warn kernel: L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
Oct 11 14:11:06 hglnx user.warn kernel: L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
Oct 11 14:11:06 hglnx user.info kernel: L2C-310 erratum 769419 enabled
Oct 11 14:11:06 hglnx user.info kernel: L2C-310 enabling early BRESP for Cortex-A9
Oct 11 14:11:06 hglnx user.info kernel: L2C-310 full line of zeros enabOcOcOcOctOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOctOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOcOct 11 14:11:OctOcOctOcOcOcOcOcOct 1OcOcOcOcOcOOOcOcOcStarting tcf-agent: OK
touch: cannot touch '/var/lock/subsys/tcf-agent': No such file or directory

Oct 11 14:11:08 hglnx authpriv.err login[820]: pam_lastlog(login:session): unable to create /var/log/lastlog: No such file or directory
Oct 11 14:11:08 hglnx authpriv.err login[819]: pam_lastlog(login:session): unable to create /var/log/lastlog: No such file or directory
Oct 11 14:11:08 hglnx authpriv.info login[820]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Oct 11 14:11:08 hglnx authpriv.info login[819]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Oct 11 14:11:09 hglnx authpriv.notice login[822]: ROOT LOGIN on '/dev/tty1'
Oct 11 14:11:09 hglnx authpriv.notice login[821]: ROOT LOGIN on '/dev/ttyPS0'

 

下面是我的应用打印信息:

root@hglnx:~# ./test32.elf
xdma_probe: probe dma 399509dc, nres 1, id 0
xilinx-axidma xilinx-axidma.0: AXIDMA device 0 physical base address=0x41e00000
xilinx-axidma xilinx-axidma.0: AXIDMA device 0 remapped to 0xf09f0000
xilinx-axidma xilinx-axidma.0: has 1 channel(s)
chan 0 name: dm_0:0
chan 0 direction: TO_DEVICE
xlate_irq: hwirq 61, irq 47
Oct 11 14:12:58 hglnx user.info kernel: xdma_probe: probe dma 39 chan0 irq: 47
9509dc, nres 1, id 0 chan0 poll mode: off

Oct 11 14:12:58 hglnx user.info kernel: xilinx-axidma xilinx-axidma.0: AXIDMA device 0 physical base address=0x41e00000
Oct 11 14 chan0 bd ring @ 0xbd3116c7 (size: 0x100000 bytes)
:12:58 hglnx user.info kernel: xilinx-axidma xilinx-axidma.0: AXxdma_probe: probe dma 28334524, nres 1, id 1
IDMA device 0 remapped to 0xf09f0000
xilinx-axidma xilinx-axidma.1: AXIDMA device 1 physical base address=0x41e10000
xilinx-axidma xilinx-axidma.1: AXIDMA device 1 remapped to 0xf0b10000
xilinx-axidma xilinx-axidma.1: has 1 channel(s)
chan 0 name: dm_1:0
chan 0 direction: FROM_DEVICE
Oct 11 14:12:58 hglnx user.info kernel: xilinx-axidma xilinx-axixlate_irq: hwirq 62, irq 48
dma.0: has 1 channel(s)
chan0 irq: 48
chan0 poll mode: off
Oct 11 14:12:58 hglnx user.info kernel: chan 0 name: dm_0:0
Oct 11 14:12:58 hg chan0 bd ring @ 0x49b1644c (size: 0x100000 bytes)
lnx user.info kernel: chan 0 direction: TO_DEVICE
Oct 11 14:12:58 hglnx user.info kernel: xlate_irq: hwirq 61, irq 47
Ocxlnk_eng_probe ...
t 11 14:12:58 hglnx user.info kernel: chan0 irq: 47
Oct 11 14uio name xilinx-xlnk-eng.2
:12:58 hglnx user.info kernel: chan0 poll mode: off
Oct 11 14xilinx-xlnk-eng xilinx-xlnk-eng.2: physical base : 0x44a00000
:12:58 hglnx user.info kernel: chan0 bd ring @ 0xbd3116c7 (sizxilinx-xlnk-eng xilinx-xlnk-eng.2: register range : 0x10000
e: 0x100000 bytes)
Oct 11 14:12:58 hglnx user.info kernel: xdmaxilinx-xlnk-eng xilinx-xlnk-eng.2: base remapped to: 0xf0c30000
_probe: probe dma 28334524, nres 1, id 1
Oct 11 14:12:58 hglnx usxilinx-xlnk-eng xilinx-xlnk-eng.2: xilinx-xlnk-eng uio registered
er.info kernel: xilinx-axidma xilinx-axidma.1: AXIDMA device 1 physical base address=0x41e10000
Oct 11 14:12:58 hglnx user.info kernel: xilinx-axidma xilinx-axidma.1: AXIDMA device 1 remapped to 0xf0b10000
Oct 11 14:12:58 hglnx user.info kernel: xilinx-axidma xilinx-axidma.1: has 1 channel(s)
Oct 11 14:12:58 hglnx user.info kernel: chan 0 name: dm_1:0
Oct 11 14:12:58 hglnx user.info kernel: chan 0 direction: FROM_DEVICE
Oct 11 14:12:58 hglnx user.info kernel: xlate_irq: hwirq 62, irq 48
Oct 11 14:12:58 hglnx user.info kernel: chan0 irq: 48
Oct 11 14:12:58 hglnx user.info kernel: chan0 poll mode: off
Oct 11 14:12:58 hglnx user.info kernel: chan0 bd ring @ 0x49b1644c (size: 0x100000 bytes)
Oct 11 14:12:58 hglnx user.info kernel: xlnk_eng_probe ...
Oct 11 14:12:58 hglnx user.info kernel: uio name xilinx-xlnk-eng.2
Oct 11 14:12:58 hglnx user.info kernel: xilinx-xlnk-eng xilinx-xlnk-eng.2: physical base : 0x44a00000
Oct 11 14:12:58 hglnx user.info kernel: xilinx-xlnk-eng xilinx-xlnk-eng.2: register range : 0x10000
Oct 11 14:12:58 hglnx user.info kernel: xilinx-xlnk-eng xilinx-xlnk-eng.2: base remapped to: 0xf0c30000
Oct 11 14:12:58 hglnx user.info kernel: xilinx-xlnk-eng xilinx-xlnk-eng.2: xilinx-xlnk-eng uio registered
Failed to map accelerator device @44a00000. Aborting

程序就卡在这里了,再次感谢!

0 项奖励
4 条回复4
Highlighted
Xilinx Employee
Xilinx Employee
212 次查看
注册日期: ‎06-19-2019

回复: 加速设备映射失败!Failed to map accelerator device @44a00000. Aborting

你系统的设备树里是如何描述这个设备的?

------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------
0 项奖励
Highlighted
Contributor
Contributor
195 次查看
注册日期: ‎08-29-2019

回复: 加速设备映射失败!Failed to map accelerator device @44a00000. Aborting

感谢回复!这是我的设备树文件,在pl.dtsi文件中。在这里面我看到了这个设备,但是运行时候不知道为什么会出错。

/*
* CAUTION: This file is automatically generated by Xilinx.
* Version: XSCT 2019.1
* Today is: Sun Oct 13 22:03:19 2019
*/


/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
dm_0: dma@41e00000 {
#dma-cells = <1>;
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_mm2s_aclk";
clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a";
dma-coherent ;
interrupt-names = "mm2s_introut";
interrupt-parent = <&intc>;
interrupts = <0 29 4>;
reg = <0x41e00000 0x10000>;
xlnx,addrwidth = <0x20>;
xlnx,include-sg ;
xlnx,sg-include-stscntrl-strm ;
xlnx,sg-length-width = <0x1a>;
dma-channel@41e00000 {
compatible = "xlnx,axi-dma-mm2s-channel";
dma-channels = <0x1>;
interrupts = <0 29 4>;
xlnx,datawidth = <0x40>;
xlnx,device-id = <0x0>;
xlnx,include-dre ;
};
};
misc_clk_0: misc_clk_0 {
#clock-cells = <0>;
clock-frequency = <100000000>;
compatible = "fixed-clock";
};
dm_1: dma@41e10000 {
#dma-cells = <1>;
clock-names = "s_axi_lite_aclk", "m_axi_sg_aclk", "m_axi_s2mm_aclk";
clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
compatible = "xlnx,axi-dma-7.1", "xlnx,axi-dma-1.00.a";
dma-coherent ;
interrupt-names = "s2mm_introut";
interrupt-parent = <&intc>;
interrupts = <0 30 4>;
reg = <0x41e10000 0x10000>;
xlnx,addrwidth = <0x20>;
xlnx,include-sg ;
xlnx,sg-include-stscntrl-strm ;
xlnx,sg-length-width = <0x1a>;
dma-channel@41e10030 {
compatible = "xlnx,axi-dma-s2mm-channel";
dma-channels = <0x1>;
interrupts = <0 30 4>;
xlnx,datawidth = <0x40>;
xlnx,device-id = <0x1>;
xlnx,include-dre ;
};
};
mmult_accel_1_if: adapter_v3_0@44a00000 {
/* This is a place holder node for a custom IP, user may need to update the entries */
clock-names = "s_axi_aclk", "acc_aclk", "s_axis_bram_0_aclk", "s_axis_bram_1_aclk", "m_axis_bram_0_aclk";
clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>;
compatible = "xlnx,adapter-v3-0-1.0";
reg = <0x44a00000 0x10000>;
xlnx,acc-reset-polarity = <0x0>;
xlnx,fifo-depth = <0x10>;
xlnx,has-ctrl = <0x1>;
xlnx,has-return = <0x0>;
xlnx,input-scalar-0-width = <0x1>;
xlnx,input-scalar-1-width = <0x1>;
xlnx,input-scalar-10-width = <0x1>;
xlnx,input-scalar-100-width = <0x1>;
xlnx,input-scalar-101-width = <0x1>;
xlnx,input-scalar-102-width = <0x1>;
xlnx,input-scalar-103-width = <0x1>;
xlnx,input-scalar-104-width = <0x1>;
xlnx,input-scalar-105-width = <0x1>;
xlnx,input-scalar-106-width = <0x1>;
xlnx,input-scalar-107-width = <0x1>;
xlnx,input-scalar-108-width = <0x1>;
xlnx,input-scalar-109-width = <0x1>;
xlnx,input-scalar-11-width = <0x1>;
xlnx,input-scalar-110-width = <0x1>;
xlnx,input-scalar-111-width = <0x1>;
xlnx,input-scalar-112-width = <0x1>;
xlnx,input-scalar-113-width = <0x1>;
xlnx,input-scalar-114-width = <0x1>;
xlnx,input-scalar-115-width = <0x1>;
xlnx,input-scalar-116-width = <0x1>;
xlnx,input-scalar-117-width = <0x1>;
xlnx,input-scalar-118-width = <0x1>;
xlnx,input-scalar-119-width = <0x1>;
xlnx,input-scalar-12-width = <0x1>;
xlnx,input-scalar-120-width = <0x1>;
xlnx,input-scalar-121-width = <0x1>;
xlnx,input-scalar-122-width = <0x1>;
xlnx,input-scalar-123-width = <0x1>;
xlnx,input-scalar-124-width = <0x1>;
xlnx,input-scalar-125-width = <0x1>;
xlnx,input-scalar-126-width = <0x1>;
xlnx,input-scalar-127-width = <0x1>;
xlnx,input-scalar-13-width = <0x1>;
xlnx,input-scalar-14-width = <0x1>;
xlnx,input-scalar-15-width = <0x1>;
xlnx,input-scalar-16-width = <0x1>;
xlnx,input-scalar-17-width = <0x1>;
xlnx,input-scalar-18-width = <0x1>;
xlnx,input-scalar-19-width = <0x1>;
xlnx,input-scalar-2-width = <0x1>;
xlnx,input-scalar-20-width = <0x1>;
xlnx,input-scalar-21-width = <0x1>;
xlnx,input-scalar-22-width = <0x1>;
xlnx,input-scalar-23-width = <0x1>;
xlnx,input-scalar-24-width = <0x1>;
xlnx,input-scalar-25-width = <0x1>;
xlnx,input-scalar-26-width = <0x1>;
xlnx,input-scalar-27-width = <0x1>;
xlnx,input-scalar-28-width = <0x1>;
xlnx,input-scalar-29-width = <0x1>;
xlnx,input-scalar-3-width = <0x1>;
xlnx,input-scalar-30-width = <0x1>;
xlnx,input-scalar-31-width = <0x1>;
xlnx,input-scalar-32-width = <0x1>;
xlnx,input-scalar-33-width = <0x1>;
xlnx,input-scalar-34-width = <0x1>;
xlnx,input-scalar-35-width = <0x1>;
xlnx,input-scalar-36-width = <0x1>;
xlnx,input-scalar-37-width = <0x1>;
xlnx,input-scalar-38-width = <0x1>;
xlnx,input-scalar-39-width = <0x1>;
xlnx,input-scalar-4-width = <0x1>;
xlnx,input-scalar-40-width = <0x1>;
xlnx,input-scalar-41-width = <0x1>;
xlnx,input-scalar-42-width = <0x1>;
xlnx,input-scalar-43-width = <0x1>;
xlnx,input-scalar-44-width = <0x1>;
xlnx,input-scalar-45-width = <0x1>;
xlnx,input-scalar-46-width = <0x1>;
xlnx,input-scalar-47-width = <0x1>;
xlnx,input-scalar-48-width = <0x1>;
xlnx,input-scalar-49-width = <0x1>;
xlnx,input-scalar-5-width = <0x1>;
xlnx,input-scalar-50-width = <0x1>;
xlnx,input-scalar-51-width = <0x1>;
xlnx,input-scalar-52-width = <0x1>;
xlnx,input-scalar-53-width = <0x1>;
xlnx,input-scalar-54-width = <0x1>;
xlnx,input-scalar-55-width = <0x1>;
xlnx,input-scalar-56-width = <0x1>;
xlnx,input-scalar-57-width = <0x1>;
xlnx,input-scalar-58-width = <0x1>;
xlnx,input-scalar-59-width = <0x1>;
xlnx,input-scalar-6-width = <0x1>;
xlnx,input-scalar-60-width = <0x1>;
xlnx,input-scalar-61-width = <0x1>;
xlnx,input-scalar-62-width = <0x1>;
xlnx,input-scalar-63-width = <0x1>;
xlnx,input-scalar-64-width = <0x1>;
xlnx,input-scalar-65-width = <0x1>;
xlnx,input-scalar-66-width = <0x1>;
xlnx,input-scalar-67-width = <0x1>;
xlnx,input-scalar-68-width = <0x1>;
xlnx,input-scalar-69-width = <0x1>;
xlnx,input-scalar-7-width = <0x1>;
xlnx,input-scalar-70-width = <0x1>;
xlnx,input-scalar-71-width = <0x1>;
xlnx,input-scalar-72-width = <0x1>;
xlnx,input-scalar-73-width = <0x1>;
xlnx,input-scalar-74-width = <0x1>;
xlnx,input-scalar-75-width = <0x1>;
xlnx,input-scalar-76-width = <0x1>;
xlnx,input-scalar-77-width = <0x1>;
xlnx,input-scalar-78-width = <0x1>;
xlnx,input-scalar-79-width = <0x1>;
xlnx,input-scalar-8-width = <0x1>;
xlnx,input-scalar-80-width = <0x1>;
xlnx,input-scalar-81-width = <0x1>;
xlnx,input-scalar-82-width = <0x1>;
xlnx,input-scalar-83-width = <0x1>;
xlnx,input-scalar-84-width = <0x1>;
xlnx,input-scalar-85-width = <0x1>;
xlnx,input-scalar-86-width = <0x1>;
xlnx,input-scalar-87-width = <0x1>;
xlnx,input-scalar-88-width = <0x1>;
xlnx,input-scalar-89-width = <0x1>;
xlnx,input-scalar-9-width = <0x1>;
xlnx,input-scalar-90-width = <0x1>;
xlnx,input-scalar-91-width = <0x1>;
xlnx,input-scalar-92-width = <0x1>;
xlnx,input-scalar-93-width = <0x1>;
xlnx,input-scalar-94-width = <0x1>;
xlnx,input-scalar-95-width = <0x1>;
xlnx,input-scalar-96-width = <0x1>;
xlnx,input-scalar-97-width = <0x1>;
xlnx,input-scalar-98-width = <0x1>;
xlnx,input-scalar-99-width = <0x1>;
xlnx,n-input-scalars = <0x0>;
xlnx,n-output-scalars = <0x0>;
xlnx,num-aximms = <0x0>;
xlnx,num-input-axiss = <0x0>;
xlnx,num-input-brams = <0x2>;
xlnx,num-input-fifos = <0x0>;
xlnx,num-output-axiss = <0x0>;
xlnx,num-output-brams = <0x1>;
xlnx,num-output-fifos = <0x0>;
xlnx,output-scalar-0-width = <0x1>;
xlnx,output-scalar-1-width = <0x1>;
xlnx,output-scalar-10-width = <0x1>;
xlnx,output-scalar-100-width = <0x1>;
xlnx,output-scalar-101-width = <0x1>;
xlnx,output-scalar-102-width = <0x1>;
xlnx,output-scalar-103-width = <0x1>;
xlnx,output-scalar-104-width = <0x1>;
xlnx,output-scalar-105-width = <0x1>;
xlnx,output-scalar-106-width = <0x1>;
xlnx,output-scalar-107-width = <0x1>;
xlnx,output-scalar-108-width = <0x1>;
xlnx,output-scalar-109-width = <0x1>;
xlnx,output-scalar-11-width = <0x1>;
xlnx,output-scalar-110-width = <0x1>;
xlnx,output-scalar-111-width = <0x1>;
xlnx,output-scalar-112-width = <0x1>;
xlnx,output-scalar-113-width = <0x1>;
xlnx,output-scalar-114-width = <0x1>;
xlnx,output-scalar-115-width = <0x1>;
xlnx,output-scalar-116-width = <0x1>;
xlnx,output-scalar-117-width = <0x1>;
xlnx,output-scalar-118-width = <0x1>;
xlnx,output-scalar-119-width = <0x1>;
xlnx,output-scalar-12-width = <0x1>;
xlnx,output-scalar-120-width = <0x1>;
xlnx,output-scalar-121-width = <0x1>;
xlnx,output-scalar-122-width = <0x1>;
xlnx,output-scalar-123-width = <0x1>;
xlnx,output-scalar-124-width = <0x1>;
xlnx,output-scalar-125-width = <0x1>;
xlnx,output-scalar-126-width = <0x1>;
xlnx,output-scalar-127-width = <0x1>;
xlnx,output-scalar-13-width = <0x1>;
xlnx,output-scalar-14-width = <0x1>;
xlnx,output-scalar-15-width = <0x1>;
xlnx,output-scalar-16-width = <0x1>;
xlnx,output-scalar-17-width = <0x1>;
xlnx,output-scalar-18-width = <0x1>;
xlnx,output-scalar-19-width = <0x1>;
xlnx,output-scalar-2-width = <0x1>;
xlnx,output-scalar-20-width = <0x1>;
xlnx,output-scalar-21-width = <0x1>;
xlnx,output-scalar-22-width = <0x1>;
xlnx,output-scalar-23-width = <0x1>;
xlnx,output-scalar-24-width = <0x1>;
xlnx,output-scalar-25-width = <0x1>;
xlnx,output-scalar-26-width = <0x1>;
xlnx,output-scalar-27-width = <0x1>;
xlnx,output-scalar-28-width = <0x1>;
xlnx,output-scalar-29-width = <0x1>;
xlnx,output-scalar-3-width = <0x1>;
xlnx,output-scalar-30-width = <0x1>;
xlnx,output-scalar-31-width = <0x1>;
xlnx,output-scalar-32-width = <0x1>;
xlnx,output-scalar-33-width = <0x1>;
xlnx,output-scalar-34-width = <0x1>;
xlnx,output-scalar-35-width = <0x1>;
xlnx,output-scalar-36-width = <0x1>;
xlnx,output-scalar-37-width = <0x1>;
xlnx,output-scalar-38-width = <0x1>;
xlnx,output-scalar-39-width = <0x1>;
xlnx,output-scalar-4-width = <0x1>;
xlnx,output-scalar-40-width = <0x1>;
xlnx,output-scalar-41-width = <0x1>;
xlnx,output-scalar-42-width = <0x1>;
xlnx,output-scalar-43-width = <0x1>;
xlnx,output-scalar-44-width = <0x1>;
xlnx,output-scalar-45-width = <0x1>;
xlnx,output-scalar-46-width = <0x1>;
xlnx,output-scalar-47-width = <0x1>;
xlnx,output-scalar-48-width = <0x1>;
xlnx,output-scalar-49-width = <0x1>;
xlnx,output-scalar-5-width = <0x1>;
xlnx,output-scalar-50-width = <0x1>;
xlnx,output-scalar-51-width = <0x1>;
xlnx,output-scalar-52-width = <0x1>;
xlnx,output-scalar-53-width = <0x1>;
xlnx,output-scalar-54-width = <0x1>;
xlnx,output-scalar-55-width = <0x1>;
xlnx,output-scalar-56-width = <0x1>;
xlnx,output-scalar-57-width = <0x1>;
xlnx,output-scalar-58-width = <0x1>;
xlnx,output-scalar-59-width = <0x1>;
xlnx,output-scalar-6-width = <0x1>;
xlnx,output-scalar-60-width = <0x1>;
xlnx,output-scalar-61-width = <0x1>;
xlnx,output-scalar-62-width = <0x1>;
xlnx,output-scalar-63-width = <0x1>;
xlnx,output-scalar-64-width = <0x1>;
xlnx,output-scalar-65-width = <0x1>;
xlnx,output-scalar-66-width = <0x1>;
xlnx,output-scalar-67-width = <0x1>;
xlnx,output-scalar-68-width = <0x1>;
xlnx,output-scalar-69-width = <0x1>;
xlnx,output-scalar-7-width = <0x1>;
xlnx,output-scalar-70-width = <0x1>;
xlnx,output-scalar-71-width = <0x1>;
xlnx,output-scalar-72-width = <0x1>;
xlnx,output-scalar-73-width = <0x1>;
xlnx,output-scalar-74-width = <0x1>;
xlnx,output-scalar-75-width = <0x1>;
xlnx,output-scalar-76-width = <0x1>;
xlnx,output-scalar-77-width = <0x1>;
xlnx,output-scalar-78-width = <0x1>;
xlnx,output-scalar-79-width = <0x1>;
xlnx,output-scalar-8-width = <0x1>;
xlnx,output-scalar-80-width = <0x1>;
xlnx,output-scalar-81-width = <0x1>;
xlnx,output-scalar-82-width = <0x1>;
xlnx,output-scalar-83-width = <0x1>;
xlnx,output-scalar-84-width = <0x1>;
xlnx,output-scalar-85-width = <0x1>;
xlnx,output-scalar-86-width = <0x1>;
xlnx,output-scalar-87-width = <0x1>;
xlnx,output-scalar-88-width = <0x1>;
xlnx,output-scalar-89-width = <0x1>;
xlnx,output-scalar-9-width = <0x1>;
xlnx,output-scalar-90-width = <0x1>;
xlnx,output-scalar-91-width = <0x1>;
xlnx,output-scalar-92-width = <0x1>;
xlnx,output-scalar-93-width = <0x1>;
xlnx,output-scalar-94-width = <0x1>;
xlnx,output-scalar-95-width = <0x1>;
xlnx,output-scalar-96-width = <0x1>;
xlnx,output-scalar-97-width = <0x1>;
xlnx,output-scalar-98-width = <0x1>;
xlnx,output-scalar-99-width = <0x1>;
xlnx,queue-depth = <0x10>;
};
};
};

 

但是我注意到在“mmult_accel_1_if”这个设备描述的地方有一行注释:/* This is a place holder node for a custom IP, user may need to update the entries */

是不是我需要在system-top.dts或者哪里修改这里说的“update the entries”?这个entries是指什么呢?

0 项奖励
Highlighted
Xilinx Employee
Xilinx Employee
169 次查看
注册日期: ‎06-19-2019

回复: 加速设备映射失败!Failed to map accelerator device @44a00000. Aborting

由于这个是用户自定义的IP,所以你需要自己去描述这个IP的接口。也就是注释下面的部分,你需要根据你自己IP的驱动去写。模板导入的这个我个人感觉不太正确。它将你的总线端口的每一位都当作了一个接口去描述了。

------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------
0 项奖励
Highlighted
Contributor
Contributor
159 次查看
注册日期: ‎08-29-2019

回复: 加速设备映射失败!Failed to map accelerator device @44a00000. Aborting

非常感谢,可以给我一个设备树文件描述加速函数的示例吗?我应该如何描述我的自定义加速函数IP接口?

0 项奖励