Skip to content

Commit

Permalink
[SWDEV-501108] Update Doxygen note on rsmi_dev_pci_id_get
Browse files Browse the repository at this point in the history
- To address #208
where use of fake BDFs for partitions can cause confusion. This note
is already in the comments of the function definition, but was not
updated in the function declaration.
- Fix broken formatting for the location table for PCIE coordinate fields
- Tracked in SWDEV-501108

Change-Id: Ic85439866cb836bb43acc52314a7f1d026c3215d
  • Loading branch information
James Xu authored and dmitrii-galantsev committed Jan 14, 2025
1 parent bb122ef commit 67a0de4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions include/rocm_smi/rocm_smi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,8 @@ rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth);
* BDFID = ((DOMAIN & 0xFFFFFFFF) << 32) | ((Partition & 0xF) << 28)
* | ((BUS & 0xFF) << 8) | ((DEVICE & 0x1F) <<3 )
* | (FUNCTION & 0x7)
*
*
* \code{.unparsed}
* | Name | Field | KFD property KFD -> PCIe ID (uint64_t)
* -------------- | ------- | ---------------- | ---------------------------- |
* | Domain | [63:32] | "domain" | (DOMAIN & 0xFFFFFFFF) << 32 |
Expand All @@ -1835,7 +1836,16 @@ rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth);
* | Bus | [15: 8] | "location id" | (LOCATION & 0xFF00) |
* | Device | [ 7: 3] | "location id" | (LOCATION & 0xF8) |
* | Function | [ 2: 0] | "location id" | (LOCATION & 0x7) |
*
* \endcode
*
* Note: In some devices, the partition ID may be stored in the function bits
* BDFID[2:0] instead of BDFID[31:28].
*
* Note: For MI series devices, the function bits are only used to store the
* partition ID, but this modified BDF is internal to the ROCm stack.
* To the OS, partitions share the same BDF as the unpartitioned device and
* have function bits = 0, which can be verified through lspci.
*
* @param[in] dv_ind a device index
*
* @param[inout] bdfid a pointer to uint64_t to which the device bdfid value
Expand Down

0 comments on commit 67a0de4

Please sign in to comment.