linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sonal Santan <sonal.santan@xilinx.com>
To: <linux-kernel@vger.kernel.org>
Cc: Sonal Santan <sonals@xilinx.com>, <linux-fpga@vger.kernel.org>,
	<maxz@xilinx.com>, <lizhih@xilinx.com>, <michal.simek@xilinx.com>,
	<stefanos@xilinx.com>, <devicetree@vger.kernel.org>,
	<trix@redhat.com>, <mdf@kernel.org>
Subject: [PATCH V2 XRT Alveo 0/6] XRT Alveo driver overview
Date: Wed, 16 Dec 2020 23:50:40 -0800	[thread overview]
Message-ID: <20201217075046.28553-1-sonals@xilinx.com> (raw)


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@xilinx.com/
https://lore.kernel.org/lkml/20201128235659.24679-2-sonals@xilinx.com/

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@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-2-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-3-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-4-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-5-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-6-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-7-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-8-sonals@xilinx.com/
https://lore.kernel.org/lkml/20201129000040.24777-9-sonals@xilinx.com/

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


             reply	other threads:[~2020-12-17  7:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  7:50 Sonal Santan [this message]
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 1/6] Documentation: fpga: Add a document describing XRT Alveo drivers Sonal Santan
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 2/6] fpga: xrt: infrastructure support for xmgmt driver Sonal Santan
2020-12-21  6:41   ` kernel test robot
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 3/6] fpga: xrt: core infrastructure for xrt-lib module Sonal Santan
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 4/6] fpga: xrt: XRT Alveo management physical function driver Sonal Santan
2020-12-21  9:03   ` kernel test robot
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 5/6] fpga: xrt: platform drivers for subsystems in shell partition Sonal Santan
2020-12-17  7:50 ` [PATCH V2 XRT Alveo 6/6] fpga: xrt: Kconfig and Makefile updates for XRT drivers Sonal Santan
2020-12-17 14:55   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201217075046.28553-1-sonals@xilinx.com \
    --to=sonal.santan@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhih@xilinx.com \
    --cc=maxz@xilinx.com \
    --cc=mdf@kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=sonals@xilinx.com \
    --cc=stefanos@xilinx.com \
    --cc=trix@redhat.com \
    --subject='Re: [PATCH V2 XRT Alveo 0/6] XRT Alveo driver overview' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).