Newer
Older
AMI-Aptio-BIOS-Reversed / PlatformCpuPolicy / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Init

PlatformCpuPolicy

Index Module Size Phase
321 PlatformCpuPolicy 35012 bytes (34.2 KB) DXE

Overview

Implements the Platform CPU Policy DXE driver for the Lenovo HR650X server (Purley platform). Responsible for initializing CPU socket ID mappings from PCD, allocating IED (Integrated Error Diagnostic) trace buffers, setting up Processor Power Management (PPM) structures, configuring Monitor/MWAIT for multi-socket topologies (2LM/4S/8S), applying NM FW boot frequency (Efficient/Performance), and configuring HWPM (Hardware Power Management), PBF (Power Budgeting), and EPP (Energy Performance Preference) policy registers.

Key Functions

  • PlatformCpuPolicyInit -- Main initialization function; sets up PCD protocol, HOB list, socket topology, and driver dispatch
  • InitSocketIdMap -- Reads PCD to populate the socket ID mapping table for multi-socket topology
  • AllocateIedTraceBuffer -- Allocates IED trace buffer regions per socket for error diagnostics
  • SetupPpmStructures -- Configures PPM feature buffers including HWPM, EPP, and PBF policy data
  • ConfigureMonitorMwait -- Sets up Monitor/MWAIT enabling for 2LM, 4S, and 8S platform topologies
  • ApplyNmBootFrequency -- Applies NM (Nehalem) firmware boot frequency selection (Efficient vs. Performance)
  • ConfigureHwpmRegisters -- Programs MSR-based HWPM registers for autonomous frequency selection

Dependencies

  • PCD Protocol
  • MM PCI USRA Protocol
  • Setup Variable Protocol (platform-specific)
  • HOB List
  • SMM Control Hook Protocol
  • UEFI Boot/Runtime Services

Platform

Intel x86-64 (PE32+), Purley platform (HR650X). UEFI subsystem.