# SetupConfigUpdateDxeNeonCityEPECB

- **Index:** 0048
- **Size:** 3232 bytes (PE32+ x86-64, 6 sections)
- **Phase:** DXE (Driver Execution Environment)
- **SHA256:** `2b60252f94fd351425204769730c12aa6027db9d69d68348d4693844f46b6933`

## Overview

Platform-specific setup configuration update driver for the NeonCity EP EC B platform. This DXE driver follows the standard UBA (Universal BIOS Architecture) SetupConfigUpdate pattern: it caches UEFI globals (ImageHandle, SystemTable, BootServices, RuntimeServices), locates the HOB list for platform configuration, and registers a setup configuration protocol data structure via the UBA board-type protocol. The setup data block uses signature "PSET" (Platform SETup), version 1, with a data size of 0x48C (1164 bytes).

## Key Functions

| Function | Description |
|---|---|
| `SetupConfigUpdateDxeNeonCityEPECBEntryPoint` | Module entry point. Caches ImageHandle, SystemTable, BootServices, and RuntimeServices; locates the HOB list; locates the UBA board-type protocol; calls `RegisterSetupConfig` to publish the setup configuration data. |
| `GetDebugProtocol` | Locates and caches the UBA Debug Protocol interface. Performs a pool allocation test to verify UEFI boot services are operational before calling `LocateProtocol`. |
| `DebugAssert` | Reports a failed assertion via the UBA Debug Protocol's assertion handler (protocol offset 0x08). |
| `DebugPrint` | Prints a debug message via the UBA Debug Protocol's print function (protocol offset 0x00). Reads the debug level from CMOS register 0x4B to filter messages by error level mask (0x80000004 or 0x80000046). |
| `GetHobList` | Scans `SystemTable->ConfigurationTable[]` for the `EFI_HOB_LIST_GUID` entry and caches the HOB list pointer. |
| `IsHobListGuid` | Compares a GUID against `EFI_HOB_LIST_GUID` using two 8-byte unaligned reads for efficiency. |
| `ReadUnaligned64` | Reads an unaligned 64-bit value from memory with a NULL pointer check. |
| `ReturnNotFound` | Simple helper returning `EFI_NOT_FOUND`. |

## Protocols

| Protocol | Usage |
|---|---|
| UBA Debug Protocol | Provides `DebugPrint` and `DebugAssert` services for diagnostic output during driver initialization. |
| UBA Board-Type Protocol | Provides `RegisterSetupConfig` to publish platform-specific setup configuration data. Located via `gBS->LocateProtocol` in the entry point. |
| UBA Setup Config Protocol | Identifies the setup configuration block registered with the board-type protocol. |
| EFI HOB List GUID | Located in the system configuration table to retrieve the HOB (Hand-Off Block) list for platform configuration data. |

## Platform

NeonCity EP EC B — an Intel server platform variant using the UBA (Universal BIOS Architecture) framework for platform-specific setup configuration management. The CMOS debug level is read from RTC port 0x70/0x71 at register index 0x4B, with a fallback to MMIO board config register 0xFDAF0490.