PCI Bus Demystified.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
PCI Bus Demystified by Doug Abbott A VOLUME IN THE DEMYSTIFYING TECHNOLOGY™ SERIES Eagle Rock, Virginia www.LLH-Publishing.com Copyright © 2000 by LLH Technology Publishing All rights reserved. No part of this book may be reproduced, in any form or means whatsoever, without written permission of the publisher. While every precaution has been taken in the prepara- tion of this book, the publisher and author assume no responsibil- ity for errors or omissions. Neither is any liability assumed for damages resulting from the use of information contained herein. Printed in the United States of America. ISBN 1-878707-78-7 (LLH eBook) LLH Technology Publishing and HighText Publications are trade- marks of Lewis Lewis & Helms LLC, 3578 Old Rail Road, Eagle Rock, VA, 24085 To Susan: My best friend, my soul mate. Thanks for sharing life’s journey with me. To Brian: Budding DJ, future pilot and all around neat kid. Thanks for keeping me young at heart. Contents Introduction ......................................................................... 1 Intended Audience .......................................................................2 The Rest of This Book .................................................................. 3 Chapter 1: Introducing the Peripheral Component Interconnect (PCI) Bus .......................................................... 5 So What is a Computer Bus? ........................................................ 6 Bus Taxonomy...............................................................................7 What’s Wrong with ISA and Attempts to Fix It ......................... 9 The VESA Local Bus.................................................................. 10 Introducing PCI .......................................................................... 11 Features ....................................................................................... 11 The PCI Special Interest Group ................................................. 12 PCI Signals ................................................................................. 13 Signal Groups ............................................................................. 13 Signal Types ................................................................................ 18 Sideband Signals ......................................................................... 19 Definitions .................................................................................. 20 Summary ..................................................................................... 21 Chapter 2: Arbitration ....................................................... 22 The Arbitration Process ............................................................. 22 An Example of Fairness .............................................................. 25 Bus Parking ................................................................................. 26 Latency........................................................................................ 27 Summary ..................................................................................... 31 PCI Bus Demystified Chapter 3: Bus Protocol ..................................................... 32 PCI Bus Commands .................................................................... 32 Basic Read/Write Transactions................................................... 34 Transaction Termination — Master ........................................... 45 Transaction Termination — Target ............................................ 45 Error Detection and Reporting ................................................... 51 Summary ..................................................................................... 54 Chapter 4: Optional and Advanced Features ..................... 56 Interrupt Handling ..................................................................... 56 The Interrupt Acknowledge Command ..................................... 59 “Special” Cycle ........................................................................... 60 64-bit Extensions ........................................................................ 62 Summary ..................................................................................... 66 Chapter 5: Electrical and Mechanical Issues ..................... 67 A “Green” Architecture ............................................................. 67 Signaling Environments — 3.3V and 5V .................................. 70 5 Volt Signaling Environment.................................................... 72 3.3 Volt Signaling Environment................................................. 77 Timing Specifications ................................................................. 81 66 MHz PCI ................................................................................ 85 Mechanical Details ..................................................................... 88 Summary ..................................................................................... 90 Chapter 6: Plug and Play Configuration ............................ 92 Background ................................................................................. 92 Configuration Address Space ..................................................... 93 Configuration Header — Type 0 ................................................ 95 Base Address Registers (BAR) ................................................. 103 vi Contents Expansion ROM .......................................................................107 Capabilities List ........................................................................ 110 Vital Product Data .................................................................... 111 Summary ...................................................................................115 Chapter 7: PCI BIOS ......................................................... 116 Operating Modes ...................................................................... 116 Is the BIOS There? ...................................................................117 BIOS Services ...........................................................................118 Generate Special Cycle ............................................................ 120 Summary ...................................................................................124 Chapter 8: PCI Bridging ................................................... 125 Bridge Types .............................................................................. 125 Configuration Address Types.................................................... 128 Configuration Header — Type 1 .............................................. 129 Bus Hierarchy and Bus Number Registers ................................ 130 Address Filtering — the Base and Limit Registers ...................132 Prefetching and Posting to Improve Performance ...................135 Interrupt Handling Across a Bridge ......................................... 136 Bridge Support for VGA — Palette “Snooping”...................... 140 Resource Locking...................................................................... 142 Summary ...................................................................................146 Chapter 9: CompactPCI .................................................... 148 Why CompactPCI? ...................................................................148 Mechanical Implementation .................................................... 150 Electrical Implementation ........................................................ 155 CompactPCI Bridging .............................................................. 162 Summary ...................................................................................165 vii PCI Bus Demystified Chapter 10: Hot Plug and Hot Swap ................................ 166 PCI Hot Plug ............................................................................166 Hot Plug Primitives .................................................................. 170 CompactPCI Hot Swap ............................................................174 Resources for Full Hot Swap..................................................... 180 Summary ...................................................................................185 Appendix A: Class Codes ................................................. 187 Appendix B: Connector Pin Assignments ........................ 191 Index ................................................................................. 195 viii Introduction Today’s computer systems, with their emphasis on high resolution graphics, full motion video, high bandwidth networking, and so on, go far beyond the capabilities of the architecture that ushered in the age of the personal computer in 1982. Modern PC systems demand high performance interconnects that also allow devices to be changed or upgraded with a minimum of effort by the end user. In response to this need, PCI (peripheral component interconnect) has emerged as the dominant mechanism for interconnecting the elements of modern, high performance computer systems. It is a well thought out standard with a number of forward looking features that should keep it relevant well into the next century. Originally conceived as a mechanism for interconnecting peripheral compo- nents on a motherboard, PCI has evolved into at least a half dozen different physical implementations directed at specific market seg- ments yet all using the same basic bus protocol. In the form known as Compact PCI, it is having a major impact