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

ReFlash

Index Module Size Phase
306 ReFlash.efi 70,212 bytes (11244h) DXE

Overview

ReFlash is a large DXE driver responsible for BIOS flash update operations on the Lenovo HR650X platform. It implements the firmware reflash mechanism, managing flash device detection, image validation, write sequencing, and recovery paths. With 191 functions and 7 PE sections including a .rsrc resource section, it is one of the more substantial drivers in the BIOS image.

Key Functions

  • ReFlashDriverEntryPoint -- Main driver initialization; locates flash hardware and installs protocols
  • ReFlashEntry -- Core reflash logic entry point
  • ReFlashValidateImage -- Validates the flash image integrity and signature
  • ReFlashWriteBlocks -- Writes firmware blocks to the flash device
  • ReFlashEraseBlocks -- Erases specified flash regions before writing
  • ReFlashReadBlocks -- Reads firmware blocks from the flash device
  • ReFlashCheckStatus -- Checks flash operation status and reports progress
  • ReFlashGetDeviceInfo -- Queries flash device geometry and capabilities
  • ReFlashProgressCallback -- Reports reflash progress to the user interface

Dependencies

  • Flash device protocols -- SPI flash controller access
  • Firmware volume protocol -- FFS/FV image parsing
  • UEFI Runtime Services -- Variable and reset services
  • DebugLib -- Diagnostic output

Platform

  • Source: AmiModulePkg (flash update package)
  • Architecture: X64 (PE32+)
  • Formats: PE32+, 7 sections (.text, .rdata, .data, section_3, .xdata, .rsrc, .reloc)
  • SHA256: b58216f27ddcba0878c1a01432143047b51a4bd3276aec0d9d591cb7ee8bdfcd