cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dwilson587
Visitor
Visitor
160 Views
Registered: ‎06-19-2019

Testing UIO with Interrupt on KCU105 MicroBlaze

Jump to solution

Hello All,

In Vitis 2020.2, I am trying to test UIO with interrupts on a KCU105 MicroBlaze system by connecting a gpio interrupt to the MicroBlaze's interrupt concat, but I am having trouble getting /dev/uioN nodes to appear. Does anyone know what might prevent the uio nodes from appearing? Alternatively, has anyone worked with uio on a PetaLinux MicroBlaze system in 2020.2?

Testing Interrupt:

uio0 does not appear in /dev

root@xilinx-kcu105-2020_2:~# ls /dev/uio*
ls: /dev/uio*: No such file or directory

I don't see anything relating to gpio in /proc/interrupts

root@xilinx-kcu105-2020_2:~# cat /proc/interrupts
           CPU0
  1:      41167  interrupt-controller@41200000   0-level     timer
  3:         23  interrupt-controller@41200000   3-edge      44a00000.axi_quad_spi
  4:          0  interrupt-controller@41200000   4-edge      eth0
  6:         30  interrupt-controller@41200000   6-level     eth0
  7:          2  interrupt-controller@41200000   7-level     eth0
  9:       1684  interrupt-controller@41200000   1-edge      uartlite

 

 

Testing Setup:

To test this, I am using the Official Xilinx 2020.2 KCU105 MicroBlaze BSP as a base design and following the Zynq UltraScale UIO instructions from this xilinx wiki post

1. Modify the BSP's block design to add the interrupt port for axi_gpio_1 and connect that interrupt to microblaze_0_xlconcat, resynthesize, and export the new XSA with bitstream

BlockDesignChange.png

 

 

 

 

 

 

 

 

2. Update the hardware description from vivado

petalinux-config --get-hw-description=hardware/xilinx-kcu105-2020.2/ --silentconfig

 

 

3. Ensure the kernel is configured with uio drivers

petalinux-config -c kernel
Symbol: UIO_PDRV_GENIRQ [=y]
Type  : tristate
Prompt: Userspace I/O platform driver with generic IRQ handling
  Location:
    -> Device Drivers
      -> Userspace I/O drivers (UIO [=y])
  Defined at drivers/uio/Kconfig:29
  Depends on: UIO [=y]
  Selected by [n]:
  -- UIO_XILINX_AI_ENGINE [=n] && UIO [=y]

4. Edit $proot/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi to add "uio_pdrv_genirq.of_id=generic-uio" string to default microblaze bootargs and override axi_gpio_1's compatible string to "generic-uio"

 

 

/include/ "system-conf.dtsi"
/ {
    chosen {
        bootargs = "console=ttyUL0,115200 earlyprintk   uio_pdrv_genirq.of_id=generic-uio";
        stdout-path = "serial0:115200n8";
    };
};
  
&axi_gpio_1 {
    compatible = "generic-uio";
};

 

5. Rebuild the project

petalinux-build

 

6. Boot KCU105 over JTAG (or in QEMU)

petalinux-boot --jtag --kernel --fpga
petalinux-boot --qemu --kernel

 

7. Check for UIO builtin modules

root@xilinx-kcu105-2020_2:~# cat /lib/modules/5.4.0-xilinx-v2020.2/modules.builtin | grep uio
kernel/drivers/uio/uio.ko
kernel/drivers/uio/uio_pdrv_genirq.ko
kernel/drivers/uio/uio_dmem_genirq.ko

8. Check for updated command-line from chosen node

root@xilinx-kcu105-2020_2:~# cat /proc/cmdline
console=ttyUL0,115200 earlyprintk   uio_pdrv_genirq.of_id=generic-uio

9. Check for uio in /sys/class/uio and in /dev/

root@xilinx-kcu105-2020_2:~# ls /sys/class/uio/
root@xilinx-kcu105-2020_2:~# ls /dev/uio*
ls: /dev/uio*: No such file or directory
root@xilinx-kcu105-2020_2:~#
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
dwilson587
Visitor
Visitor
116 Views
Registered: ‎06-19-2019

It looks like this already works on the KCU105, but just not in QEMU. I had earlier assumed it would based on a ZCU102 QEMU setup that had uio nodes showing.

View solution in original post

0 Kudos
1 Reply
dwilson587
Visitor
Visitor
117 Views
Registered: ‎06-19-2019

It looks like this already works on the KCU105, but just not in QEMU. I had earlier assumed it would based on a ZCU102 QEMU setup that had uio nodes showing.

View solution in original post

0 Kudos