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: 
Highlighted
Observer ishahak
Observer
1,086 Views
Registered: ‎01-31-2018

Failing to access memory for generic-uio

Jump to solution

Well it looks like every problem I solve brings me directly to the next one :(

Please! If anyone has a clue, I would appreciate it so much...

--

I have declared the generic-uio for my custom IP, but am failing to access it under Linux.

 

I'm using UltraZed from Avnet with its complementary board IOCC.

I have an HDF which declares a custom IP with memory-mapped registers.

The IP is called axi2regs.

 

I have enabled the generic-uio in the bootargs, enabled Userspace io platform auto loading in the kernel, and have override the compatible field for my IP in system-user.dtsi:

  &axi2regs_0 {
    compatible = "generic-uio";
  };

 

After booting, I have these:

 

zcat /proc/config.gz | grep -i uio
CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
CONFIG_UIO_DMEM_GENIRQ=m
CONFIG_UIO_XILINX_APM=y

 

tree /proc/device-tree/amba_pl@0/axi2regs@80002000/
/proc/device-tree/amba_pl@0/axi2regs@80002000/
|-- compatible
|-- name
|-- reg
|-- xlnx,s00-axi-addr-width
`-- xlnx,s00-axi-data-width

 

# cat /proc/device-tree/amba_pl@0/axi2regs@80002000/compatible
generic-uio

 

# cat /sys/class/uio/uio0/maps/map0/addr
0x0000000080002000
# cat /sys/class/uio/uio0/maps/map0/size
0x0000000000001000
# cat /sys/class/uio/uio0/maps/map0/name
/amba_pl@0/axi2regs@80002000

 

But if I try devmem, it is become stuck for a long time and ending with an error:

# devmem 0x80002000
[ 2404.388616] INFO: rcu_sched detected stalls on CPUs/tasks:
[ 2404.394017] 2-...: (1 GPs behind) idle=5bf/140000000000000/0 softirq=5542/5543 fqs=2625
[ 2404.402168] (detected by 0, t=5252 jiffies, g=5153, c=5152, q=27)
[ 2404.408333] Task dump for CPU 2:
[ 2404.411544] devmem R running task 0 1650 1623 0x00000002
[ 2404.418575] Call trace:
[ 2404.421014] [<ffffff800808530c>] __switch_to+0x8c/0xa0
[ 2404.426128] [<ffffffc075a06f00>] 0xffffffc075a06f00

 

Please note that under u-boot there is no problem in reading the data:

ZynqMP> md 0x80002000
80002000: 00000000 00000000 25011818 3267a656 ...........%V.g2
80002010: 00000000 00000000 00000000 00000000 ................
80002020: 00000000 00000000 00000000 00000000 ................
80002030: 00000000 00000000 00000000 00000000 ................
80002040: 00000000 00000000 00000000 00000000 ................
80002050: 00000000 00000001 00000000 00000001 ................
80002060: 00000000 00000000 00000000 00000000 ................
80002070: 00000000 00000001 00000000 00000001 ................
80002080: 00000000 00000000 25011818 32ae653a ...........%:e.2

--

 

Any idea please?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Observer ishahak
Observer
1,379 Views
Registered: ‎01-31-2018

Re: Failing to access memory for generic-uio

Jump to solution

Well it took me two weeks to find the solution:

 

Had to add clk_ignore_unused to the bootargs variable...

 

0 Kudos
1 Reply
Observer ishahak
Observer
1,380 Views
Registered: ‎01-31-2018

Re: Failing to access memory for generic-uio

Jump to solution

Well it took me two weeks to find the solution:

 

Had to add clk_ignore_unused to the bootargs variable...

 

0 Kudos