Saturday, December 19, 2009

Memorize Your Identity



[ Team LiB ]





Memorize Your Identity


General


Whenever a function initiates a transaction as a requester, it must supply its Requester ID in the packet's header. Likewise, when a function initiates a transaction as a Completer, it must supply its Completer ID in the packet header. Both of these IDs are comprised of the Bus Number, Device Number and Function Number.


The function "knows" which function number it is within its device, but how does it know the device it resides within and what bus it resides on?


Each time that the source bridge for a bus initiates a type 0 configuration write transaction (see Figure 21-14 on page 764), it supplies the targeted function with the bus number from its Secondary Bus Number register and the number of the device that the function resides within. The function is required to save this information for use in forming its IDs when it initiates a transaction as either a Requester or as a Completer. The information is not saved in program readable registers but rather in a function-specific manner.


Figure 21-14. Type 0 Configuration Write Request Packet Header


A hot-plug event such as the installation or the removal of a device can cause the enumeration software to re-assign bus numbers in a portion of the bus hierarchy. If and when this should occur, the enumeration software is required to perform a configuration write to at least one register (any register) within each function in each device that resides on a bus that has received a new number. In this manner, each function on the bus is provided with the new bus number (as well as its device number) to be used in their respective IDs.


Root Complex Bus Number/Device Number Assignment


The manner in which the bus number and device number are assigned to functions residing on the internal bus of a Root Complex is design-specific.


Initiating Requests Prior To ID Assignment


Before the first type 0 configuration write is performed to a function, it does not know the bus number and device number portion of its ID. While it remains in this state, a function is not permitted to initiate non-posted requests (memory write requests and message requests). There is one exception:


  • Functions within a Root Complex are permitted to initiate requests for accesses to system boot device(s).


Initiating Completions Prior to ID Assignment


If a function must generate a Completion before the first type 0 configuration write is performed to it, the Bus Number and Device Number fields in its Completer ID must be set to zeros. The Request issuer (the Requester) must ignore the value returned in the Completer ID field.





    [ Team LiB ]



    No comments: