| 1 |
.TH "hwlocality_components_pcidisc" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*- |
| 2 |
.ad l |
| 3 |
.nh |
| 4 |
.SH NAME |
| 5 |
hwlocality_components_pcidisc \- Components and Plugins: helpers for PCI discovery |
| 6 |
.SH SYNOPSIS |
| 7 |
.br |
| 8 |
.PP |
| 9 |
.SS "Functions" |
| 10 |
|
| 11 |
.in +1c |
| 12 |
.ti -1c |
| 13 |
.RI "unsigned \fBhwloc_pcidisc_find_cap\fP (const unsigned char *config, unsigned cap)" |
| 14 |
.br |
| 15 |
.ti -1c |
| 16 |
.RI "int \fBhwloc_pcidisc_find_linkspeed\fP (const unsigned char *config, unsigned offset, float *linkspeed)" |
| 17 |
.br |
| 18 |
.ti -1c |
| 19 |
.RI "\fBhwloc_obj_type_t\fP \fBhwloc_pcidisc_check_bridge_type\fP (unsigned device_class, const unsigned char *config)" |
| 20 |
.br |
| 21 |
.ti -1c |
| 22 |
.RI "int \fBhwloc_pcidisc_find_bridge_buses\fP (unsigned domain, unsigned bus, unsigned dev, unsigned func, unsigned *secondary_busp, unsigned *subordinate_busp, const unsigned char *config)" |
| 23 |
.br |
| 24 |
.ti -1c |
| 25 |
.RI "void \fBhwloc_pcidisc_tree_insert_by_busid\fP (struct \fBhwloc_obj\fP **treep, struct \fBhwloc_obj\fP *obj)" |
| 26 |
.br |
| 27 |
.ti -1c |
| 28 |
.RI "int \fBhwloc_pcidisc_tree_attach\fP (struct hwloc_topology *topology, struct \fBhwloc_obj\fP *tree)" |
| 29 |
.br |
| 30 |
.in -1c |
| 31 |
.SH "Detailed Description" |
| 32 |
.PP |
| 33 |
|
| 34 |
.PP |
| 35 |
\fBNote\fP |
| 36 |
.RS 4 |
| 37 |
These structures and functions may change when \fBHWLOC_COMPONENT_ABI\fP is modified\&. |
| 38 |
.RE |
| 39 |
.PP |
| 40 |
|
| 41 |
.SH "Function Documentation" |
| 42 |
.PP |
| 43 |
.SS "\fBhwloc_obj_type_t\fP hwloc_pcidisc_check_bridge_type (unsigned device_class, const unsigned char * config)" |
| 44 |
|
| 45 |
.PP |
| 46 |
Return the hwloc object type (PCI device or Bridge) for the given class and configuration space\&. This function requires 16 bytes of common configuration header at the beginning of config\&. |
| 47 |
.SS "int hwloc_pcidisc_find_bridge_buses (unsigned domain, unsigned bus, unsigned dev, unsigned func, unsigned * secondary_busp, unsigned * subordinate_busp, const unsigned char * config)" |
| 48 |
|
| 49 |
.PP |
| 50 |
Fills the attributes of the given PCI bridge using the given PCI config space\&. This function requires 32 bytes of common configuration header at the beginning of config\&. |
| 51 |
|
| 52 |
.PP |
| 53 |
Returns -1 and destroys /p obj if bridge fields are invalid\&. |
| 54 |
.SS "unsigned hwloc_pcidisc_find_cap (const unsigned char * config, unsigned cap)" |
| 55 |
|
| 56 |
.PP |
| 57 |
Return the offset of the given capability in the PCI config space buffer\&. This function requires a 256-bytes config space\&. Unknown/unavailable bytes should be set to 0xff\&. |
| 58 |
.SS "int hwloc_pcidisc_find_linkspeed (const unsigned char * config, unsigned offset, float * linkspeed)" |
| 59 |
|
| 60 |
.PP |
| 61 |
Fill linkspeed by reading the PCI config space where PCI_CAP_ID_EXP is at position offset\&. Needs 20 bytes of EXP capability block starting at offset in the config space for registers up to link status\&. |
| 62 |
.SS "int hwloc_pcidisc_tree_attach (struct hwloc_topology * topology, struct \fBhwloc_obj\fP * tree)" |
| 63 |
|
| 64 |
.PP |
| 65 |
Add some hostbridges on top of the given tree of PCI objects and attach them to the topology\&. Other backends may lookup PCI objects or localities (for instance to attach OS devices) by using \fBhwloc_pci_find_by_busid()\fP or hwloc_pci_find_busid_parent()\&. |
| 66 |
.SS "void hwloc_pcidisc_tree_insert_by_busid (struct \fBhwloc_obj\fP ** treep, struct \fBhwloc_obj\fP * obj)" |
| 67 |
|
| 68 |
.PP |
| 69 |
Insert a PCI object in the given PCI tree by looking at PCI bus IDs\&. If \fRtreep\fP points to \fRNULL\fP, the new object is inserted there\&. |
| 70 |
.SH "Author" |
| 71 |
.PP |
| 72 |
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&. |