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

LnvDriverPei

Index: 0402 | Size: 10,176 bytes | Phase: PEI | Format: PE32 (Ia32)

Overview

Lenovo-specific PEI driver that initializes debug switch configuration and manages PPI notification callbacks. Reads the LnvSetup UEFI variable at boot, persists PEI/DXE/SMM debug switch values to CMOS, and builds a GUID HOB for consumption by later phases. Also provides IPMI command library constructor and debug service interfaces.

Key Functions

  • ModuleEntryPoint -- Main entry: registers IPMI constructor PPI, calls LnvDebugSwitchInit
  • LnvDebugSwitchInit -- Reads LnvSetup variable, writes PEI/DXE/SMM debug switches to CMOS offsets, builds gLnvDebugSwitchHobGuid HOB
  • LnvDebugSwitchPpiCallback -- PPI notification callback with RTC timestamped debug output to serial
  • MemoryDiscoveredPpiCallback -- Logs gEfiPeiMemoryDiscoveredPpiGuid signal
  • BootInRecoveryModePpiCallback -- Logs recovery mode boot signal
  • EndOfPeiSignalPpiCallback -- Logs end-of-PEI signal
  • PeiLnvSendIpmiCmdConstructor -- IPMI command library PPI constructor with ASSERT on failure
  • DebugPrint / DebugAssert -- Debug output wrappers via GET_DEBUG_SERVICE PPI
  • CmosWriteByte / GetCmosService -- CMOS read/write via CMOS PPI
  • ReadRtcDateTime / IsLeapYear / RtcCenturySet -- RTC date/time helpers
  • PeiServicesGetPointer -- PEI services table pointer retrieval via IDT

Dependencies

  • GET_DEBUG_SERVICE PPI -- Debug output interface
  • CMOS PPI ({CCB296F6-...}) -- CMOS access
  • LnvSetup UEFI Variable -- Debug configuration input
  • PeiLnvSendIpmiCmdLib -- IPMI command library
  • PeiServicesTablePointerLibIdt -- Services table pointer via IDT

Platform

Lenovo HR650X (Purley)
Source: LenovoServerPkg/Library/LnvIpmiLib/IpmiCmd/