While HyperTransport configuration cycles are compatible with PCI, there are some important differences. Configuration Cycles Are Memory MappedTo generate a configuration space read or write, a HyperTransport bridge simply sends a RdSized or non-posted WrSized request using a reserved address range in the 40-bit HyperTransport memory map. This 32MB range, recognized by all devices, is shown in Figure 13-2 on page 312. Figure 13-2. Configuration Space In The HyperTransport Address Map
How The 32MB Configuration Area Is UsedThe 32MB HyperTransport memory map address space reserved for configuration cycles is used to access the 256 byte configuration space of each function in each device on each bus. How the address range is interpreted and how a particular device can recognize configuration cycles it should claim vs. those it must forward is illustrated in Figure 13-3 on page 313 and described below. Figure 13-3. Configuration Type 0 And Type 1 Request Packet Format
Upper 16 Address Bits Indicate Type 0 And Type 1 CycleAs in PCI configuration cycles, HyperTransport requires two variants of configuration read/write cycles, type 1 and type 0. The type 0 configuration is generated by a bridge when the cycle has reached the target bus (chain) where the device being accessed resides; the type 1 cycle is in transit to the target bus and should be forwarded by bridges or tunnels in the target path . The bridge to the destination bus will convert it to type 0. Because HyperTransport configuration cycles are distinguished from other read/write requests only by the fact they target the 32MB reserved configuration address range, the first problem is how to distinguish type 1 from type 0 cycles. The 32MB configuration address range is further divided into two parts : request packets carrying addresses in the upper 16MB of the range are type 1 cycles; requests with addresses in the lower 16MB are type 0 cycles. Referring to Figure 13-3 on page 313, note the following: HyperTransport Type 1 Configuration Cycle (See Figure 13-3)If a SizedRD or SizedWt request carries an address with the upper 16 bits set = FDFFh, then the cycle is a type 1 configuration request. Only bridges are allowed to accept these requests, and only if the bus number field in the address (bits 23:16) falls into the range defined by the bridges Secondary-Subordinate bus number registers. The bridge then passes the request downstream. HyperTransport Type 0 Configuration Cycle (See Figure 13-3)If a SizedRD or SizedWt request carries an address with the upper 16 bits set = FDF8h, then the cycle is a type 0 configuration request. This will be claimed by the device that also has a match when the device number field (bits 15:11) in the address matches one of its UnitIDs. It then uses the function numbe r and Dword fields to target the particular internal function and configuration space offset. No IDSEL Signal Needed In HyperTransportFinally, there is no IDSEL signal to accompany a type 0 configuration cycle in the HyperTransport protocol. The need for this signal has been eliminated because a Base UnitID field has been included in the HyperTransport advanced capability register block so that a device is programmed to "know" its UnitID number(s). This allows the device to decode its own configuration cycles rather than depending on the upstream bridge to do it with IDSEL. Example: HT Configuration Space AccessThe following diagram, Figure 13-4 on page 315, depicts the movement of a configuration request through HyperTransport chains. In the following example, assume the CPU is targeting the configuration space in HyperTransport UnitID 2 on bus 1. Figure 13-4. HyperTransport Type 1 And Type 0 Configuration Cycles
Events In HT Configuration Example (see Figure 13-4)
Initializing Bus Numbers And Unit IDsOne of the first steps in HyperTransport configuration is the initial assignment of bus numbers and UnitIDs for each device and chain in the topology. Using a depth-first search algorithm, enumeration software assigns IDs to each device it discovers; if it finds any HyperTransport bridges, it also assigns the primary, secondary, and subordinate bus numbers so that later configuration cycles may find their way to target buses other than bus 0. Case 1: A Single Chain With One Host BridgeIn a single chain with only one host bridge, enumeration is fairly simple:
Case 2: A HyperTransport Bridge Is DiscoveredIf the enumeration process on a chain encounters a HyperTransport-To-HyperTransport bridge or a bridge from HyperTransport to a compatible protocol (PCI, AGP, PCI-X), then some additional initialization is needed. A bridge is detected when a read of the Header Type field in the configuration header indicates that the device uses the type 1 header format. Software must program the device in accordance with the type 1 header format which includes:
It is permissible for a HyperTransport bridge to have more than one secondary bus and/or a tunnel interface for its primary bus. Refer to Chapter 16, entitled "HyperTransport Bridges," on page 407 for a description of type 1 bridge configuration. A Note About Bus Numbering In HyperTransportBus numbering in HyperTransport systems makes no distinction between HyperTransport, PCI, AGP, or PCI-X buses. As bridges to other protocols are discovered during enumeration, bus numbers are assigned without regard to the particular protocol. This is illustrated in Figure 13-5 on page 319. Figure 13-5. Bus Numbering In A Mixed Topology
Case 3: Initializing A Double Hosted ChainThe HyperTransport I/O Link Specification makes special provision for enumeration in double-hosted chain topologies. This case does not really have an analogy in PCI or PCI-X systems. Refer to Figure 13-6 on page 320 as the initialization of a double hosted chain is described. Figure 13-6. Bus Numbering In Double-Hosted Chains
Only One Master Host BridgeIn a double-hosted chain, one host bridge is considered the master, the other is a slave. The HyperTransport I/O Link Specification does not define the method (board strapping, etc.) by which the two bridges determine their respective roles. The specification does say that the master-slave determination must be made before reset. In Figure 13-6, the master host bridge is shown at the left; the slave host bridge is at the right. Master Bridge Initialization/Configuration SequenceAssuming the master bridge has been designated, then the events which occur through reset and into initialization are similiar to the single host bridge enumeration described above, with the following differences:
When the slave host bridge "wakes up", it will detect the Double-Ended bit set in its Command register and not initiate any configuration cycles of its own. All of the internal devices in the chain will have their Master Host bits set to point towards the master host bridge; this means that all requests they will issue will move "upstream" towards the master host bridge. Refer to Chapter 16, entitled "HyperTransport Bridges," on page 407 for a description of double-hosted chain topologies, including the method used by software to break sharing chains into non-sharing chains. |