XilLoader - 2020.2 English

Versal ACAP System Software Developers Guide (UG1304)

Document ID
UG1304
Release Date
2020-11-24
Version
2020.2 English

The PDI contains all the images that must be loaded into the system. PLM reads the PDI from the boot device and loads the images to the respective memories based on the image header.

Note: For more details on the PDI format, see the PDI section in Boot and Configuration.

The XilLoader provides an interface for the modules to load/start/look up the images present in the PDI. XilLoader also interacts with XilSecure (for secure boot), XilPM (for subsystem bring up), and boot drivers (for boot).

The following XilLoader functions are available:

XLoader_LoadAndStartSubSystemPdi
This function takes PDI pointer as input. This API is called to load the images present in the PDI image, and start the subsystem based on the hand-off information present in the PDI. Based on the Image and Partition information present in the PDI, this API reads and loads each image partition from the PDI source. The API checks if the image requires hand-off and calls the XilPM APIs to perform the handoff.

The image can be a CDO partition or the subsystem image. If the image is a CDO partition, the API calls the CDO parser API from the PLMI. If the image is a subsystem executable partition, the API loads the partition to the respective subsystem’s memory. After loading the image, this API reads the CPI ID and hand-off address from the PDI, and calls the XilPM APIs with this information. If there is any error while loading or starting the image, this API returns the appropriate error code. Otherwise, this API returns SUCCESS.

XLoader_RestartImage
Each image has its own unique ID in the PDI. This function takes the Image ID as input to identify image in the PDI and restart it. Based on the Image ID, this API parses through the subsystem information stored during boot, and obtains the image number and the partition number that is present in the PDI. This API then reads the Image partitions and loads them. In addition, this API checks if the image requires hand-off, and calls the XilPM APIs accordingly. If there is any error while restarting the image, the API returns an appropriate error code. Otherwise, the API returns SUCCESS.

Sequence of Operations

The following is the sequence of operations that happen between the loader and other components.

  1. Based on the boot mode, the corresponding flash drivers are used to read the PDI.
  2. Based on the image headers, the loader gets the CPU details for an image.
  3. The loader uses the XilPlmi API for loading CDOs, and the XilPM API to start/stop the processors, and to initialize memory.
  4. The loader uses XilSecure to perform checksum, authentication, or decryption on the image.

Boot Drivers

XilLoader implements the following high-level boot device interface APIs that are called to initialize the boot device, and to load the images from the boot device to the corresponding subsystem memory. These APIs internally call the driver APIs as required.

Flash Drivers
QSPI, OSPI, SD/eMMC drivers are used to read the images from the flash device.
PMC DMA
APIs for PMC DMA related functionality.