Newer
Older
AMI-Aptio-BIOS-Reversed / LenovoServerPkg / GetCpuInfo / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Full restructure

GetCpuInfo

Index Module Size Phase
320 GetCpuInfo 16804 bytes (16.4 KB) DXE

Overview

Collects detailed CPU information from all processors in the system by executing CPUID instructions and reading model-specific registers (MSRs). Reports Platform ID, Stepping, Microcode revision, CPUID signature, core frequency, and actual operating frequency. The collected data is displayed through an HII form in the BIOS setup menu, and the driver uses the EFI CPU Architecture Protocol to enumerate all processors.

Key Functions

  • GetCpuInfoEntryPoint -- Module entry point; initializes globals, drives CPU info collection
  • CpuInfoDriverEntry -- Main driver routine; locates CPU arch protocol, enumerates processors
  • CollectCpuidData -- Executes CPUID leaves on each processor to extract vendor, family, model, stepping, and feature bits
  • ReadMsrData -- Reads MSRs for Platform ID, microcode revision, frequency ratios, and turbo ratio limits
  • CalculateCpuFrequency -- Computes actual operating frequency from MSR-based MPERF/APERF counters
  • InstallHiiForm -- Registers HII package list and config access protocol for BIOS setup display

Dependencies

  • EFI CPU Architecture Protocol
  • HII Database, String, Config Access, Config Routing Protocols
  • HII Package List Protocol
  • UEFI Boot/Runtime Services
  • PCD Protocol, HOB List

Platform

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