Skip to content

feat: Add support for FPGAs connected via the vfio-platform driver#783

Closed
IgnoreWarnings wants to merge 7 commits into
VILLASframework:masterfrom
IgnoreWarnings:platform
Closed

feat: Add support for FPGAs connected via the vfio-platform driver#783
IgnoreWarnings wants to merge 7 commits into
VILLASframework:masterfrom
IgnoreWarnings:platform

Conversation

@IgnoreWarnings
Copy link
Copy Markdown
Collaborator

@IgnoreWarnings IgnoreWarnings commented May 22, 2024

DO NOT MERGE!
This is a draft only to discuss and track progress. Changes will come in smaller PRs.
Integration of platform based fpgas.

Current Status:
Working:
✅ VFIO Driver binding
✅ VFIO Writing to registers / configuring devices
✅ VFIO interrupts
✅ Hardware loopback verified working

Not working:
❌ Some memorygraph mappings from host RAM (dma required) are incorrect / hardcoded. Zynq only has one master addrSpace, but needs mapping to all ram areas.

@IgnoreWarnings IgnoreWarnings marked this pull request as draft May 22, 2024 10:26
Copy link
Copy Markdown
Contributor

@stv0g stv0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a first round of review. I will need to go a bit deeper into the actual logic.

Some general things:

  • Please reformat all your changes with clang-format
  • Make sure your comments have a DCO sign-off (the CI check is failing)
  • Please try to consolitate/stash your commits in a way it makes the code easier to review. E.g. not everything into one commit, but smaller groups of changes which are logically belong together.

Comment thread .gitignore Outdated
Comment thread etc/examples/nodes/miob.conf Outdated
Comment thread etc/examples/nodes/miob.conf Outdated
Comment thread etc/examples/nodes/miob.conf Outdated
Comment thread fpga/src/platform.cpp Outdated
Comment thread fpga/scripts/bind_platform_vfio.sh Outdated
Comment thread fpga/src/platform.cpp Outdated
Comment thread fpga/src/platform.cpp Outdated
Comment thread fpga/lib/ips/zynq.cpp Outdated
Comment thread fpga/lib/ips/platform_intc.cpp Outdated
@stv0g stv0g changed the title Support Platform Bus Fpgas Add support FPGAs connected via VFIO platform drivers May 22, 2024
@n-eiling
Copy link
Copy Markdown
Member

n-eiling commented May 22, 2024

This is just a draft to track the progress. It's clear that it needs squashing, signing-off and formatting. It may also make sense to split it into multiple PRs.

@n-eiling n-eiling changed the title Add support FPGAs connected via VFIO platform drivers Add support for FPGAs connected via the vfio-platform driver May 22, 2024
@stv0g
Copy link
Copy Markdown
Contributor

stv0g commented May 23, 2024

Oh okay, sorry I did not see that this PR was a draft.

@IgnoreWarnings
Copy link
Copy Markdown
Collaborator Author

Oh okay, sorry I did not see that this PR was a draft.

I accidentally opened a PR at first and then changed to draft.
@n-eiling suggested i open a draft to track the progress and announce the feature.

Since this is work in progress, many of the changes requested are already outdated/fixed.
Please wait for the PR to comment on (smaller) issues, because many of them will be resolved till then.

@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 2 times, most recently from 5b5091e to e2cd4d8 Compare June 5, 2024 09:40
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 6 times, most recently from ef5fd45 to 45f732b Compare June 11, 2024 11:36
@IgnoreWarnings IgnoreWarnings requested a review from stv0g June 11, 2024 11:47
Comment thread common/lib/kernel/vfio_device.cpp
Comment thread etc/examples/nodes/miob.conf
Comment thread etc/examples/nodes/miob.conf Outdated
Comment thread etc/fpga/miob/fpgas.json Outdated
Comment thread etc/fpga/miob/ips.json Outdated
Comment thread fpga/lib/ips/zynq.cpp Outdated
// Save ID in card so we can create mappings later when needed (e.g. when
// allocating DMA memory in host RAM)
card->addrSpaceIdDeviceToHost =
mm.getOrCreateAddressSpace("zynq_ultra_ps_e_0/HPC0_DDR_LOW");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be hardcoded?

Comment thread fpga/scripts/bind_platform_vfio.sh Outdated
Comment thread fpga/src/CMakeLists.txt Outdated
Comment thread fpga/src/platform.cpp Outdated
Comment thread lib/nodes/fpga.cpp Outdated
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 5 times, most recently from 5d2285c to 750054c Compare January 30, 2025 17:47
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 5 times, most recently from bbaf170 to 49eaace Compare February 13, 2025 15:55
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 4 times, most recently from ce7b4e5 to d337dcb Compare February 24, 2025 15:02
@IgnoreWarnings IgnoreWarnings changed the title Add support for FPGAs connected via the vfio-platform driver feat: Add support for FPGAs connected via the vfio-platform driver Feb 24, 2025
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 3 times, most recently from feb758e to cf867dd Compare February 26, 2025 12:20
@IgnoreWarnings IgnoreWarnings force-pushed the platform branch 3 times, most recently from e967d1a to cce53cb Compare March 10, 2025 17:01
IgnoreWarnings and others added 7 commits March 20, 2025 15:59
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
@IgnoreWarnings
Copy link
Copy Markdown
Collaborator Author

Merged through individual PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request node::fpga

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants