# UsbOcUpdateDxeLightningRidgeEXRP

| Attribute     | Value                                                             |
|---------------|-------------------------------------------------------------------|
| Index         | 0003                                                              |
| Module        | UsbOcUpdateDxeLightningRidgeEXRP                                  |
| Size (EFI)    | 3,424 bytes (D60h)                                                |
| Phase         | DXE                                                               |
| Platform      | Lightning Ridge EXRP                                              |
| Framework     | UBA (Universal BIOS Architecture)                                 |
| Source Lines  | 1,275 (2 files)                                                   |

## Overview

UsbOcUpdateDxeLightningRidgeEXRP is a UEFI DXE driver that configures USB over-current (OC) protection settings for the Lightning Ridge EXRP platform. It initializes UEFI globals, locates the HOB list, finds the UBA board-type protocol, and registers USB OC configuration data through the UBA framework. The driver shares the same UBA Board-Type Protocol GUID as other platform configuration drivers.

## Key Functions

- `_ModuleEntryPoint` -- Entry point; initializes globals, locates HOB list and UBA protocol, registers USB OC configuration
- `GetHobList` -- Scans SystemTable->ConfigurationTable[] for EFI_HOB_LIST_GUID
- `GetDebugProtocol` -- Locates and caches the DebugLib protocol interface
- `DebugPrint` -- Checks CMOS debug level and calls DebugLib protocol output
- `DebugAssert` -- Calls DebugLib protocol assertion handler
- `IsHobListGuid` -- Optimized GUID comparison using two 64-bit unaligned reads
- `ReadUnaligned64` -- Reads a 64-bit value from potentially unaligned memory

## Dependencies

- UEFI Boot Services (gBS->LocateProtocol)
- UBA Protocol ({E03E0D46-5263-4845-B0A4-58D57B3177E2})
- UBA LightningRidgeEXRP USB OC Config Protocol ({2638009E-3850-4E4B-B05D-042A32DBB9D1})
- DebugLib Protocol

## Platform

- Architecture: x86-64 (PE32+)
- Machine: 0x8664
- Subsystem: EFI Boot Service Driver (0x000B)
- Toolchain: VS2015, X64 DEBUG
- Sections: 6 (.text, .rdata, .data, .idata, .reloc)
- Entry Point: 0x390