# StaticSkuDataDxeCLX64L

**PE Index:** 0059
**Size:** 64,324 bytes (62.8 KB) -- .text: 1,215 B, .rdata: 14.2 KB, .data: 45.2 KB
**Phase:** DXE (Driver Execution Environment)
**Machine:** x86-64 (PE32+)
**Sections:** 6 (.text, .rdata, .data, section_3, .xdata, .reloc)

---

## Overview

StaticSkuDataDxeCLX64L is a UEFI DXE driver that provides static SKU (Stock Keeping Unit) configuration data for the CLX64L (Cooper Lake 64-Lane) platform. It installs a protocol interface exposing platform SKU identification and configuration tables for use by other DXE drivers during system initialization.

The driver's code footprint is small (~1.2 KB of .text), but it carries approximately 45 KB of static SKU configuration data in the .data section, including per-SKU entries for power management, memory map, PCIe lane configuration, and thermal management settings. The data layout follows the Intel Firmware Support Package (FSP) SKU data format, generated by Intel/AMI SKU generation tools.

**Key responsibilities:**
- Installing the SKU Data Protocol into the UEFI protocol database
- Reading SKU type from CMOS/NVRAM register 0x4B to identify the platform variant
- Providing ACPI C-State Control Table (CCT) method names (_SB_.CCT0 through _SB_.CCT8) and CPU Fan Health method name (_SB_.CFH0) for platform AML code
- Walking the HOB (Hand-Off Block) list to retrieve platform configuration data passed from the PEI phase

---

## Key Functions

| Function | Description |
|---|---|
| `StaticSkuDataDxeEntryPoint()` | Entry point. Initializes global UEFI table pointers (gBS, gRT, gImageHandle, gST), caches the HOB list, installs the SKU Data Protocol, and registers a protocol notify for consumers. |
| `LocateSkuDataProtocol()` | Searches the UEFI protocol database for the SKU Data Protocol by GUID and returns its interface pointer. |
| `GetSkuTypeFromCmos()` | Reads CMOS/NVRAM register 0x4B to determine the platform SKU type. Falls back to hardware strap at fixed address 0xFDAF0490 when CCT version is uninitialized. Returns SKU type identifiers (2 or 4) based on CCT version. |
| `GetHobList()` | Walks the HOB (Hand-Off Block) list from the UEFI System Table to find a HOB matching a given GUID. Caches the result globally. |
| `CompareGuidField()` | Compares two 8-byte aligned GUID values for equality during HOB traversal. |
| `ReadUnaligned64()` | Reads a UINT64 value from potentially unaligned memory (safe on x64). |
| `DebugPrint()` | Locates the debug protocol and forwards formatted debug messages. |

---

## Protocols

| Protocol | GUID | Description |
|---|---|---|
| SKU Data Protocol | `gSkuDataProtocolGuid` | Exposes platform SKU identification and static configuration tables. Installed by this driver during entry point execution. Consumed by other DXE drivers needing platform SKU information. |
| HOB List | (System Table configuration table) | Hand-Off Block list passed from PEI to DXE phase, traversed by `GetHobList()` to locate SKU configuration HOBs. |
| Debug Protocol | (EFI_DEBUG_PROTOCOL) | Used by `DebugPrint()` for formatted debug message output during initialization. |

---

## Platform

This driver targets the **CLX64L** (Cooper Lake 64-Lane) server platform. SKU type determination reads from CMOS register 0x4B, with a hardware strap fallback at PCH/CPU register address 0xFDAF0490 (bit 1). The driver maps CCT (CPU C-State Control Table) versions 1 and 2 to distinct SKU types (2 and 4), with version values greater than 3 passed through directly from CMOS. The .data section (~45 KB) contains the full FSP-format SKU configuration payload for the CLX64L platform, generated by Intel/AMI SKU tools.