ZynqMP ocpihdl load error

BP
Brian Padalino
Tue, Jun 16, 2020 6:09 PM

I am trying to load a ZynqMP FPGA image on a custom platform, and utilizing
the ocpihdl load command yields the following error:

ocpihdl load

~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz
Exiting for problem: error loading device pl:0: Error loading fpga: No
such file or directory(2)

dmesg

[  289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial
size(0)
[  293.361475] opencpi: fpga load request: addr: 0000007fa2341010 count:
26510780 device: /pcap
[  293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path: /pcap,
name: pcap, full: /pcap, mgr: fffffffffffffff0
[  293.381403] opencpi: release file(ffffffc074493c00)
inode(ffffffc0744e1d00) minor(0)

I noticed the fpga manager is different from a previous Zynq platform, and
it seems to want to see a file in /lib/firmware to load instead of writing
the entire file into /dev/xdevcfg.

I also noticed that if I unzip the file, put it into /lib/firmware, and
echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to
load just fine.  At that point, the ocpihdl get command seems to hang the
platform.

At this point I am a little stuck.  Anyone have current experience with
ZynqMP and the v1.7.0-beta.1 tag?  Am I just too early on testing this?
Any insights would be appreciated.

Thanks,
Brian

I am trying to load a ZynqMP FPGA image on a custom platform, and utilizing the ocpihdl load command yields the following error: # ocpihdl load ~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz Exiting for problem: error loading device pl:0: Error loading fpga: No such file or directory(2) # dmesg [ 289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial size(0) [ 293.361475] opencpi: fpga load request: addr: 0000007fa2341010 count: 26510780 device: /pcap [ 293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path: /pcap, name: pcap, full: /pcap, mgr: fffffffffffffff0 [ 293.381403] opencpi: release file(ffffffc074493c00) inode(ffffffc0744e1d00) minor(0) I noticed the fpga manager is different from a previous Zynq platform, and it seems to want to see a file in /lib/firmware to load instead of writing the entire file into /dev/xdevcfg. I also noticed that if I unzip the file, put it into /lib/firmware, and echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to load just fine. At that point, the ocpihdl get command seems to hang the platform. At this point I am a little stuck. Anyone have current experience with ZynqMP and the v1.7.0-beta.1 tag? Am I just too early on testing this? Any insights would be appreciated. Thanks, Brian
JK
James Kulp
Tue, Jun 16, 2020 6:30 PM

There are at least 4 different ways that Linux kernels load bitstreams.
The method varies with whether the kernel is from Xilinx or from
kernel.org and which kernel version.
It can be very confusing.
The OpenCPI user and kernel mode code tries to figure out which method
to use based on the kernel.

The error appears to be the "open firmware node" it expects to use
(/pcap) does not exist.

Where did your kernel come from and which kernel version are you using?

This code for loading zynq-ultrascale was recently tested on the 2019.2
xilinx kernel on a zcu104 dev board.

What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory?

On 6/16/20 2:09 PM, Brian Padalino wrote:

I am trying to load a ZynqMP FPGA image on a custom platform, and utilizing
the ocpihdl load command yields the following error:

# ocpihdl load

~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz
Exiting for problem: error loading device pl:0: Error loading fpga: No
such file or directory(2)
# dmesg
[  289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial
size(0)
[  293.361475] opencpi: fpga load request: addr: 0000007fa2341010 count:
26510780 device: /pcap
[  293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path: /pcap,
name: pcap, full: /pcap, mgr: fffffffffffffff0
[  293.381403] opencpi: release file(ffffffc074493c00)
inode(ffffffc0744e1d00) minor(0)

I noticed the fpga manager is different from a previous Zynq platform, and
it seems to want to see a file in /lib/firmware to load instead of writing
the entire file into /dev/xdevcfg.

I also noticed that if I unzip the file, put it into /lib/firmware, and
echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to
load just fine.  At that point, the ocpihdl get command seems to hang the
platform.

At this point I am a little stuck.  Anyone have current experience with
ZynqMP and the v1.7.0-beta.1 tag?  Am I just too early on testing this?
Any insights would be appreciated.

Thanks,
Brian

There are at least 4 different ways that Linux kernels load bitstreams. The method varies with whether the kernel is from Xilinx or from kernel.org and which kernel version. It can be very confusing. The OpenCPI user and kernel mode code tries to figure out which method to use based on the kernel. The error appears to be the "open firmware node" it expects to use (/pcap) does not exist. Where did your kernel come from and which kernel version are you using? This code for loading zynq-ultrascale was recently tested on the 2019.2 xilinx kernel on a zcu104 dev board. What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory? On 6/16/20 2:09 PM, Brian Padalino wrote: > I am trying to load a ZynqMP FPGA image on a custom platform, and utilizing > the ocpihdl load command yields the following error: > > # ocpihdl load > ~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz > Exiting for problem: error loading device pl:0: Error loading fpga: No > such file or directory(2) > # dmesg > [ 289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial > size(0) > [ 293.361475] opencpi: fpga load request: addr: 0000007fa2341010 count: > 26510780 device: /pcap > [ 293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path: /pcap, > name: pcap, full: /pcap, mgr: fffffffffffffff0 > [ 293.381403] opencpi: release file(ffffffc074493c00) > inode(ffffffc0744e1d00) minor(0) > > I noticed the fpga manager is different from a previous Zynq platform, and > it seems to want to see a file in /lib/firmware to load instead of writing > the entire file into /dev/xdevcfg. > > I also noticed that if I unzip the file, put it into /lib/firmware, and > echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to > load just fine. At that point, the ocpihdl get command seems to hang the > platform. > > At this point I am a little stuck. Anyone have current experience with > ZynqMP and the v1.7.0-beta.1 tag? Am I just too early on testing this? > Any insights would be appreciated. > > Thanks, > Brian >
JK
James Kulp
Tue, Jun 16, 2020 6:46 PM

Actually on zynq-ultrascale, the directory in question is the
/sys/bus/platform/drivers/zynqmp_fpga_manager

The current Xilinx kernel for their 2019.2 release was 4.19

The /sys/class/fpga_manager/fpga0/firmware "method" does not work on
non-Xilinx kernels, e.g. on some Ettus products.

On 6/16/20 2:30 PM, James Kulp wrote:

There are at least 4 different ways that Linux kernels load bitstreams.
The method varies with whether the kernel is from Xilinx or from
kernel.org and which kernel version.
It can be very confusing.
The OpenCPI user and kernel mode code tries to figure out which method
to use based on the kernel.

The error appears to be the "open firmware node" it expects to use
(/pcap) does not exist.

Where did your kernel come from and which kernel version are you using?

This code for loading zynq-ultrascale was recently tested on the
2019.2 xilinx kernel on a zcu104 dev board.

What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory?

On 6/16/20 2:09 PM, Brian Padalino wrote:

I am trying to load a ZynqMP FPGA image on a custom platform, and
utilizing
the ocpihdl load command yields the following error:

   # ocpihdl load
~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz

   Exiting for problem: error loading device pl:0: Error loading
fpga: No
such file or directory(2)
   # dmesg
   [  289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial
size(0)
   [  293.361475] opencpi: fpga load request: addr: 0000007fa2341010
count:
26510780 device: /pcap
   [  293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path:
/pcap,
name: pcap, full: /pcap, mgr: fffffffffffffff0
   [  293.381403] opencpi: release file(ffffffc074493c00)
inode(ffffffc0744e1d00) minor(0)

I noticed the fpga manager is different from a previous Zynq
platform, and
it seems to want to see a file in /lib/firmware to load instead of
writing
the entire file into /dev/xdevcfg.

I also noticed that if I unzip the file, put it into /lib/firmware, and
echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to
load just fine.  At that point, the ocpihdl get command seems to hang
the
platform.

At this point I am a little stuck.  Anyone have current experience with
ZynqMP and the v1.7.0-beta.1 tag?  Am I just too early on testing this?
Any insights would be appreciated.

Thanks,
Brian

Actually on zynq-ultrascale, the directory in question is the /sys/bus/platform/drivers/zynqmp_fpga_manager The current Xilinx kernel for their 2019.2 release was 4.19 The /sys/class/fpga_manager/fpga0/firmware "method" does not work on non-Xilinx kernels, e.g. on some Ettus products. On 6/16/20 2:30 PM, James Kulp wrote: > There are at least 4 different ways that Linux kernels load bitstreams. > The method varies with whether the kernel is from Xilinx or from > kernel.org and which kernel version. > It can be very confusing. > The OpenCPI user and kernel mode code tries to figure out which method > to use based on the kernel. > > The error appears to be the "open firmware node" it expects to use > (/pcap) does not exist. > > Where did your kernel come from and which kernel version are you using? > > This code for loading zynq-ultrascale was recently tested on the > 2019.2 xilinx kernel on a zcu104 dev board. > > What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory? > > > > > > > > On 6/16/20 2:09 PM, Brian Padalino wrote: >> I am trying to load a ZynqMP FPGA image on a custom platform, and >> utilizing >> the ocpihdl load command yields the following error: >> >>    # ocpihdl load >> ~/opencpi/aarch64/artifacts/ocpi.assets.fsk_filerw_platform_base.hdl.0.platform.gz >> >>    Exiting for problem: error loading device pl:0: Error loading >> fpga: No >> such file or directory(2) >>    # dmesg >>    [  289.802745] opencpi: open file(ffffffc074493c00) minor(0) initial >> size(0) >>    [  293.361475] opencpi: fpga load request: addr: 0000007fa2341010 >> count: >> 26510780 device: /pcap >>    [  293.369923] opencpi: load fpga node: ffffffc077fcd7f0, path: >> /pcap, >> name: pcap, full: /pcap, mgr: fffffffffffffff0 >>    [  293.381403] opencpi: release file(ffffffc074493c00) >> inode(ffffffc0744e1d00) minor(0) >> >> I noticed the fpga manager is different from a previous Zynq >> platform, and >> it seems to want to see a file in /lib/firmware to load instead of >> writing >> the entire file into /dev/xdevcfg. >> >> I also noticed that if I unzip the file, put it into /lib/firmware, and >> echo the filename to /sys/class/fpga_manager/fpga0/firmware, it seems to >> load just fine.  At that point, the ocpihdl get command seems to hang >> the >> platform. >> >> At this point I am a little stuck.  Anyone have current experience with >> ZynqMP and the v1.7.0-beta.1 tag?  Am I just too early on testing this? >> Any insights would be appreciated. >> >> Thanks, >> Brian >>
BP
Brian Padalino
Tue, Jun 16, 2020 6:56 PM

On Tue, Jun 16, 2020 at 2:46 PM James Kulp jek@parera.com wrote:

Actually on zynq-ultrascale, the directory in question is the
/sys/bus/platform/drivers/zynqmp_fpga_manager

Ah, OK.  I see that entry.

The current Xilinx kernel for their 2019.2 release was 4.19

This is based on 4.9.0 2017.2 - is this too old to be appropriately
supported?

The /sys/class/fpga_manager/fpga0/firmware "method" does not work on
non-Xilinx kernels, e.g. on some Ettus products.

Interesting.  Thanks for that information.

Brian

On Tue, Jun 16, 2020 at 2:46 PM James Kulp <jek@parera.com> wrote: > Actually on zynq-ultrascale, the directory in question is the > /sys/bus/platform/drivers/zynqmp_fpga_manager > Ah, OK. I see that entry. > > The current Xilinx kernel for their 2019.2 release was 4.19 > This is based on 4.9.0 2017.2 - is this too old to be appropriately supported? > > The /sys/class/fpga_manager/fpga0/firmware "method" does not work on > non-Xilinx kernels, e.g. on some Ettus products. > Interesting. Thanks for that information. Brian
BP
Brian Padalino
Tue, Jun 16, 2020 6:57 PM

On Tue, Jun 16, 2020 at 2:31 PM James Kulp jek@parera.com wrote:

There are at least 4 different ways that Linux kernels load bitstreams.
The method varies with whether the kernel is from Xilinx or from
kernel.org and which kernel version.
It can be very confusing.
The OpenCPI user and kernel mode code tries to figure out which method
to use based on the kernel.

The error appears to be the "open firmware node" it expects to use
(/pcap) does not exist.

Where did your kernel come from and which kernel version are you using?

4.9.0-xilinx-v2017.2

This code for loading zynq-ultrascale was recently tested on the 2019.2
xilinx kernel on a zcu104 dev board.

What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory?

/sys/bus/platform/drivers/zynqmp_fpga_manager# ls -l
--w-------    1 root    root          4096 Jun 16 18:55 bind
lrwxrwxrwx    1 root    root            0 Jun 16 18:55 pcap ->
../../../../devices/platform/pcap
--w-------    1 root    root          4096 Jun 16 18:19 uevent
--w-------    1 root    root          4096 Jun 16 18:55 unbind

Brian

On Tue, Jun 16, 2020 at 2:31 PM James Kulp <jek@parera.com> wrote: > There are at least 4 different ways that Linux kernels load bitstreams. > The method varies with whether the kernel is from Xilinx or from > kernel.org and which kernel version. > It can be very confusing. > The OpenCPI user and kernel mode code tries to figure out which method > to use based on the kernel. > > The error appears to be the "open firmware node" it expects to use > (/pcap) does not exist. > > Where did your kernel come from and which kernel version are you using? > 4.9.0-xilinx-v2017.2 > > This code for loading zynq-ultrascale was recently tested on the 2019.2 > xilinx kernel on a zcu104 dev board. > > What is in your /sys/bus/platform/drivers/zynq_fpga_manager directory? > /sys/bus/platform/drivers/zynqmp_fpga_manager# ls -l --w------- 1 root root 4096 Jun 16 18:55 bind lrwxrwxrwx 1 root root 0 Jun 16 18:55 pcap -> ../../../../devices/platform/pcap --w------- 1 root root 4096 Jun 16 18:19 uevent --w------- 1 root root 4096 Jun 16 18:55 unbind Brian