# LegacyInterrupt

| Field        | Value                                  |
|--------------|----------------------------------------|
| Index        | 0123                                   |
| Module       | LegacyInterrupt                        |
| Size         | 5380 bytes (5.3 KB)                    |
| PE File      | LegacyInterrupt.efi                    |
| Phase        | DXE                                    |
| Source       | PurleySktPkg/SouthClusterLbg/LegacyInterrupt/Dxe/ |
| SHA-256      | d741bceebef8...                        |
| Sections     | 6 (.text, .rdata, .data, section_3, .xdata, .reloc) |

## Overview

LegacyInterrupt is a DXE driver for Intel Purley/Lewisburg PCH platforms that manages legacy PCI interrupt routing. It installs the `EFI_LEGACY_INTERRUPT_PROTOCOL` to provide platform-level control over PCI interrupt line programming, legacy interrupt vector management, and PCH LPC register access. The driver handles interrupt status queries, vector read/write operations, and PCH stepping detection for Lewisburg PCH.

## Key Functions

- `LegacyInterruptInstall()` -- Installs the legacy interrupt protocol on a new handle
- `LegacyInterruptGetStatus()` -- Returns current legacy interrupt status
- `LegacyInterruptGetVector()` -- Retrieves the interrupt vector number
- `LegacyInterruptReadVector()` -- Reads an interrupt vector register
- `LegacyInterruptWriteVector()` -- Writes a value to an interrupt vector register
- `LibConstructor()` -- Library constructor that initializes UEFI boot services and system table
- `PchGetStepping()` -- Detects the PCH stepping version
- `LpcWriteRegister()` -- Writes to LPC bridge configuration registers

## Dependencies

- `gEfiLegacyInterruptProtocolGuid` -- EFI Legacy Interrupt Protocol
- `gMmPciUsraProtocolGuid` -- MM PCI USRA Protocol (from CpRcPkg/DxeMmPciBaseLib)
- `gEfiPcdProtocolGuid` -- PCD Protocol
- `gEfiHobListGuid` -- HOB List GUID
- `gEfiDxeServicesTableGuid` -- DXE Services Table

## Platform

- **CPU**: Intel Purley (Xeon Scalable)
- **PCH**: Lewisburg (LBG)
- **Architecture**: x86-64 (PE32+)
- **Subsystem**: EFI_BOOT_SERVICE_DRIVER (0x0B)
- **Toolchain**: VS2015 (DEBUG build)
- **BIOS**: HR650X (HR6N0XMLK)