Back to EveryPatent.com



United States Patent 5,761,461
Neal ,   et al. June 2, 1998

Method and system for preventing peripheral component interconnect (PCI) peer-to-peer access across multiple PCI host bridges within a data processing system

Abstract

A method for preventing peer-to-peer access across separate Peripheral Component Interconnect (PCI) host bridges within a data-processing system is described. In accordance with the method and system of the present invention, during an access request from a PCI device, a first determination is made as to whether or not the access request is for a system memory attached to a system bus. In response to a determination that the access request is not for a system memory attached to the system bus, another determination is made as to whether or not the access request is for a PCI device under the same PCI host bridge as the requesting PCI device. In response to a determination that the access request is not for a PCI device under the same PCI host bridge as the requesting PCI device, denying the access request such that a PCI peer-to-peer access across separate PCI host bridges within a data processing system is prevented.


Inventors: Neal; Danny Marvin (Round Rock, TX); Thurber; Steven Mark (Austin, TX)
Assignee: International Business Machines Corporation (Armonk, NY)
Appl. No.: 766735
Filed: December 13, 1996

Current U.S. Class: 710/306; 710/100
Intern'l Class: G06F 013/42; G06F 013/00
Field of Search: 395/280,285,306,308,309,287,288


References Cited
U.S. Patent Documents
5379384Jan., 1995Solomon395/325.
5446869Aug., 1995Padgett et al.395/500.
5471590Nov., 1995Melo et al.395/288.
5502824Mar., 1996Heil395/293.
5507002Apr., 1996Heil395/828.
5522050May., 1996Amini et al.395/306.
5557758Sep., 1996Bland et al.395/308.
5621902Apr., 1997Cases et al.395/309.
5632021May., 1997Jennings et al.395/309.
5664124Sep., 1997Katz et al.395/309.
5673399Sep., 1997Guthrie et al.395/308.
5692219Nov., 1997Chan et al.395/869.
5696949Dec., 1997Young395/551.

Primary Examiner: Ray; Gopal C.
Attorney, Agent or Firm: Henkler; Richard A., Ng; Antony P., Dillon; Andrew J.

Claims



What is claimed is:

1. A method for preventing peer-to-peer access across separate Peripheral Component Interconnect (PCI) host bridges within a data processing system, said method comprising the steps of:

determining whether or not an access request from a PCI device is for a system memory attached to a system bus;

in response to a determination that an access request is not for a system memory attached to a system bus, determining whether or not said access request is for a PCI device under a same PCI host bridge as said requesting PCI device; and

in response to a determination that said access request is not for a PCI device under a same PCI host bridge as said requesting PCI device, denying said access request such that a PCI peer-to-peer access across separate PCI host bridges within said data processing system is prevented.

2. The method for preventing peer-to-peer access across separate PCI host bridges within a data processing system according to claim 1, wherein said method further includes a step of performing a normal transaction in accordance with the PCI Local Bus Specification, in response to a determination that an access request is for a system memory attached to a system bus.

3. The method for preventing peer-to-peer access across separate PCI host bridges within a data processing system according to Claim 1, wherein said method further includes a step of performing a normal transaction in accordance with the PCI Local Bus Specification, in response to a determination that an access request is for a PCI device under a same PCI host bridge as said requesting PCI device.

4. The method for preventing peer-to-peer access across separate PCI host bridges within a data processing system according to claim 1, wherein said step of determining whether or not an access request from a PCI device is for a system memory attached to a system bus is performed by utilizing a top-of-system-memory register.

5. The method for preventing peer-to-peer access across separate PCI host bridges within a data processing system according to claim 1, wherein said denying step further includes a step of performing a target-abort to said access request.

6. The method for preventing peer-to-peer access across separate PCI host bridges within a data processing system according to claim 1, wherein said denying step further includes a step of ignoring said access request without claiming a cycle.

7. A computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges, said computer system comprising:

means for determining whether or not an access request from a PCI device is for a system memory attached to a system bus;

means for determining whether or not said access request is for a PCI device under a same PCI host bridge as said requesting PCI device, in response to a determination that an access request is not for a system memory attached to a system bus; and

means for denying said access request, in response to a determination that said access request is not for a PCI device under a same PCI host bridge as said requesting PCI device, such that a PCI peer-to-peer access across separate PCI host bridges within said computer system is prevented.

8. The computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges according to claim 7, wherein said computer system further includes a means for performing a normal transaction in accordance with the PCI Local Bus Specification, in response to a determination that an access request is for a system memory attached to a system bus.

9. The computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges according to claim 7, wherein said computer system further includes a means for performing a normal transaction in accordance with the PCI Local Bus Specification, in response to a determination that an access request is for a PCI device under a same PCI host bridge as said requesting PCI device.

10. The computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges according to claim 7, wherein said means for determining whether or not an access request from a PCI device is for a system memory attached to a system bus further includes a top-of-system-memory register.

11. The computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges according to claim 7, wherein said means for denying further includes a means for performing a target-abort to said access request.

12. The computer system having an architecture for preventing peer-to-peer access across separate PCI host bridges according to claim 7, wherein said means for denying further includes a means for ignoring said access request without claiming a cycle.
Description



CROSS-REFERENCE TO A RELATED APPLICATION

The present invention is related to the subject matter of a co-pending United States Patent Application entitled "Method and System for Supporting Peripheral Component Interconnect (PCI) Peer-to-Peer Access Across Multiple PCI Host Bridges within a Data Processing System", Ser. No. 08/766,736 (IBM Docket No. AT9-96-096) filed Dec. 13, 1996, and assigned to the assignee herein named. The content of the above-mentioned co-pending United States Patent Application is incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to a method and system for data processing in general and, in particular, to a method and system for handling Peripheral Component Interconnect (PCI) peer-to-peer accesses within a data-processing system. Still more particularly, the present invention relates to a method and system for preventing PCI peer-to-peer access across multiple PCI host bridges within a data-processing system.

2. Description of the Prior Art

A computer system or data-processing system typically includes a system bus. Attached to the system bus are various devices that may communicate locally with each other over the system bus. For example, a typical computer system includes a system bus to which a central processing unit (CPU) is attached and over which the CPU communicates directly with a system memory that is also attached to the system bus.

In addition, the computer system may include a local bus for connecting certain highly integrated peripheral components on the same bus as the CPU. One such local bus is known as the Peripheral Component Interconnect (PCI) bus. Under the PCI local bus standard, peripheral components can directly connect to a PCI local bus without the need for glue logic. Thus, PCI provides a bus standard on which high-performance peripheral devices, such as graphics devices and hard disk drives, can be coupled to the CPU, thereby permitting these high-performance peripheral devices to avoid the general access latency and the bandwidth constraints that would have occurred if these peripheral devices were connected to a standard peripheral bus. Details on the PCI local bus standard can be obtained under the PCI Local Bus Specification, Revision 2.1, from the PCI Special Interest Group, which is hereby incorporated by reference.

Generally, each system bus and local bus utilizes an independent set of protocols (or rules) to conduct data transfers between various devices attached to it. Each of these protocols is designed into a bus directly and is commonly referred to as the "architecture" of the bus. In a data transfer between different bus architectures, data being transferred from the first bus architecture may not be in a form that is usable or intelligible by the receiving second bus architecture. Accordingly, communication problems may occur when data must be transferred between different types of buses, such as transferring data from a PCI device on a PCI local bus to a CPU on a system bus. Thus, a mechanism is developed for "translating" data that are required to be transferred from one bus architecture to another. This translation mechanism is normally contained in a hardware device in the form of a bus-to-bus bridge (or interface) through which the two different types of buses are connected.

Incidentally, bus-to-bus bridges have been designed to match the communication protocol of one bus with that of another in order to permit system-wide communications between devices on different buses. For example, the bus-to-bus bridge connecting between a system bus and a PCI local bus is called a PCI host bridge. The PCI host bridge contains all the logic and hardware for translating data communications between the system bus and the PCI local bus, and ensures that data is transferred between these two buses intelligibly.

In a PCI-based system where there are multiple PCI host bridges, there needs to be a way, however, for a PCI host bridge to differentiate as to whether a PCI device, during a direct memory access (DMA) request, is trying to access the system memory or another PCI device. Further, if the requesting PCI device is trying to access another PCI device, the PCI host bridge also needs to determine whether the other PCI device is attached to the same PCI bus under the same PCI host bridge as the requesting PCI device or a different PCI bus under a different PCI host bridge from the requesting PCI device. Under the Common Hardware Reference Platform (CHRP), peer-to-peer traffic from a PCI device under one PCI host bridge to a PCI device under a different PCI host bridge is an acceptable operation; however, it does not define or require such operation. Similarly, the PCI Local Bus Specification is also silent as to this kind of peer-to-peer traffic. In fact, the PCI Local Bus Specification neither defines (or requires) peer-to-peer access across separate PCI host bridges nor disallows the possibly of such. However, if this undefined situation of peer-to-peer access across separate PCI host bridges is ignored, it may lead to indeterminate and undesirable results caused by the PCI host bridge involved in the attempted peer-to-peer transaction. Consequently, it would be desirable to provide a method and system for detecting and preventing peer-to-peer access across separate PCI buses via separate PCI host bridges within a data-processing system.

SUMMARY OF THE INVENTION

In view of the foregoing, it is therefore an object of the present invention to provide an improved method and system for data processing.

It is another object of the present invention to provide an improved method and system for handling PCI peer-to-peer accesses within a data-processing system.

It is yet another object of the present invention to provide an improved method and system for preventing PCI peer-to-peer access across separate PCI host bridges within a data-processing system.

In accordance with the method and system of the present invention, during an access request from a PCI device, a first determination is made as to whether or not the access request is for a system memory attached to a system bus. In response to a determination that the access request is not for a system memory attached to the system bus, another determination is made as to whether or not the access request is for a PCI device under the same PCI host bridge as the requesting PCI device. In response to a determination that the access request is not for a PCI device under the same PCI host bridge as the requesting PCI device, denying the access request such that a PCI peer-to-peer access across separate PCI host bridges within a data processing system is prevented.

All objects, features, and advantages of the present invention will become apparent in the following detailed written description.

DESCRIPTION OF THE DRAWINGS

The invention itself, as well as a preferred mode of use, further objects, and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:

FIG. 1 is a block diagram of a typical computer system having a PCI local bus architecture, which may utilize a preferred embodiment of the present invention;

FIG. 2 is a block diagram of a configuration having separate PCI local buses under separate PCI host bridges, in accordance with a preferred embodiment of the present invention;

FIG. 3 is a block diagram of a PCI host bridge in accordance with a preferred embodiment of the present invention;

FIG. 4 is a block diagram of a memory map to be utilized by the PCI host bridge of FIG. 3, in accordance with a preferred embodiment of the present invention; and

FIG. 5 is a high-level logic flow diagram of a method for preventing peer-to-peer access across separate PCI host bridges within a data processing system, in accordance with a preferred embodiment of the present invention.

DESCRIPTION OF A PREFERRED EMBODIMENT

The present invention may be applicable in a variety of computers under a number of different operating systems. The computer may be, for example, a personal computer, a mini-computer, or a mainframe computer. For the purpose of illustration, a preferred embodiment of the present invention, as described below, is implemented on a mini-computer, such as the RS/6000.TM. series manufactured by International Business Machines Corporation.

Referring now to the drawings and in particular to FIG. 1, there is depicted a block diagram of a typical computer system having a PCI local bus architecture, which may utilize a preferred embodiment of the present invention. As shown, a processor 12, a cache memory 13, a memory controller 14, and a Dynamic Random Access Memory (DRAM) 15 are connected to a system bus 28 of a computer system 10. Processor 12, cache memory 13, memory controller 14, and DRAM 15 are also coupled to a PCI local bus 20 of computer system 10 through a PCI host bridge 11. PCI host bridge 11 provides a low latency path through which processor 12 may directly access PCI devices mapped anywhere within bus memory and/or I/O address spaces. PCI host bridge 11 also provides a high bandwidth path allowing PCI masters direct access to DRAM 15. PCI host bridge 11 may include various functions such as data buffering/posting and arbitration.

Also attaching to PCI local bus 20 may be other devices such as a local-area network (LAN) interface 16 and a small computer system interface (SCSI) 18. LAN interface 16 is for connecting computer system 10 to a local-area network 17 such as Ethernet or token-ring. SCSI 18 is utilized to control high-speed SCSI disk drives 19.

In general, PCI local bus 20 may support up to four add-in board connectors without requiring any expansion capability. Audio adaptor board 22, motion video adaptor board 23, and graphics adaptor board 24 are examples of some devices that may be attached to PCI local bus 20 via add-in board connectors.

With reference now to FIG. 2, there is illustrated a configuration having separate PCI local buses under separate PCI host bridges, according to a preferred embodiment of the present invention. As shown, processor(s) 25 and a system memory 26 are coupled for communication over a system bus 28. In a preferred embodiment, system bus 28 provides a 32-bit memory address space and a 16-bit I/O address space. A PCI host bridge 30 enables communications between bus agents coupled to system bus 28 and bus agents coupled to a PCI local bus 29.

PCI devices 40-42 are bus agents coupled for communication over PCI local bus 29. In addition, PCI host bridge 30 is coupled as a bus agent for communication over PCI local bus 29. PCI host bridge 30 has the capability to be an initiator and a target for the access cycle over PCI local bus 29. In a preferred embodiment, PCI local bus 29 comprises 32-bit memory address and 32-bit I/O address spaces, having addresses and data multiplexed over the same bus.

A bus bridge, such as PCI host bridge 30, is coupled between a primary bus and a secondary bus. A bus bridge enables an access request that initiates on the primary bus to have a destination on the secondary bus, and enables an access request that initiates on the secondary bus to have a destination on the primary bus. For example, after receiving an access request from system bus 28, PCI host bridge 30 will initiate an access request on PCI local bus 29 to communicate with one or more of PCI devices 40-42. Or, after receiving an access request from PCI local bus 29, PCI host bridge will initiate an access request on system bus 28 to communicate with system memory 26.

In addition to PCI host bridge 30, a PCI host bridge 32 is also attached to system bus 28. Similar to PCI host bridge 30, PCI host bridge 32 enables communications between bus agents coupled to system bus 28 and bus agents coupled to a PCI local bus 31. Attaching to PCI local bus 31 are PCI device 43 and PCI device 44.

Referring now to FIG. 3, there is depicted a block diagram of a PCI host bridge in accordance with a preferred embodiment of the present invention. As shown, PCI host bridge is coupled to system bus 28 via system interface 52 and bus 56. Similarly, PCI host bridge is coupled to PCI local bus 29 via PCI interface 55 and bus 57. Any in-bound transaction traffic travelling from PCI interface 55 to system interface 52 are handled through in-bound buffers 54. On the other hand, any out-bound transaction traffic travelling from system interface 52 to PCI interface 55 are handled through out-bound buffers 53. The in-bound transaction traffic and the out-bound transaction traffic are directed by a state machine within control logic 51. This state machine controls a first set of transaction router (not shown) and transaction selection (not shown) for in-bound data and a second set of transaction router and transaction selection for out-bound data. In addition, control logic 51 may also include functions such as address decoding, data buffering, and other PCI control functions such as arbitration. A top-of-system-memory register 58 is preferably included within control logic 51 for a purpose that will be described infra.

With reference now to FIG. 4, there is depicted a block diagram of a memory map to be utilized by the PCI host bridge of FIG. 3, in accordance with a preferred embodiment of the present invention. As shown, memory map 60 comprises a first bus memory address space 61, a second bus memory address space 62, and a system memory address space 63. System memory address space 63 is contiguous such that address space 63 does not have any other address, such as bus memory address, interspersed within. Similarly, first bus memory address space 61 and second bus memory address space 62 are also separately contiguous such that address space 61 and address space 62 do not have any other address interspersed within.

Generally, when a PCI device on a PCI local bus performs a direct memory access (DMA) request, such access request may be for the system memory, for the same address space under the same PCI host bridge as the requesting PCI device, or for an address space under another PCI host bridge. As a preferred embodiment of the invention, an access request to the system memory is indexed to system memory address space 63, while an access request to a PCI device under the same PCI host bridge as the requesting PCI device is indexed to second bus memory address space 62. First bus memory address space 61 is specifically reserved for any access request to a PCI device that is under a different PCI host bridge. Any address space that is above system memory address space 63 in memory map 60 is considered above the top-of-system memory. Hence, by utilizing top-of-system-memory register 58, an access request for the system memory can be distinguished from an access request for a PCI device under the same PCI host bridge as the requesting PCI device, or for a PCI device under a different PCI host bridge. Because the decoding for access request under the same PCI host bridge may be done anyway, the additional compare on this new top-of-system-memory decode can be combined with the decoding to determine when the access request is for a PCI device under a different PCI host bridge. That is, if the address to be accessed is above system memory address space 63 and is not for a PCI device under the same PCI host bridge as the requesting PCI device, such access request must be for a PCI device under a different PCI host bridge.

If a preferred action after the detection of a PCI device attempting to access another PCI device under either the same PCI host bridge or a different PCI host bridge is to ignore such request, then it is only necessary to detect whether or not the access request is for system memory address space 61. However, if a preferred action is to issue a target-abort in accordance with the PCI Local Bus Specification, for a PCI device attempting to access another PCI device under a different PCI host bridge, then a subsequent decoding of whether the access request is for address space 61 or for address space 62 is further required.

By having a top-of-system-memory register 58 to indicate the top-of-system memory, the top-of-system memory can be programmable. Thus, when the computer system is initialized, the amount of system memory is determined and the proper value may be programmed into top-of-system-memory register 58 or by utilizing range registers that are based on how the system memory address space 63 is mapped into address map 60.

One skilled in the art will appreciate that the arrangement of address spaces in memory map 60 of FIG. 4 is only one example of many possible ways in which the system memory, the bus memory, and any other bus memory can be mapped. As mentioned previously, range registers can also be utilized within a PCI host bridge to be programmed to detect each of the assigned address spaces.

Referring now to FIG. 5, there is illustrated a high-level logic flow diagram of a method for preventing peer-to-peer access across separate PCI host bridges within a data processing system, in accordance with a preferred embodiment of the present invention. Starting at block 51, a determination is made as to whether or not an access request from a PCI device attached to the PCI local bus is for a system memory attached to the system bus, as shown in block 52. If the access request is for a system memory attached to the system bus, then normal transaction is performed to the system memory according to the PCI Local Bus Specification, as depicted in block 53.

However, if the access request is not for a system memory attached to the system bus, then another determination is made as to whether or not the target PCI device is under the same PCI host bridge as the requesting PCI device, as shown in block 54. If the target PCI device is under the same PCI host bridge as the requesting PCI device (such as an access request from PCI device 40 to PCI device 42 in FIG. 2), then normal transaction is performed according to the PCI Local Bus Specification, as depicted in block 55.

Otherwise, if the target PCI device is not under the same PCI host bridge as the requesting PCI device (such as an access request from PCI device 40 to PCI device 43 in FIG. 2), then the access request is denied, as shown in block 56. The denial of access request can either be carrying out a target-abort operation or simply ignoring the access request without claiming the cycle. A target-abort operation indicates the target PCI device requires the access request to be stopped and does not want the requesting PCI device to repeat the access request again. In terms of ignoring the access request without claiming the cycle, the control logic of the PCI host bridge may be designed to not respond to the requesting PCI device.

As has been described, the present invention provides an improved method and system for preventing peer-to-peer access across separate PCI host bridges within a data processing system. Although PCI host bridges are not required by the PCI local bus architecture to handle accesses from one PCI host bridge to another PCI host bridge, it is crucial for the PCI host bridge not to corrupt the computer system if such accesses are attempted.

While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention.


Top