# IioCfgUpdateDxeCLX64L

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **ReadIioSocketConfig** |  |
|  | **UbaDebugPrint** |  |
|  | **CompareGuid** |  |
|  | **RegisterIioPlatformConfig** |  |
|  | **IioCfgUpdateDxeEntry** |  |
| Global | **caches for UEFI Boot/Runtime services and protocol pointers.** |  |
| These | **are populated by the entry point and used by helper functions.** |  |
| EFI_BOOT_SERVICES | ***gBS;** |  |
| Cached | **protocol pointers for UBA debug and UBA IIO configuration.** |  |
| Initialized | **on first use, then reused for subsequent calls.** |  |
| UBA_DEBUG_PROTOCOL | ***mUbaDebugProtocol   = NULL;   ///< Located by GetUbaDebugProtocol()** |  |
| CMOS | **register 0x4B stores the socket configuration type.** |  |
| volatile | **UINT8        mSocketConfig;** |  |
| IIO | **Platform Configuration Block for CLX64L (Cascade Lake)** |  |
| This | **data block is registered under each of the four sub-system GUIDs.** |  |
| The | **values represent platform-specific IIO configuration parameters.** |  |
| Structure | **layout:** |  |
| IIO_PLATFORM_CONFIG_BLOCK | **mIioPlatformConfig = {** |  |
| Return | **cached protocol if already located.** |  |
| if | **(mUbaDebugProtocol != NULL) {** |  |
| Check | **the HOB list size as a platform sanity check.** |  |
| The | **number of HOB entries should be <= 0x10 for this platform.** |  |
| HobList | **= (EFI_HANDLE)gBS->GetHobList ();** |  |
| HOB | **list exceeds expected size; protocol lookup is skipped.** |  |
| return | **NULL;** |  |
| Locate | **the UBA debug protocol.** |  |
| Status | **= gBS->LocateProtocol (** |  |
| Protocol | **not available; cache NULL to avoid repeated lookups.** |  |
| mUbaDebugProtocol | **= NULL;** |  |
| Cache | **the protocol pointer for subsequent calls.** |  |
| mUbaDebugProtocol | **= Protocol;** |  |
| GUID | **definitions for the UBA debug protocol.** |  |
| EFI_GUID | **gUbaDebugProtocolGuid = UBA_DEBUG_PROTOCOL_GUID;** |  |
| Read | **CMOS register 0x4B with NMI mask preserved.** |  |
| CmosValue | **= IoRead8 (RTC_ADDRESS_REGISTER);** |  |
| Decode | **the socket configuration.** |  |
| if | **(SocketType > 3) {** |  |
| If | **CMOS value is out of expected range, check hardware register.** |  |
| If | **SocketType is 0, fall through to hardware register check.** |  |
| if | **(SocketType == 0) {** |  |
| Read | **chipset configuration at fixed MMIO address 0xFDAF0490.** |  |
| Bit | **1 indicates socket topology (0 = dual-socket, 1 = single-socket).** |  |
| SocketType | **= (MmioRead8 (0xFDAF0490) & 0x02) | 0x01;** |  |
| Get | **the cached UBA debug protocol.** |  |
| Protocol | **= GetUbaDebugProtocol ();** |  |
| Read | **the socket configuration to select the appropriate debug mask.** |  |
| SocketType | **= ReadIioSocketConfig ();** |  |
| Valid | **socket type: set default multi-socket mask.** |  |
| DebugMask | **= 0x80000006;   // DEBUG_ERROR | 0x6 (platform-specific mask)** |  |
| Only | **print if the requested debug level matches the current mask.** |  |
| if | **((DebugMask & DebugLevel) != 0) {** |  |
| Read | **both QWORD halves of each GUID for comparison.** |  |
| Use | **unaligned reads since GUID pointers in HOB entries may not be aligned.** |  |
| return | **(ReadUnaligned64 ((UINT64 *)Guid1) == ReadUnaligned64 ((UINT64 *)Guid2)) &&** |  |
| GUID | **for the HOB Memory Allocation Module entry.** |  |
| EFI_GUID | **gHobMemoryAllocModuleGuid = MEMORY_ALLOC_MODULE_HOB_GUID;** |  |
| Return | **cached HOB entry if already located.** |  |
| if | **(mHobEntry != NULL) {** |  |
| Initialize | **cache to NULL to detect lookup failures.** |  |
| Get | **HOB list information from the System Table.** |  |
| SystemTable | **+ 104 = HobListSize (UINTN)** |  |
| SystemTable | **+ 112 = HobListStart (EFI_PHYSICAL_ADDRESS *)** |  |
| HobListSize | **= *(UINTN *)((UINT8 *)gST + 104);** |  |
| HOB | **list is empty. This indicates a system configuration error.** |  |
| DEBUG | **((DEBUG_ERROR, "\nASSERT_EFI_ERROR (Status = %r)\n", EFI_INVALID_PARAMETER));** |  |
| Walk | **the HOB list to find a matching GUID entry.** |  |
| HobListStart | **= *(EFI_PHYSICAL_ADDRESS *)((UINT8 *)gST + 112);** |  |
| Found | **the matching HOB entry; cache and return it.** |  |
| The | **entry data starts at Hob + 16 (after GUID and header).** |  |
| mHobEntry | **= (VOID *)((UINT8 *)Hob + 16);** |  |
| No | **matching HOB entry found.** |  |
| ASSERT | **(mHobEntry != NULL);** |  |
| GUIDs | **for the UBA IIO Configuration Database protocol and sub-system blocks.** |  |
| UBA | **IIO Config Protocol: {E03E0D46-5263-4845-B0A4-58D57B3177E2}** |  |
| EFI_GUID | **gUbaIioConfigProtocolGuid = UBA_IIO_CONFIG_PROTOCOL_GUID;** |  |
| IIO | **sub-system configuration GUIDs** |  |
| EFI_GUID | **gIioConfigSubGuid1 = IIO_CONFIG_SUBGUID_1;   // {6FE6C559-4F35-4111-98E1-332A251512F3}** |  |
| Print | **trace message indicating IIO config update for CLX64L.** |  |
| UbaDebugPrint | **(DEBUG_VERBOSE, "UBA:IioCfgUpdate-TypeClx64L\n");** |  |
| Locate | **the UBA IIO Configuration Database protocol.** |  |
| Protocol | **not available on this platform.** |  |
| return | **Status;** |  |
| Register | **the IIO platform configuration block under each sub-system GUID.** |  |
| The | **same configuration block is registered four times, once per sub-system.** |  |
| Each | **call uses the protocol's SetData function with size 48 bytes.** |  |
| Status | **= UbaIioConfigDb->SetData (&gIioConfigSubGuid1, &mIioPlatformConfig, sizeof (mIioPlatformConfig));** |  |
| The | **UefiBootServicesTableLib constructor sets:** |  |
| gImageHandle | **= ImageHandle** |  |
| gST | **= SystemTable** |  |
| gBS | **= SystemTable->BootServices** |  |
| The | **UefiRuntimeServicesTableLib constructor sets:** |  |
| gRT | **= SystemTable->RuntimeServices** |  |
| Each | **pointer is validated against NULL with ASSERT.** |  |
| Walk | **the System Table's HOB database to locate the memory allocation** |  |
| module | **HOB entry (gEfiHobMemoryAllocModuleGuid).** |  |
| HobList | **= GetHobList (ImageHandle);** |  |
| HOB | **list not found - system configuration error.** |  |
| An | **ASSERT will have already been triggered inside GetHobList().** |  |
| return | **EFI_NOT_FOUND;** |  |
| Locate | **the UBA IIO Configuration Database protocol and register the** |  |
| Status | **= RegisterIioPlatformConfig ();** |  |

---
*Generated by HR650X BIOS Decompilation Project*