pcie 入门

liaocj 2023-09-20 10:04:03
Categories: > Tags:

pcie 设备类型

 ----------------------------------------------------------------------------
     |                |                    |                  |
-----------   ------------------   -------------------   --------------
| PCI Dev |   | PCIe Root Port |   | PCIe-PCI Bridge |   |  pxb-pcie  |
-----------   ------------------   -------------------   --------------
 (1) PCI Devices (e.g. network card, graphics card, IDE controller),
     not controllers. Place only legacy PCI devices on
     the Root Complex. These will be considered Integrated Endpoints.
     Note: Integrated Endpoints are not hot-pluggable.

     Although the PCI Express spec does not forbid PCI Express devices as
     Integrated Endpoints, existing hardware mostly integrates legacy PCI
     devices with the Root Complex. Guest OSes are suspected to behave
     strangely when PCI Express devices are integrated
     with the Root Complex.

 (2) PCI Express Root Ports (pcie-root-port), for starting exclusively
     PCI Express hierarchies.

 (3) PCI Express to PCI Bridge (pcie-pci-bridge), for starting legacy PCI
     hierarchies.

 (4) Extra Root Complexes (pxb-pcie), if multiple PCI Express Root Buses
     are needed.

PCIE 规格

Each PCI domain:256 buses

A PCI Express Root bus: 32 devices.

A single PCI Express to PCI Bridge: 32 slots

each PCI Express Root Port : 8 functions

The PCI Express Root Ports and PCI Express Downstream ports are seen by
Firmware/Guest OS as PCI-PCI Bridges.

alt text

alt text

alt text

alt text

alt text

pcie 拓扑

pcie 枚举

pcie 热拔插

any devices plugged into Root Complexes cannot be hot-plugged/hot-unplugged:
(1) PCI Express Integrated Endpoints
(2) PCI Express Root Ports
(3) PCI Express to PCI Bridges
(4) pxb-pcie

ACPI 基础的 PCI 热插拔

SHPC 基础的 PCI 热插拔

PCI Express 原生热插拔