# PpmInitialize

**Index:** 0078 (78)
**Size:** 30592 bytes (PE32+ body)
**Phase:** DXE (Driver eXecution Environment)
**Subsystem:** EFI_BOOT_SERVICE_DRIVER (0x0B)

## Overview

Processor Power Management (PPM) DXE driver for the Purley platform. Initializes processor power management features including ConfigTDP, PBF (Power Balance Feature), C-states, Turbo mode, and energy-efficient features. Consumes the PPM Info HOB produced by earlier PEIMs, locates the MP Services Protocol, and programs MSRs per socket. Registers SmmReadyToLock and ReadyToBoot callbacks for late-stage configuration and boot script save/restore for S3 resume.

## Key Functions

- **PpmInitializeEntryPoint** -- Module entry point; initializes PPM context, locates MP services, programs per-socket MSRs
- **PpmConfigTdpInit** -- Configures ConfigTDP (Thermal Design Power) ratios and power limits
- **PpmPbfInit** -- Programs Power Balance Feature (PBF) MSRs
- **PpmCStateInit** -- Configures C-state entry/exit parameters
- **PpmTurboInit** -- Enables and configures Turbo mode parameters
- **PpmEnergyEfficientInit** -- Sets energy-efficient performance bias and HWP (Hardware P-State) parameters
- **PpmS3BootScriptSave** -- Saves PPM MSR programming to boot script for S3 resume
- **SmmReadyToLockCallback** -- Locks SMM configuration at SmmReadyToLock event
- **ReadyToBootCallback** -- Finalizes PPM configuration before boot

## Protocols / Dependencies

- EFI_MP_SERVICES_PROTOCOL -- Multi-processor service for per-socket MSR programming
- EFI_SMM_COMMUNICATION_PROTOCOL -- Communication with SMM for PPM coordination
- PPM Info HOB (produced by PEIM) -- PPM configuration data from pre-memory phase
- UEFI Boot Services -- Event registration (SmmReadyToLock, ReadyToBoot)
- S3 Boot Script -- Save/Restore PPM registers for S3 resume

## Platform

Purley platform (Intel Xeon Scalable), HR650X BIOS. Built from PurleySktPkg/Dxe/PowerManagement/PpmInitialize.c with DEBUG_VS2015, X64 target.