# Recovery

| Index | Module | Size | Phase |
|-------|--------|------|-------|
| 0414 | Recovery.efi | 0x20A0 (8352 bytes) | PEI |

## Overview

This PEIM implements BIOS recovery capsule loading and validation during the PEI phase. It locates recovery firmware volumes, loads recovery capsule images into memory, validates firmware capsule integrity, and manages the recovery data state (tracking capsule base address, size, and validation flags). It uses PEI services to enumerate FVs and locate recovery image files by GUID.

## Key Functions

- `ModuleEntryPoint` -- UEFI PEI entry point, dispatches to recovery logic
- `RecoveryLoadCapsule` -- Allocates memory, loads capsule FV, validates authentication
- `ValidateFirmwareCapsule` -- Capsule integrity and signature validation
- `PeiLocateProtocol` -- Enumerates FVs and locates files by GUID
- `CopyMem` / `SetMem` / `SetMem32` / `SetMem64` -- Memory utility functions

## Dependencies

- Recovery.h (module header)
- PEI Services (FV enumeration, file lookup, memory allocation)
- Capsule validation library
- ReportStatusCode PPI for error reporting

## Platform

- Architecture: IA32 (32-bit)
- Machine type: x86 (0x014C)
- Subsystem: EFI Boot Service Driver (0x000B)
- Format: PE32
- Sections: .text, .rdata, .data, .reloc