# SmmHddSecurity

**Index:** 0208
**Size:** 26,500 bytes (6784h)
**Phase:** SMM (DXE_SMM_DRIVER)
**Source Package:** AmiModulePkg (HDD Security)

## Overview
SMM-based hard disk drive security driver that handles ATA Security commands from within SMM context. Provides SMM services for HDD password management, security freeze, and security erase operations. Intercepts SMI events related to storage device security features. Includes a .reloc section indicating it supports runtime relocation. The largest SMM driver in this batch at 26.5KB, with significant code in the .text section (18KB).

## Key Functions
- **ModuleEntryPoint** -- Main entry: calls `HddSecurityCacheContext` init, then `HddSecurityRegisterHandlers` for HDD security setup
- **HddSecurityCacheContext** (`sub_53C`) -- UEFI driver init: caches `ImageHandle`, `SystemTable`, `BootServices`, `RuntimeServices`
- **HddSecurityRegisterHandlers** (`sub_A9C`) -- Core HDD security functionality: registers SMI handlers for ATA security commands
- **HddSecurityHandleInitializeError** (`sub_9D8`) -- Error cleanup handler called when initialization fails

## Protocols
- ATA Pass-Through protocol (for ATA security command submission)
- EFI_SMM_SYSTEM_TABLE2 for SMM services
- Storage Security Command protocol
- Block I/O / Block I/O2 protocols

## Platform
HR650X (Purley), built from AmiModulePkg, DEBUG VS2015 X64
