# HeciInitDxe

## Index
0189

## Size
50E4h (20,708 bytes)

## Phase
DXE (Driver eXecution Environment driver)

## Source Package
PurleySktPkg/Me/Heci/Dxe

## Overview
HeciInitDxe is a DXE-phase driver that initializes the HECI (Host Embedded Controller Interface) communication channel with the Intel Management Engine (ME) during the DXE boot phase. Unlike the SMM HECI drivers (HeciSmm, Heci3Smm), this driver runs before SMM is available and handles early boot-time HECI initialization, including ME firmware status checking, HECI protocol negotiation, and S3 resume state restoration.

## Key Functions
- **ModuleEntryPoint** (0x394): Entry point; calls initialization sequence.
- **sub_3C0 (31 callees)**: Main DXE HECI initialization dispatcher; configures HECI MMIO, initializes the HECI core library, and saves boot scripts for S3 resume.
- **sub_6AC (6 callees)**: HECI communication initialization; verifies ME firmware readiness and establishes the communication channel.
- **sub_66C**: Error handler that releases resources and reports initialization failures.

## Strings
- "ERROR: No memory to save MemMap !!!"
- "HeciDev == HECI1_DEVICE" (device presence check)
- References to HeciCoreLib, S3 BootScriptSave, SmmLockBox
- Build path: `PurleySktPkg\Me\Heci\Dxe\HeciInitDxe\DEBUG`

## Libraries Referenced
- HeciCoreLib (PurleySktPkg)
- PiDxeS3BootScriptLib (boot script save for S3)
- DxeMmPciBaseLib (CpRcPkg)
- SmmLockBoxDxeLib (DXE-side lockbox access)

## Platform
Intel Purley (HR650X server platform)