Newer
Older
AMI-Aptio-BIOS-Reversed / MdeModulePkg / Universal / PCD / Pei / Service.c / PcdPeim / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Restructure the repo

PcdPeim

Index: 0406 | Size: 12,224 bytes | Phase: PEI | Format: PE32 (Ia32)

Overview

Platform Configuration Database (PCD) PEIM that initializes and serves the PEI-phase PCD database. Provides the full PCD PPI interface: Get/Set operations for 8/16/32/64-bit, pointer, and size variants, supporting both token-number and token-space-GUID (Ex) access patterns, SKU management, and callback registration for PCD value change notifications.

Key Functions

  • PcdPeimEntryPoint -- Module entry: calls PeiPcdInit, installs PCD PPI, asserts on failure
  • PeiPcdInit -- PCD database initialization from firmware volume HOB
  • PeiPcdGet8/16/32/64/Ptr/Size -- Token-number-based PCD getters
  • PeiPcdSet8/16/32/64/Ptr -- Token-number-based PCD setters (via PeiPcdSetTokenValue)
  • PeiPcdGet8Ex/16Ex/32Ex/64Ex/PtrEx/SizeEx -- GUID+token-number extended PCD getters
  • PeiPcdSet8Ex/16Ex/32Ex/64Ex/PtrEx -- Extended PCD setters (via PeiPcdSetExTokenValue)
  • PeiPcdSetSku -- SKU switching with validation and one-change enforcement
  • PeiPcdGetNextTokenSpace -- Token-space GUID enumeration
  • PeiPcdSetCallback / PeiPcdNotifySet -- Callback registration for PCD change notifications
  • PeiPcdGetInfo -- Metadata retrieval (token type/size)
  • PeiPcdGetTokenValue / PeiPcdSetTokenValue -- Internal PCD database access layer
  • PeiPcdGetPcdDb / PeiPcdGetSkuSize -- Database pointer and SKU-size resolution
  • PeiPcdSetCallbackWorker -- Shared callback registration worker
  • DebugGetDebugLib / DebugPrint -- Debug output services

Dependencies

  • EFI_PEI_PCD_PPI -- PCD PPI interface
  • EFI_PEI_PCD_PPI_GUID -- PCD service GUID
  • PCD database HOB (from firmware volume)
  • PEI Services table (PPI install/locate)
  • Debug Library PPI

Platform

Intel Purley (Skylake-SP Xeon), HR650X
Source: MdeModulePkg/Universal/PCD/Pei/Pcd.c