BDF Script
This script is used by the data streams optimizer on the target system to get the device root port on the device’s BDF address.
To support Windows* OS as a target, the Intel® TCC Tools package contains an example of a modified script.
If you have a Windows* OS target with UEFI BIOS, you can use the example without modifications to run data streams optimizer.
If you have a different Windows* environment, you can copy and modify the script. The script must meet the following requirements to maintain compatibility with the data streams optimizer:
- Input: BDF address of the device on the target system as a command-line argument in the following format: BB:DD.FFwhere:
- BB – PCI Bus number in hexadecimal format, followed by a colon (:)
- DD – PCI Device number in hexadecimal format, followed by a decimal point (.)
- FF – PCI Function number in hexadecimal format
- Output: The script must only print the root port address in the format BB:DD.FF to STDOUT.
- Error handling: Any nonzero value returned from the script will be interpreted as an error. Any additional logging should be printed to STDERR.
Example:
Command line: tools/target_scripts_win/bdf_converter.py aa:00.00
STDOUT: 00:1c.00
Return value: 0
STDERR: <some debug information>
The script requires PCI Utilities to support the data streams optimizer preproduction flow.
You can download the precompiled executables for Windows* OS from
https://eternallybored.org/misc/pciutils. The precompiled binaries for x86/x64 variants are available there.
Follow these steps to apply it to an x64 Windows* OS system:
- Download the archive with executables: https://eternallybored.org/misc/pciutils/releases/pciutils-3.5.5-win64.zip.
- Extract the contents of the archive so thatlspci.exeand other executables are available at the following recommended path:C:\APPS\pciutils.
- Add the path forlspci.exeand other executables of PCI Utilities to thePATHenvironment variable, so thatlspci.execan be launched in the command-line shell with administrative privileges without specifying the full path.