Application loading not working with libdfx
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c, linux
- Domain
- embedded-iot, operating-systems
Research direction
Start with the modified demo application's calls to dfx_cfg_init, dfx_cfg_load, and dfx_cfg_destroy, then compare the library's behavior with fpgautil on the Kv260/PetaLinux setup. Reproduce the hang with devmem 0xa0000000 and the repeated-load overlay error using /media/dfx-static; done means the static overlay can be loaded safely, the SysInfo register is accessible, and a second load has defined behavior.
Written by the indexing model from the issue text.
Description
Hi,
I'm trying to use this library to create an application to load different bitstreams, but I can't make it work! The hardware project I'm using has a reconfigurable partition with two reconfigurable modules. I'm using Kv260 and petalinux. I have tested this application with real hardware, and I used the fpgautil to load and remove the application, and it works well with it.
I modified the demo application to start loading only the static region of the PL, and it looks like this:
#include <stdio.h>
#include "libdfx.h"
int main()
{
int package_id_full,ret;
package_id_full = dfx_cfg_init("/media/dfx-static", 0, DFX_EXTERNAL_CONFIG_EN);
if (package_id_full < 0) return -1;
printf("dfx_cfg_init: FULL Package completed successfully\r\n");
ret = dfx_cfg_load(package_id_full);
printf("dfx_cfg_load: FULL Package completed successfully\r\n");
ret = dfx_cfg_destroy(package_id_full);
if (ret) return -1;
printf("dfx_cfg_destroy: FULL Package completed successfully\r\n");
return 0;
}
under the folder /media/dfx-static I have the following:
xilinx-kv260-starterkit-20232:/home/petalinux# ls /media/dfx-static/
dfx-static.bit.bin dfx-static_i.dtbo
The static bitstream has an AXI slave called SysInfo that I want to access.
In the console, I see the following:
xilinx-kv260-starterkit-20232:/home/petalinux# Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
Dec 22 07:10:33 xilinx-kv260-starterkit-20232 kernel: OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/SysInfo_0
xilinx-kv260-starterkit-20232:/home/petalinux#
I see the device I want to read (/symbols/SysInfo_0) was loaded correctly, but when I try to read the register like this:
xilinx-kv260-starterkit-20232:/home/petalinux# devmem 0xa0000000
- 1rst problem - This board just hangs, and I have to manually reset it.
- 2nd problem - when I try to load the application twice, I get this error:
xilinx-kv260-starterkit-20232:~$ Dec 22 07:26:50 xilinx-kv260-starterkit-20232 kernel: fpga_region region0: Region already has overlay applied.
Dec 22 07:26:50 xilinx-kv260-starterkit-20232 kernel: OF: overlay: overlay changeset pre-apply notifier error -22, target: /fpga-full
Dec 22 07:26:50 xilinx-kv260-starterkit-20232 kernel: create_overlay: Failed to create overlay (err=-22)
Shouldn't the library verify if the same overlay is already applied and remove it before applying a new one?
I removed the overlay that is loaded by default by removing the overlay, with rmdir
xilinx-kv260-starterkit-20232:/home/petalinux# rmdir /configfs/device-tree/overlays/k26-starter-kits_image_1/
Then it loads I still have the 1rst problem.
So my question is what is the difference between using fpgautil and this library?
Thanks in advance for any support provided with this issue.
- Dominant language
- C
- Stars
- 13
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Xilinx/libdfx
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
FujiNetWIFI/fujinet-lib#115 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
KalicoCrew/kalico#1012 ·
Maintainers usually reply within 1 day
-
[Fix proposed] macOS 10.9: crash on startup due to +[NSColor linkColor] (10.10+ API) in menu_macos.mmPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
joncampbell123/dosbox-x#6664 ·
Maintainers usually reply within 1 day
-
bug intrinsic low priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day