# StaticSkuDataDxeCLX64L

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **GetSkuTypeFromCmos** |  |
|  | **DebugPrint** |  |
|  | **CompareGuidField** |  |
|  | **ReadUnaligned64** |  |
|  | **StaticSkuDataDxeEntryPoint** |  |
| Global | **Variables** |  |
| UEFI | **handle for this driver image (set by ModuleEntryPoint)** |  |
| EFI_HANDLE | **gImageHandle = NULL;** |  |
| Pointer | **to the UEFI System Table (set by ModuleEntryPoint)** |  |
| EFI_SYSTEM_TABLE | ***gSystemTable = NULL;** |  |
| Pointer | **to the UEFI Boot Services Table (set by ModuleEntryPoint)** |  |
| EFI_BOOT_SERVICES | ***gBootServices = NULL;** |  |
| Pointer | **to the UEFI Runtime Services Table (set by ModuleEntryPoint)** |  |
| EFI_RUNTIME_SERVICES | ***gRuntimeServices = NULL;** |  |
| Protocol | **notification handle for the SKU Data Protocol** |  |
| VOID | ***mSkuDataProtocolNotifyHandle = NULL;** |  |
| HOB | **(Hand-Off Block) list pointer retrieved from SystemTable** |  |
| VOID | ***mHobList = NULL;** |  |
| ACPI | **Method Name Strings for CCT (CPU C-State Control Table) Entries** |  |
| These | **ACPI method names are used by platform AML code to query per-core** |  |
| The | **CLX64L platform provides individual C-state control tables for** |  |
| each | **logical processor grouping.** |  |
| CONST | **CHAR8  *mCctMethodNames[MAX_CCT_ENTRIES] = {** |  |
| CPU | **C-State Control Table Entry 0** |  |
| CPU | **C-State Control Table Entry 1** |  |
| CPU | **C-State Control Table Entry 2** |  |
| CPU | **C-State Control Table Entry 3** |  |
| CPU | **C-State Control Table Entry 4** |  |
| CPU | **C-State Control Table Entry 5** |  |
| CPU | **C-State Control Table Entry 6** |  |
| CPU | **C-State Control Table Entry 7** |  |
| CPU | **C-State Control Table Entry 8** |  |
| ACPI | **method name for CPU Fan Health monitoring** |  |
| CONST | **CHAR8  *mCfh0MethodName = "_SB_.CFH0";** |  |
| Static | **SKU Configuration Data Tables** |  |
| The | **following data occupies the .data section from 0x4060 through ~0xF560** |  |
| The | **exact structure of these tables is generated by the Intel/AMI** |  |
| SKU | **generation tools and is platform-specific to CLX64L.** |  |
| full | **SKU configuration payload. This includes 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.** |  |
| Function | **Implementations** |  |
| Allocate | **a small pool buffer (31 bytes) to satisfy LocateProtocol** |  |
| requirements | **on some firmware implementations. Free it immediately** |  |
| after | **the call since we only need the protocol interface pointer.** |  |
| PoolBuffer | **= gBootServices->AllocatePool (31);** |  |
| Verify | **that the allocated pool pointer is valid (at least 16 bytes** |  |
| of | **addressable space). If the allocation was too small or the system** |  |
| is | **in a constrained state, bail out.** |  |
| if | **((UINTN)PoolBuffer <= 0x10) {** |  |
| Locate | **the SKU Data Protocol interface** |  |
| Status | **= gBootServices->LocateProtocol (** |  |
| Initialize | **the SKU type to unknown** |  |
| SkuType | **= SKU_TYPE_UNKNOWN;** |  |
| Read | **CMOS register 0x4B while preserving NMI enable bit** |  |
| CmosValue | **= IoRead8 (0x70);** |  |
| CCT | **(CPU C-State Control Table) version interpretation** |  |
| if | **(CmosValue > 3) {** |  |
| Valid | **CCT version > 3: use the CMOS register value directly** |  |
| SkuType | **= CmosValue;** |  |
| CCT | **version 0 (uninitialized): determine SKU from hardware strap** |  |
| Read | **platform strap at fixed address 0xFDAF0490 (PCH/CPU register)** |  |
| extract | **bit 1 to determine SKU variant.** |  |
| PlatformFlags | **= *(UINT64 *)0xFDAF0490;** |  |
| Map | **the raw CCT value to the platform SKU type:** |  |
| CCT | **== 1 -> SKU type 2 (0x80000004 >> 24)** |  |
| CCT | **== 2 -> SKU type 2 (0x80000006 >> 24, same effective type)** |  |
| other | **-> SKU type 4 (default)** |  |
| if | **((UINT8)(SkuType - 1) <= 0xFD) {** |  |
| Locate | **the debug protocol** |  |
| DebugProtocol | **= LocateSkuDataProtocol ();** |  |
| Use | **the debug protocol's output function (offset +8 from interface)** |  |
| Debug | **= (EFI_DEBUG_PROTOCOL *)DebugProtocol;** |  |
| On | **first call, locate the HOB list from the System Table** |  |
| if | **(mHobList == NULL) {** |  |
| The | **HOB list pointer is stored at offset +104 from the System Table** |  |
| mHobList | **= NULL;** |  |
| Walk | **the HOB list to find a HOB whose GUID matches** |  |
| for | **(Index = 0; Index < HobCount; Index++) {** |  |
| Found | **the matching HOB, store its GUID-specific field (+16)** |  |
| mHobList | **= *(VOID **)((UINT8 *)Hob.Raw + 16);** |  |
| If | **no matching HOB found, assert and leave mHobList as NULL** |  |
| Also | **compare the second qword (GUID.Data4 field range)** |  |
| Value1 | **= ReadUnaligned64 ((UINT8 *)Buffer1 + 8);** |  |
| Assert | **that the buffer pointer is valid** |  |
| ASSERT | **(Buffer != NULL);** |  |
| Read | **the unaligned 64-bit value directly** |  |
| The | **platform must support unaligned access (x64 does)** |  |
| return | ***(UINT64 *)Buffer;** |  |
| Store | **ImageHandle globally for later use** |  |
| gImageHandle | **= ImageHandle;** |  |
| Store | **SystemTable pointer globally** |  |
| gSystemTable | **= SystemTable;** |  |
| Store | **Boot Services Table pointer globally** |  |
| gBootServices | **= SystemTable->BootServices;** |  |
| Store | **Runtime Services Table pointer globally** |  |
| gRuntimeServices | **= SystemTable->RuntimeServices;** |  |
| Initialize | **the HOB list cache for SKU data lookup** |  |
| GetHobList | **(NULL);** |  |
| The | **protocol instance data (gSkuDataProtocolInstance) contains the** |  |
| static | **SKU configuration tables for the CLX64L platform.** |  |
| Register | **protocol notify to allow SKU data consumers to connect** |  |
| Status | **= gBootServices->RegisterProtocolNotify (** |  |
| Install | **the full SKU configuration interface** |  |
| Status | **= gBootServices->InstallProtocolInterface (** |  |

---
*Generated by HR650X BIOS Decompilation Project*