PDI Unique ID Compatibility
Overview
Versal PDI files carry two identifiers in the image header:
unique_id(offset0x24) identifies the PDI itself.parent_unique_id(offset0x28) identifies the base design the PDI was built against.
A reconfigurable partition is built against one specific base design,
and parent_unique_id records which. The partition is compatible
with a running base design when the partition’s parent_unique_id
matches that base design’s unique_id.
Diagnosis is therefore a matter of reading both values and comparing them.
The build log and dfx-mgr both call these identifiers UUIDs. This
page uses the image-header field names instead, because that is what
bootgen prints and what the offsets refer to.
Finding the Unique IDs
From the Yocto Build Log
PL firmware recipes that inherit meta-xilinx/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass record both identifiers while installing the firmware.
The message is a build note, so it is written to the task log rather than to the console. Search the log after a build:
$ grep "PL firmware UUID" tmp*/work/*/*/*/temp/log.do_install
NOTE: PL firmware UUID: <design>.pdi unique_id=<id> parent_unique_id=<parent-id>
The log exists only if do_install ran. A recipe restored from
sstate writes none, and the search returns nothing. Force the task
with bitbake -f -c install <recipe> and search again.
From a PDI File
Read the image header directly with bootgen. On a host, bootgen
comes from a Vitis or Vivado installation and is not on the default
PATH; inside a Yocto build it is provided by bootgen-native.
$ bootgen -arch versal -read <design>.pdi ih
Both identifiers appear in the IMAGE HEADER output, two fields to
a line, each paired with an unrelated one:
id (0x18) : 0x18700002 unique_id (0x24) : 0x9ad61dc1
parent_unique_id (0x28) : 0x7308088e function_id (0x2c) : 0x00000000
A PDI holding more than one image prints one such pair per image.
Match the -arch argument to the device family. Note that
bootgen spells these differently from SOC_FAMILY:
|
|
|---|---|
|
|
|
|
|
|
|
|
This is the same source the build log reports, so the two methods return identical values for a given PDI.
Querying a Running Target
dfx-mgr reports both identifiers and a compatibility verdict. Run
the client as root on the target:
# dfx-mgr-client -listPackage -all
The listing opens with the boot PDI’s PL identifier, in
both the default and -all views:
boot.pdi PL UUID: 657c3dde
dfx-mgr reads it once at startup, so it describes the boot
PDI rather than whatever is loaded now, and reports N/A
off Versal. It also reports N/A on Versal where the boot
PDI was built without a unique_id, which is common: the
field is then zero and no image matches.
Three columns carry the per-package values, all needing -all:
Column |
Contents |
|---|---|
|
The package’s own identifier, from the PDI metaheader on
Versal and the JSON |
|
What it was built against: the parent shell for a DFX accelerator, the boot PDI for a Versal flat design. |
|
The verdict from comparing the two. |
Pid carries one of three values:
Value |
Meaning |
|---|---|
|
The package’s |
|
Both values are present and they do not match. |
|
One or both values are absent, so no comparison was made. |
Read Parent UUID against the right reference. A DFX
accelerator’s is its shell’s own UUID, a value the listing does
not show; read it from the shell PDI. A flat design’s is the
boot.pdi PL UUID header, and is never compared: a flat base
always reports id_ok whatever the values, so check it by eye.
On Versal the listing and the offline routes therefore report the same identifiers: a base design’s come from the PDI in its directory, a partition’s from the PDI in its slot directory.
A package built for a different device can still appear in the listing.
dfx-mgr reads each metaheader with the PLM’s device ID
(IDCODE) check bypassed, and nothing in the listing marks the package
as foreign; its Pid can still read id_ok. Loading it fails,
because the PLM enforces the IDCODE check at load time and
reports XLOADER_ERR_GEN_IDCODE (0x326). That is a different
fault from id_err.
Interpreting a Mismatch
dfx-mgr does not itself stop a package load on a mismatch. It logs
one line and programs the partition anyway:
base(<base>).uid = <value> does NOT match accel(<rm>).pid = <value>
The daemon prefixes its own name, function, and line number, and prints
the values as signed decimal where the build log and bootgen use
hexadecimal, so an identifier with its top bit set prints negative. A
match prints the same line with the NOT removed.
dfx-mgr makes no comparison for a bitstream loaded directly with
dfx-mgr-client -b, and logs none. Its UUID and Parent UUID
read N/A and its Pid reads -. That includes a partial forced
with --force onto a base design dfx-mgr did not load, such as
the boot PDI. Only the PLM check below applies.
The PLM applies its own check as it loads the partition. Where
the partition’s parent identifier does not match the one the
PLM holds for the loaded parent image, it refuses the load and
reports XLOADER_ERR_INCOMPATIBLE_CHILD_IMAGE (0x353). That
check is skipped for a partition carrying no identifier of its own or
no parent identifier, and for images that are neither PL nor
AIE. On versal-net and versal-2ve-2vm it covers PL
images only. Where it is skipped the partition runs against a base
design it was not built for, which can present as wrong results or a
hang with nothing naming the cause. Read Pid before loading rather
than after.
Rebuild the partition against the base design the target runs, or load the base design the partition was built against.
To confirm the two values independently of the daemon, read them from the PDI files as described in Finding the Unique IDs.
Limitations
Versal only. Zynq-7000 and Zynq UltraScale+ bitstreams carry no image-header identifiers.
dfx-mgrstill shows the columns on Zynq UltraScale+, but fills them fromshell.jsonandaccel.json, so they describe the packaging rather than the bitstream.bootgencannot read the image header of a PDI whose metaheader is encrypted. Query the target instead; the PLM decrypts the header with the device’s own key.The build-log route covers only recipes that inherit
dfx_user_dts.bbclass, and is best effort. A PDI that is missing or unreadable produces no message rather than a build failure, and where a recipe has PDIs in more than one location only the first is reported, so an absent message is not conclusive. Read the PDI directly instead.