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

CsmDxe

Index Module Size Phase
307 CsmDxe.efi 77,412 bytes (12E64h) DXE

Overview

CsmDxe implements the UEFI Compatibility Support Module (CSM), which enables legacy BIOS boot and legacy Option ROM execution on UEFI systems. Based on the AMI CSM implementation, it installs the Legacy BIOS Protocol for 16-bit CSM16 thunk communication, manages Option ROM execution for PCI devices, handles PCI interrupt routing (PIRQ), builds E820 memory maps for legacy OS booting, and provides S3 boot script support for legacy boot paths.

Key Functions

  • CsmDxeConstructor -- Constructs the CSM driver context and initializes global state
  • CsmLegacyBiosInstall -- Installs the Legacy BIOS Protocol interface
  • CsmLegacyBiosBoot -- Handles legacy boot path entry via INT19
  • CsmLegacyBiosGetBbsInfo -- Returns BBS (BIOS Boot Specification) table entries
  • CsmExecuteOprom -- Executes and shadows a legacy Option ROM for a PCI device
  • CsmShadowAllLegacyOproms -- Shadows all discovered legacy Option ROMs
  • CsmPciIrqInit -- Initializes PCI interrupt routing
  • CsmRoutePciIrq -- Routes PCI interrupt lines via PIRQ table
  • CsmBuildE820Map -- Builds the E820 memory map for legacy OS booting
  • CsmThunk16Entry -- Entry point for 16-bit CSM16 thunk calls
  • CsmAllConnectedCallback -- ReadyToBoot callback that finalizes CSM state

Dependencies

  • EFI_LEGACY_BIOS_PROTOCOL -- Legacy BIOS protocol (produced)
  • EFI_LEGACY_INTERRUPT_PROTOCOL -- Legacy interrupt routing
  • EFI_AMI_BOARD_INFO_PROTOCOL -- AMI board information
  • EFI_PCI_IO_PROTOCOL -- PCI device access
  • SmmLockBoxLib -- S3 boot script storage
  • DxeServicesTableLib -- DXE memory and services

Platform

  • Source: AmiModulePkg/CSM/CsmDxe
  • Architecture: X64 (PE32+), MSVC VS2015
  • Formats: PE32+, 6 sections (.text, .rdata, .data, section_3, .xdata, .reloc)
  • SHA256: e019c95fa589d2c2c5fb79f8461f449f19669bdc69af35e214d910bdd8aaae75