On Wed, Jan 18, 2023 at 08:36:02PM -0500, Tianfei Zhang wrote: > +=========================== > +FPGA Hotplug Manager Driver > +=========================== > + > +Authors: > + > +- Tianfei Zhang > + > +There are some board managements for PCIe-based FPGA card like burning the entire > +image, loading a new FPGA image or BMC firmware in FPGA deployment of data center > +or cloud. For example, loading a new FPGA image, the driver needs to remove all of > +PCI devices like PFs/VFs and as well as any other types of devices (platform, etc.) > +defined within the FPGA. After triggering the image load of the FPGA card via BMC, > +the driver reconfigures the PCI bus. The FPGA Hotplug Manager (fpgahp) driver manages > +those devices and functions leveraging the PCI hotplug framework to deal with the > +reconfiguration of the PCI bus and removal/probe of PCI devices below the FPGA card. > + > +This fpgahp driver adds 2 new callbacks to extend the hotplug mechanism to > +allow selecting and loading a new FPGA image. > + > + - available_images: Optional: called to return the available images of a FPGA card. > + - image_load: Optional: called to load a new image for a FPGA card. > + > +In general, the fpgahp driver provides some sysfs files:: > + > + /sys/bus/pci/slots//available_images > + /sys/bus/pci/slots//image_load The doc reads a rather confused to me, so I have to make wording improv: ---- >8 ---- diff --git a/Documentation/fpga/fpgahp.rst b/Documentation/fpga/fpgahp.rst index 3ec34bbffde10c..73f1b53de1cf85 100644 --- a/Documentation/fpga/fpgahp.rst +++ b/Documentation/fpga/fpgahp.rst @@ -8,22 +8,22 @@ Authors: - Tianfei Zhang -There are some board managements for PCIe-based FPGA card like burning the entire -image, loading a new FPGA image or BMC firmware in FPGA deployment of data center -or cloud. For example, loading a new FPGA image, the driver needs to remove all of -PCI devices like PFs/VFs and as well as any other types of devices (platform, etc.) -defined within the FPGA. After triggering the image load of the FPGA card via BMC, -the driver reconfigures the PCI bus. The FPGA Hotplug Manager (fpgahp) driver manages -those devices and functions leveraging the PCI hotplug framework to deal with the -reconfiguration of the PCI bus and removal/probe of PCI devices below the FPGA card. -This fpgahp driver adds 2 new callbacks to extend the hotplug mechanism to -allow selecting and loading a new FPGA image. +The FPGA Hotplug Manager (fpgahp) manages PCIe-based FPGA card devices. +The PCI bus reconfiguration and device probe for devices below the FPGA +card are done by leveraging the PCI hotplug framework. - - available_images: Optional: called to return the available images of a FPGA card. - - image_load: Optional: called to load a new image for a FPGA card. +The driver can be helpful in device management tasks like burning the entire +image and loading a new FPGA image or BMC firmware in FPGA deployment of data +center or cloud. For example, when loading the image, the driver needs to +remove all of PCI devices like PFs/VFs and as well as any other types of +devices (platform, etc.) defined within the FPGA. After triggering the image +load of the FPGA card via BMC, the driver reconfigures the appropriate PCI bus. -In general, the fpgahp driver provides some sysfs files:: +The driver adds 2 new sysfs callbacks to extend the hotplug mechanism to +allow selecting and loading a new FPGA image: + + - ``/sys/bus/pci/slots//available_images``: list available images for + a FPGA card. + - ``/sys/bus/pci/slots//image_load``: load the image. - /sys/bus/pci/slots//available_images - /sys/bus/pci/slots//image_load Thanks. -- An old man doll... just what I always wanted! - Clara