# ReFlashSmm

- **Index:** 0203
- **Size:** 10,372 bytes (10.1 KB)
- **Phase:** SMM (System Management Mode)
- **PE Format:** PE32+ x86-64, 5 sections (.text, .rdata, .data, section_3, .xdata)

## Overview

SMM driver for BIOS reflash (update) operations. This driver provides secure SMM-based firmware update capabilities, allowing the BIOS to be reprogrammed from within the running system. It handles flash device detection (SPI), write-enable sequencing, block erase and program operations, and update verification. Operating in SMM ensures that flash write operations are protected from OS interference and that only authenticated update requests are processed.

## Key Functions

- **ModuleEntryPoint** -- Standard SMM driver entry and initialization
- **ReFlashSmmConstructor** -- AutoGen library constructor
- **ReFlashSmmCore** -- Core reflash SMM logic for flash detection, write-enable sequencing, and erase/program operations
- **ReFlashSmmCleanup** -- Cleanup path for reflash failures

## Protocols

- **SmmBase2 Protocol** -- SMM entry point
- **SmmSpiProtocol** -- SPI flash controller access from SMM
- **FirmwareVolumeBlock Protocol** (SMM) -- Block-level flash access
- **SmmCommunication Protocol** -- For receiving flash commands from DXE

## Platform

- **Build:** HR6N0XMLK DEBUG_VS2015 X64
- **Source:** AmiModulePkg/ReFlashSmm
- **Part of:** HR650X BIOS SMM infrastructure (indices 0195-0199, 0201-0203)
