lecture 2. chipset and pcie
DESCRIPTION
COM509 Computer Systems. Lecture 2. Chipset and PCIe. Prof. Taeweon Suh Computer Science Education Korea University. x86-based Computer System. CPU. Main Memory (DDR2). FSB (Front-Side Bus). North Bridge. Graphics card. South Bridge. Hard disk. BIOS ROM. USB. PCIe card. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/1.jpg)
Lecture 2. Chipset and PCIe
Prof. Taeweon SuhComputer Science Education
Korea University
COM509 Computer Systems
![Page 2: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/2.jpg)
Korea Univ2
x86-based Computer System
CPU
North Bridge
South Bridge
Main Memor
y(DDR2)
FSB (Front-Side Bus)
Hard disk
Graphics card
USB
PCIe card
BIOS ROM
![Page 3: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/3.jpg)
Korea Univ3
Q35 Chipsets System Block Diagram
![Page 4: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/4.jpg)
Korea Univ4
Chipsets
• Chipsets include MCH and ICH in the x86-based system There are PCIe devices inside the MCH and the ICH Backbone of MCH and ICH is based on PCI express
• Q35 (North Bridge) Device 0 : Function 0
• DRAM Controller Registers Device 1 : Function 0
• PCIe Registers associated with x16 root port Device 2 : Function 0, 1
• Integrated Graphics Devices Registers Device 3 : Function 0, 1, 2, 3
• Intel Management Engine (ME) subsystem registers
![Page 5: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/5.jpg)
Korea Univ5
Chipsets
• ICH9 (South Bridge) D30:F0
• PCI-to-PCI Bridge Register D31:F0
• LPC (Low Pin Count) Interface Bridge Registers D31:F2
• SATA (Serial ATA) Controller Registers D31:F3
• SMBus Controller Registers ….
![Page 6: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/6.jpg)
Korea Univ6
PCI Express
• 3rd generation high-performance I/O bus Used to interconnect peripheral devices Point-to-point connection as opposed to bus PCIe interconnect consists of either a x1, x2, x4, x8, x12,
x16 or x32 point-to-point link• if you have x16 link, there are 64 physical lines (16 * 2 (both
directions) * 2 (differential signaling)) 1st generation
• ISA, EISA, VESA and Micro Channel buses 2nd generation
• PCI, PCI-X, and AGP
![Page 7: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/7.jpg)
Korea Univ7
PCI Express
![Page 8: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/8.jpg)
Korea Univ8
PCI Bus Based Platform
![Page 9: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/9.jpg)
Korea Univ9
PCIe-based System Topology
Souce: PCIe specification 2.0
• Root Complex Denote the root
of I/O hierarchy that connects the CPU/memory subsystem to the I/O
May support one or more PCIe ports as shown
• Endpoint devices other
than root complex and switches that are requesters or completers of PCIe transactions
![Page 10: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/10.jpg)
Korea Univ10
PCIe Example Topology
Souce: PCIe specification 2.0
• Switch Can be thought of as consisting of 2 or more logical PCI-to-PCI
bridges One port of a switch pointing in the direction of the root
complex is an upstream port All other ports pointing away from the root complex are
downstream ports
![Page 11: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/11.jpg)
Korea Univ11
PCIe Topology
![Page 12: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/12.jpg)
Korea Univ12
PCIe Address Space
• PCIe supports the same address spaces as PCI Memory space IO space Configuration space
• PCIe provides a 4KB space per a function as opposed to 256B in PCI
• PCIe support up to 256 buses, 32 devices, and 8 functions
![Page 13: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/13.jpg)
Korea Univ13
PCIe Configuration Registers
![Page 14: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/14.jpg)
Korea Univ14
PCIe Configuration Registers
![Page 15: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/15.jpg)
Korea Univ15
PCIe Configuration Registers
![Page 16: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/16.jpg)
Korea Univ16
PCIe Configuration Registers
• Vendor ID Identify the manufacturer of the function The value is assigned by a central authority
(PCI SIG) that controls issuance of the numbers
• Device ID Assigned by the function manufacturer Identify the type of the function
![Page 17: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/17.jpg)
Korea UnivCOM90617
PCIe Configuration Registers
• Class code
![Page 18: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/18.jpg)
Korea Univ18
How to Access Configuration Registers?
• In x86-based platform, there are 2 ways to access configuration registers I/O transaction with 0xcf8 and 0xcfc
• PCI compatible configuration mechanism• 0xcf8 and 0xcfc are IO port addresses implemented within root
complex It means you have to use “in” or “out” instructions in x86 0xcf8: Configuration address port 0xcfc: Configuration data port
![Page 19: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/19.jpg)
Korea Univ19
How to Access Configuration Registers?
MMIO (Memory-Mapped IO) transaction• Each function’s 4KB config. space starts at a 4KB-aligned
address with the 256MB memory space set aside as configuration space
• For example, you can use “mov” instruction in x86 to access the config. space
![Page 20: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/20.jpg)
Korea Univ20
PCIe Memory Space
![Page 21: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/21.jpg)
Korea Univ21
PCIe I/O Space
![Page 22: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/22.jpg)
Korea Univ22
PCIe Transaction Routing
![Page 23: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/23.jpg)
Korea Univ23
PCIe Transaction Routing
TLP: Transaction Layer Packet
![Page 24: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/24.jpg)
Korea Univ24
PCIe Transaction Routing
![Page 25: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/25.jpg)
Korea Univ25
PCIe Transaction Routing
![Page 26: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/26.jpg)
Korea Univ26
PCIe Transaction Routing
![Page 27: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/27.jpg)
Korea Univ27
PCIe Transaction Routing
![Page 28: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/28.jpg)
Korea Univ28
PCIe Transaction Routing
![Page 29: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/29.jpg)
Korea Univ29
PCIe Transaction Routing
![Page 30: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/30.jpg)
Korea Univ30
PCIe Transaction Routing
![Page 31: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/31.jpg)
Korea Univ31
PCIe Enumeration
• At power up time, the configuration software only knows of the existence of bus 0 Bus 0 is the bus that resides on the downstream side of
the Host/PCI bridge The configuration S/W does not even know what devices
reside on bus 0
• So… how does the system discover the various buses, devices, and functions on the computer system? Answer: Via the enumeration process
• BIOS is doing the enumeration
![Page 32: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/32.jpg)
Korea Univ32
PCIe Enumeration
![Page 33: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/33.jpg)
Korea Univ33
PCIe Enumeration
![Page 34: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/34.jpg)
Korea Univ34
Example: Before PCIe Enumeration
![Page 35: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/35.jpg)
Korea Univ35
PCIe Enumeration Process
![Page 36: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/36.jpg)
Korea Univ36
PCIe Enumeration Process
![Page 37: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/37.jpg)
Korea Univ37
PCIe Enumeration Process
![Page 38: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/38.jpg)
Korea Univ38
PCIe Enumeration Process
![Page 39: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/39.jpg)
Korea Univ39
PCIe Enumeration Process
![Page 40: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/40.jpg)
Korea Univ40
PCIe Enumeration Process
• ………
![Page 41: Lecture 2. Chipset and PCIe](https://reader035.vdocuments.site/reader035/viewer/2022062309/568146a0550346895db3ba1b/html5/thumbnails/41.jpg)
Korea Univ41
Example: After PCIe Enumeration