ocpidriver — command-line utility for managing the OpenCPI loadable Linux kernel module driver
The ocpidriver(1) tool controls the OpenCPI Linux kernel module driver
on an OpenCPI system:
a collection of processors that can be used together as resources for
running OpenCPI applications. Whether or not the Linux kernel module
driver is required depends on the platforms (processors and their
directly-connected hardware) enabled for use by OpenCPI during
application execution and the interconnect technology that wires them
together: the driver is necessary for access by OpenCPI to platforms
connected to a system bus (such as PCI-Express or
the Zynq FPGA subsystem) but is not needed on systems that do
not have such a bus or fabric. Developers use the ocpidriver tool
to load and control the driver when it is required for running OpenCPI on a system.
The OpenCPI Linux kernel module driver uses DMA memory for communication with platforms via the system bus. By default, Linux allocates 128KB of DMA memory for the OpenCPI Linux kernel module driver. The OpenCPI "getting started guides" for the relevant platforms attached to the system bus (for example, the ML605 Getting Started Guide and the Alst4 Getting Started Guide) describe how to reserve additional DMA memory for the driver when OpenCPI applications require it.
The verbs supported by ocpidriver are:
load
reload
status
unload
Performing these operations requires root/sudo privileges.
Using the root account, load the OpenCPI Linux kernel module driver
on a system that has the Altera Stratix IV (alst4) and Xilinx (ml605) PCI-Express
platforms installed and which has reserved an additional 128KB of DMA memory for the driver:
ocpidriver load
On success, the tool generates the following message:
Found generic reserved DMA memory on the linux boot command line and assuming it is for OpenCPI: [memmap=128M$0x1000000] Driver loaded successfully.
Now perform the command:
ocpirun --list
The output from the command is:
Available containers: # Model Platform OS OS-Version Arch Name 0 hdl ml605 PCI:0000:08:00.0 1 hdl alst4 PCI:0000:03:00.0 2 rcc centos7 linux c7 x86_64 rcc0
Unload the OpenCPI Linux kernel module driver:
ocpidriver unload
On success, the tool returns the message:
The driver module was successfully unloaded.