# LnvDxeStatusCode

**Index:** 0274 | **Size:** 6.0 KB | **Phase:** DXE | **Arch:** X64

## Overview

Lenovo-specific DXE status code driver that bridges UEFI status code reports to a custom Lenovo Status Code Protocol. Reports status codes filtered by a CMOS-controlled severity mask, forwards ASSERT failures via the Lenovo protocol, and handles virtual address change and ExitBootServices transitions for runtime operation. Registers protocol notifications and manages runtime/boot-time conversion of protocol pointers.

## Key Functions

- **LnvDxeStatusCodeEntryPoint** (0x10D0): Entry point -- saves gImageHandle, locates HOB list, registers protocol notify events for ExitBootServices and VirtualAddressChange
- **ReportStatusCodeFiltered** (0x14A8): Reads CMOS debug level from index 0x4B, builds a severity filter mask, and forwards matching status codes to the Lenovo protocol
- **LocateRuntimeStatusCodeProtocol** (0x168C): Locates the protocol via gBS->LocateProtocol with pool allocation
- **OnExitBootServicesClearBs** / **OnExitBootServicesConvertLenovo** / **OnVirtualAddressChange**: Event callbacks that manage protocol pointer conversion for runtime phase

## Protocols/Dependencies

- Lenovo Status Code Protocol (custom GUID 0x3000)
- gEfiStatusCodeRuntimeProtocolGuid (0x3010, from MdeModulePkg)
- gEfiHobListGuid, gEfiEventExitBootServicesGuid, gEfiEventVirtualAddressChangeGuid
- CMOS RTC (I/O ports 0x70/0x71) for debug level read at index 0x4B

## Platform

Lenovo HR650X. Lenovo-specific status code forwarding with CMOS-controlled debug severity filtering.