Newer
Older
AMI-Aptio-BIOS-Reversed / PurleySktPkg / Pei / CrystalRidge / CrystalRidgePeim / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Restructure the repo

CrystalRidgePeim

Field Value
Index 0426
Module CrystalRidgePeim
Size 2,176 bytes (PE32)
Phase PEI

Overview

UEFI PEIM (PEI Module) for CrystalRidge nonce restoration on production systems. Registers an EndOfPei notification callback that generates Software SMI 0xFB via IO port 0xB2 to trigger nonce restoration in the SMM handler. Includes a manufacturing/debug mode detector that reads CMOS register 0x4A (with a memory-mapped I/O override at 0xFDAF0490) to conditionally enable debug output through the CrystalRidge DebugLib PPI.

Key Functions

  • CrystalRidgePeimEntry -- PEIM entry point; registers EndOfPei notify on production boot
  • GenerateSwSmiForNonceRestore -- EndOfPei callback; writes 0xFB to IO port 0xB2
  • IsManufacturingMode -- Reads CMOS 0x4A to detect manufacturing/debug mode
  • CrystalRidgeDebugPrint -- Debug print via CrystalRidge DebugLib PPI
  • CrystalRidgeDebugAssert -- Debug assertion via CrystalRidge DebugLib PPI
  • GetPeiServicesTable -- Locates PEI Services Table from IDT base

Dependencies

  • CrystalRidge PPI (GUID: 36232936-0E76-31C8-A13A-3AF2FC1C3932)
  • PeiServices (GetBootMode, NotifyPpi, LocatePpi)
  • IO Library (IoRead8, IoWrite8 for CMOS/SMI)
  • MMIO Library (MmioRead8 for hardware override)

Platform

HR650X Purley (CrystalRidge)