# ExportHiiDb

| Field  | Value |
|--------|-------|
| Index  | 297 |
| Module | ExportHiiDb |
| Size   | 3872 bytes (0xF20) |
| Phase  | DXE |

HII Database export driver, part of the AMI SmiVariable module. This DXE driver exports the HII (Human Interface Infrastructure) database contents into a UEFI variable ("HiiDB") so that the HII data survives ExitBootServices and remains accessible from the OS or the AMI SMI handler at runtime. It listens for HII database protocol installation, allocates runtime memory pages, copies the HII database contents, and publishes them via SetVariable().

## Key Functions

- **ModuleEntryPoint** -- Saves system table pointers and registers HII protocol notification event
- **ExportHiiDbNotify** -- Notification callback: locates HII database, allocates RT memory, copies data, calls SetVariable("HiiDB")
- **ReadUnaligned64** -- Unaligned 64-bit read utility

## Dependencies

- UefiBootServicesTableLib, UefiRuntimeServicesTableLib
- DxeHobLib, BaseLib, UefiLib
- HII Database Protocol

## Platform

x86-64 PE32+ (UEFI DXE driver), Lenovo HR650X (Purley/Intel grantley-EP), AMI ModulePkg (SmiVariable module)