Newer
Older
AMI-Aptio-BIOS-Reversed / Aint13 / README.md
@Ajax Dong Ajax Dong 2 days ago 1 KB Init

Aint13

Index: 0223 | Size: 4,608 bytes (9,216 body) | Phase: DXE

Overview

UEFI DXE driver providing legacy INT 13h disk I/O service compatibility for AHCI/SATA controllers. Discovers AHCI mass storage controllers via PCI I/O protocol, enumerates attached block devices (ATA and ATAPI), and wires them into real-mode INT 13h dispatch infrastructure. Parses MBR/EBR partition tables for CHS geometry optimization and programs INT 13h vector tables into legacy BIOS real-mode memory. Supports up to 8 disks with both native ATA and ATAPI (CD/DVD) devices.

Key Functions

  • _ModuleEntryPoint -- DXE entry: saves globals, installs protocol interface pointing to sub_624
  • sub_624 -- Module init: PCI enumeration via PciIo protocol, allocates memory, registers timer (88ms)
  • sub_10CC -- Core dispatcher: opens PCI bridge, locates chipset-specific protocols, calls geometry setup per disk
  • sub_BD4 -- Per-disk geometry setup: 42-byte disk descriptor (sector count, heads, SPT, LBA info)
  • sub_86C -- MBR/EBR CHS geometry adjustment: parses partition table, detects filesystem types
  • sub_794 -- CHS geometry calculation: optimizes heads/SPT/cylinders from total LBA count
  • sub_E88 -- INT 13h handler registration: 69-byte record with PCI I/O base and vector programming

Protocols/Dependencies

  • PCI I/O Protocol (B2FA4764-...), UEFI Boot Services
  • Chipset-specific protocol A (DB9A1E3D-...) for PCI bridge config
  • CMOS/RTC I/O (ports 0x70/0x71) for debug level

Platform

Intel Purley (Xeon Scalable), HR650X -- AMI AmiModulePkg/AHCI/Aint13/