AMI-Aptio-BIOS-Reversed / AmiCompatibilityPkg / CmosManager / CmosManagerDxe /
@Ajax Dong Ajax Dong authored 2 days ago
..
CmosDxe.c Recovering names (cleanups) 2 days ago
CmosDxe.h Recovering names (cleanups) 2 days ago
CmosDxe.md Restructure the repo 2 days ago
README.md Restructure the repo 2 days ago
README.md

CmosDxe

Field Value
Index 263
Module CmosDxe
File CmosDxe.efi
PE format PE32+
Size (hex) 45E4h
Size (bytes) 17,892
Subsystem EFI Boot Service (000Bh)
Sections 6 (.text, .rdata, .data, section_3, .xdata, .reloc)
Phase DXE
Source AmiCompatibilityPkg/CmosManager
Build HR6N0XMLK, DEBUG_VS2015, X64

Overview

This DXE driver provides a comprehensive CMOS/RTC NVRAM management protocol (AMI CmosManager). It supports standard CMOS NVRAM access via ports 0x70/0x71 (NMI-enabled), extended CMOS access via ports 0x72/0x73, and bank-switched CMOS register ranges. The driver implements CMOS shadow buffering with deferred write/flush, checksum calculation and verification, RTC time read/write, optimal defaults loading, HOB-based CMOS variable persistence, and a BIOS setup variable storage interface.

Key Functions

  • CmosManagerDriverEntry / CmosManagerInstallProtocol -- DXE entry and protocol installation
  • CmosReadRegister / CmosWriteRegister -- single register read/write by address
  • CmosReadVariable / CmosWriteVariable -- 32-bit extended CMOS bank read/write
  • CmosVerifyChecksum / CmosUpdateChecksumDelta -- checksum verification and update
  • CmosReadTime / CmosWriteTime -- RTC time read/write (BCD-encoded, century-aware)
  • CmosReadShadowBuffer / CmosFlushOrLoadDefaults -- shadow buffer management
  • CmosPortIoAccess / CmosBankPortIoAccess -- raw CMOS port I/O access
  • CmosGetDebugLevel / CmosDebugPrint -- debug output infrastructure

Dependencies

  • CMOS I/O ports 0x70/0x71 (standard) and 0x72/0x73 (extended)
  • UEFI Boot Services
  • UEFI Runtime Services
  • PCD Protocol
  • HOB List
  • DebugLib

Platform

Intel/AMD64 UEFI, Lenovo HR650X BIOS