[PATCH V2 XRT Alveo 0/6] XRT Alveo driver overview

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

This is V2 of patch series which adds management physical function driver
for Xilinx Alveo PCIe accelerator cards,
https://www.xilinx.com/products/boards-and-kits/alveo.html
This driver is part of Xilinx Runtime (XRT) open source stack.

The patch series depends on libfdt patches which were posted before:
https://lore.kernel.org/lkml/20201128235659.24679-1-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201128235659.24679-2-sonals@xxxxxxxxxx/

ALVEO PLATFORM ARCHITECTURE

Alveo PCIe FPGA based platforms have a static *shell* partition and a partial
re-configurable *user* partition. The shell partition is automatically loaded from
flash when host is booted and PCIe is enumerated by BIOS. Shell cannot be changed
till the next cold reboot. The shell exposes two PCIe physical functions:

1. management physical function
2. user physical function

The patch series includes Documentation/xrt.rst which describes Alveo
platform, XRT driver architecture and deployment model in more detail.

Users compile their high level design in C/C++/OpenCL or RTL into FPGA image
using Vitis https://www.xilinx.com/products/design-tools/vitis/vitis-platform.html
tools. The compiled image is packaged as xclbin and contains partial bitstream
for the user partition and necessary metadata. Users can dynamically swap the
image running on the user partition in order to switch between different workloads.

XRT DRIVERS FOR ALVEO

XRT Linux kernel driver *xmgmt* binds to management physical function of
Alveo platform. The modular driver framework is organized into several
platform drivers which primarily handle the following functionality:

1.  Loading firmware container also called xsabin at driver attach time
2.  Loading of user compiled xclbin with FPGA Manager integration
3.  Clock scaling of image running on user partition
4.  In-band sensors: temp, voltage, power, etc.
5.  Device reset and rescan
6.  Flash upgrade of static *shell* partition

The platform drivers are packaged into *xrt-lib* helper module with a well
defined interfaces the details of which can be found in Documentation/xrt.rst.

User physical function driver is not included in this patch series.

TESTING AND VALIDATION

xmgmt driver can be tested with full XRT open source stack which includes
user space libraries, board utilities and (out of tree) first generation
user physical function driver xocl. XRT open source runtime stack is
available at https://github.com/Xilinx/XRT

Complete documentation for XRT open source stack including sections on
Alveo/XRT security and platform architecture can be found here:
https://xilinx.github.io/XRT/master/html/index.html
https://xilinx.github.io/XRT/master/html/security.html
https://xilinx.github.io/XRT/master/html/platforms_partitions.html

Changes since v1:
- Updated the driver to use fpga_region and fpga_bridge for FPGA
  programming
- Dropped subdev drivers not related to PR programming to focus on XRT
  core framework
- Updated Documentation/fpga/xrt.rst with information on XRT core framework
- Addressed checkpatch issues 
- Dropped xrt- prefix from some header files

For reference V1 version of patch series can be found here--
https://lore.kernel.org/lkml/20201129000040.24777-1-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-2-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-3-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-4-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-5-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-6-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-7-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-8-sonals@xxxxxxxxxx/
https://lore.kernel.org/lkml/20201129000040.24777-9-sonals@xxxxxxxxxx/

Thanks,
-Sonal

Sonal Santan (6):
  Documentation: fpga: Add a document describing XRT Alveo drivers
  fpga: xrt: infrastructure support for xmgmt driver
  fpga: xrt: core infrastructure for xrt-lib module
  fpga: xrt: XRT Alveo management physical function driver
  fpga: xrt: platform drivers for subsystems in shell partition
  fpga: xrt: Kconfig and Makefile updates for XRT drivers

 Documentation/fpga/index.rst                 |    1 +
 Documentation/fpga/xrt.rst                   |  649 +++++++++++
 drivers/fpga/Kconfig                         |    2 +
 drivers/fpga/Makefile                        |    4 +
 drivers/fpga/xrt/Kconfig                     |    7 +
 drivers/fpga/xrt/Makefile                    |   21 +
 drivers/fpga/xrt/common/xrt-metadata.c       |  590 ++++++++++
 drivers/fpga/xrt/common/xrt-root.c           |  737 +++++++++++++
 drivers/fpga/xrt/common/xrt-root.h           |   26 +
 drivers/fpga/xrt/common/xrt-xclbin.c         |  387 +++++++
 drivers/fpga/xrt/common/xrt-xclbin.h         |   48 +
 drivers/fpga/xrt/include/metadata.h          |  184 ++++
 drivers/fpga/xrt/include/parent.h            |  103 ++
 drivers/fpga/xrt/include/partition.h         |   33 +
 drivers/fpga/xrt/include/subdev.h            |  333 ++++++
 drivers/fpga/xrt/include/subdev/axigate.h    |   31 +
 drivers/fpga/xrt/include/subdev/calib.h      |   28 +
 drivers/fpga/xrt/include/subdev/clkfreq.h    |   21 +
 drivers/fpga/xrt/include/subdev/clock.h      |   29 +
 drivers/fpga/xrt/include/subdev/gpio.h       |   41 +
 drivers/fpga/xrt/include/subdev/icap.h       |   27 +
 drivers/fpga/xrt/include/subdev/ucs.h        |   22 +
 drivers/fpga/xrt/include/xmgmt-main.h        |   34 +
 drivers/fpga/xrt/lib/Kconfig                 |   11 +
 drivers/fpga/xrt/lib/Makefile                |   30 +
 drivers/fpga/xrt/lib/subdevs/xrt-axigate.c   |  298 ++++++
 drivers/fpga/xrt/lib/subdevs/xrt-calib.c     |  226 ++++
 drivers/fpga/xrt/lib/subdevs/xrt-clkfreq.c   |  214 ++++
 drivers/fpga/xrt/lib/subdevs/xrt-clock.c     |  638 +++++++++++
 drivers/fpga/xrt/lib/subdevs/xrt-gpio.c      |  198 ++++
 drivers/fpga/xrt/lib/subdevs/xrt-icap.c      |  306 ++++++
 drivers/fpga/xrt/lib/subdevs/xrt-partition.c |  261 +++++
 drivers/fpga/xrt/lib/subdevs/xrt-ucs.c       |  238 +++++
 drivers/fpga/xrt/lib/subdevs/xrt-vsec.c      |  337 ++++++
 drivers/fpga/xrt/lib/xrt-cdev.c              |  234 ++++
 drivers/fpga/xrt/lib/xrt-main.c              |  270 +++++
 drivers/fpga/xrt/lib/xrt-main.h              |   46 +
 drivers/fpga/xrt/lib/xrt-subdev.c            | 1007 ++++++++++++++++++
 drivers/fpga/xrt/mgmt/Kconfig                |   11 +
 drivers/fpga/xrt/mgmt/Makefile               |   27 +
 drivers/fpga/xrt/mgmt/xmgmt-fmgr-drv.c       |  179 ++++
 drivers/fpga/xrt/mgmt/xmgmt-fmgr.h           |   29 +
 drivers/fpga/xrt/mgmt/xmgmt-main-impl.h      |   35 +
 drivers/fpga/xrt/mgmt/xmgmt-main-region.c    |  476 +++++++++
 drivers/fpga/xrt/mgmt/xmgmt-main.c           |  738 +++++++++++++
 drivers/fpga/xrt/mgmt/xmgmt-root.c           |  375 +++++++
 include/uapi/linux/xrt/xclbin.h              |  386 +++++++
 include/uapi/linux/xrt/xmgmt-ioctl.h         |   72 ++
 48 files changed, 10000 insertions(+)
 create mode 100644 Documentation/fpga/xrt.rst
 create mode 100644 drivers/fpga/xrt/Kconfig
 create mode 100644 drivers/fpga/xrt/Makefile
 create mode 100644 drivers/fpga/xrt/common/xrt-metadata.c
 create mode 100644 drivers/fpga/xrt/common/xrt-root.c
 create mode 100644 drivers/fpga/xrt/common/xrt-root.h
 create mode 100644 drivers/fpga/xrt/common/xrt-xclbin.c
 create mode 100644 drivers/fpga/xrt/common/xrt-xclbin.h
 create mode 100644 drivers/fpga/xrt/include/metadata.h
 create mode 100644 drivers/fpga/xrt/include/parent.h
 create mode 100644 drivers/fpga/xrt/include/partition.h
 create mode 100644 drivers/fpga/xrt/include/subdev.h
 create mode 100644 drivers/fpga/xrt/include/subdev/axigate.h
 create mode 100644 drivers/fpga/xrt/include/subdev/calib.h
 create mode 100644 drivers/fpga/xrt/include/subdev/clkfreq.h
 create mode 100644 drivers/fpga/xrt/include/subdev/clock.h
 create mode 100644 drivers/fpga/xrt/include/subdev/gpio.h
 create mode 100644 drivers/fpga/xrt/include/subdev/icap.h
 create mode 100644 drivers/fpga/xrt/include/subdev/ucs.h
 create mode 100644 drivers/fpga/xrt/include/xmgmt-main.h
 create mode 100644 drivers/fpga/xrt/lib/Kconfig
 create mode 100644 drivers/fpga/xrt/lib/Makefile
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-axigate.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-calib.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-clkfreq.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-clock.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-gpio.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-icap.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-partition.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-ucs.c
 create mode 100644 drivers/fpga/xrt/lib/subdevs/xrt-vsec.c
 create mode 100644 drivers/fpga/xrt/lib/xrt-cdev.c
 create mode 100644 drivers/fpga/xrt/lib/xrt-main.c
 create mode 100644 drivers/fpga/xrt/lib/xrt-main.h
 create mode 100644 drivers/fpga/xrt/lib/xrt-subdev.c
 create mode 100644 drivers/fpga/xrt/mgmt/Kconfig
 create mode 100644 drivers/fpga/xrt/mgmt/Makefile
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-fmgr-drv.c
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-fmgr.h
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-main-impl.h
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-main-region.c
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-main.c
 create mode 100644 drivers/fpga/xrt/mgmt/xmgmt-root.c
 create mode 100644 include/uapi/linux/xrt/xclbin.h
 create mode 100644 include/uapi/linux/xrt/xmgmt-ioctl.h

-- 
2.17.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux