# PciRootBridge

| Field  | Value |
|--------|-------|
| Index  | 294 |
| Module | PciRootBridge |
| Size   | 116896 bytes (0x1C8A0) |
| Phase  | DXE |

PCI Root Bridge DXE driver that manages the PCI Host Bridge / Root Bridge hierarchy for the Lenovo HR650X platform. It performs SDL-based host bridge enumeration, installs EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL and EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL per bridge, handles PCI bus enumeration and resource allocation (bus numbers, IO, memory), publishes ACPI _CRS descriptors, installs hot-plug controller (HPC) protocols, and registers the IOMMU protocol. This is one of the largest PCI infrastructure drivers in the BIOS.

## Key Functions

- **ModuleEntryPoint** -- UEFI entry point; initializes globals and triggers host bridge enumeration
- **PciHbNotifyPhase** -- Handles host bridge notification phases (enumeration, allocation)
- **PciHbGetNextRootBridge** -- Enumerates root bridges on each host bridge
- **PciHbGetAllocAttributes** -- Returns resource allocation attributes for a given bridge
- **PciRbIoRead/Write** -- Root bridge IO/Memory/Config space access protocol methods

## Dependencies

- AmiSdlLib, AmiPcieSegBusLib, DxeMmPciBaseLib
- SbPciHotPlugLib (Chipset SB), MdePkg libraries
- EDKII IOMMU Protocol, PCD Protocol

## Platform

x86-64 PE32+ (UEFI DXE driver), Lenovo HR650X (Purley/Intel grantley-EP), AMI ModulePkg + AMI CRB Pkg + CpRcPkg