Specifications
PCI Bus Support
13.13 Configuring a PCI Device and Loading A Driver
libr /alpha /extract=$adpdef /out=adpdef.mar sys$lib_c.tlb
The structure definition of the Bus Array is also available in [syslib]sys$lib_c.tlb.
For example:
libr /alpha /extract=busarraydef /out=busarraydef.h sys$lib_c.tlb
or
libr /alpha /extract=$busarraydef /out=busarraydef.mar sys$lib_c.tlb
You might find the .mar file easier to understand than the .h file.
Here is an example of how to traverse the ADP list to find the interrupt vector
offset for your PCI device. Note that you should first go into SYSMAN and say IO
SHOW BUS. Write down the TR number associated with the display information
of your device. Then enter the following:
$ analyze/sys
SDA> read sys$loadable_images:sysdef
SDA> format @ioc$gl_adplist
This will display all of the fields of the System ADP. Find the address in field
ADP$L_LINK. Then format that address as follows:
SDA> format addr_from_adp$l_link
This will display all of the fields of the next ADP in the ADP list. Keep following
the adp$l_link pointers until you find the ADP with a TR number that matches
the TR number you found from SYSMAN IO SHOW BUS. The TR number is
found in field ADP$L_TR. When you find the matching TR number, you have
found the PCI ADP. Note that the PCI ADP will usually be the second ADP
in the list. Once you have found the PCI ADP, get the address from ADP field
ADP$PS_BUS_ARRAY.
Note that this format does not work on the Bus Array structure. The key points
to remember about the bus array is that the header is three quadwords and each
entry is 6 quadwords. The bus array header is shown as follows:
63 32 31 0
+-----------------------------------------+
| | parent ADP | 0x0
+-----------------------------------------+
| bus type |subty|type| size | 0x8
+-----------------------------------------+
| | node count | 0x10
+-----------------------------------------+
The Bus Array entries start after the bus array header. A generic Bus Array
entry is shown as follows:
63 32 31 0
+-----------------------------------------+
| hardware id | 0x0
+-----------------------------------------+
| CSR | 0x8
+-----------------------------------------+
| flags | node number | 0x10
+-----------------------------------------+
| ADP | CRB | 0x18
+-----------------------------------------+
| ctrlltr | autoconfig | 0x20
+-----------------------------------------+
| bus_specific_h | bus_specific_l | 0x28
+-----------------------------------------+
13–12