# SlotDataUpdateDxeLightningRidgeEXECB3

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **GetPlatformType** |  |
|  | **PlatformPassthrough** |  |
|  | **UbaDebugPrint** |  |
|  | **UbaAssert** |  |
|  | **CompareGuidQwords** |  |
|  | **ReadUnaligned64** |  |
|  | **SlotDataUpdateEntryPoint** |  |
| Global | **Variables (EFI System Table globals, matched to BootServicesTableLib)** |  |
| The | **EFI image handle for this driver.** |  |
| Stored | **from ImageHandle parameter of ModuleEntryPoint.** |  |
| The | **EFI System Table pointer for this driver.** |  |
| Stored | **from SystemTable parameter of ModuleEntryPoint.** |  |
| The | **EFI Boot Services Table pointer, cached from SystemTable->BootServices.** |  |
| The | **EFI Runtime Services Table pointer, cached from SystemTable->RuntimeServices.** |  |
| Cached | **HOB list pointer from the EFI Configuration Table.** |  |
| Found | **by scanning ConfigurationTable for EFI_HOB_LIST_GUID.** |  |
| Cached | **UBA HOB Database Protocol interface pointer.** |  |
| Retrieved | **via gBS->LocateProtocol() on first access.** |  |
| Global | **Data: PSLT Structure Templates and HOB Output Buffers** |  |
| EFI_HOB_LIST_GUID | **value stored for Configuration Table comparison.** |  |
| Used | **by GetHobListFromConfigTable() to find the HOB list in the** |  |
| System | **Table's ConfigurationTable array.** |  |
| GUID | **for the UBA HOB Database Protocol.** |  |
| Used | **with gBS->LocateProtocol() to find the HOB database interface.** |  |
| GUID | **for the PSLT (Platform Slot Table) HOB entry (40-byte output).** |  |
| GUID | **for the variant HOB entry (32-byte output).** |  |
| Output | **buffer for the variant HOB query (32 bytes).** |  |
| Receives | **slot table data from the first HOB GUID query.** |  |
| Contains | **PSLT header data with platform-specific slot configuration.** |  |
| Output | **buffer for the extended PSLT HOB query (40 bytes).** |  |
| Contains | **PSLT header plus additional slot data.** |  |
| Same | **PSLT header as gSlotTableData (32 bytes)** |  |
| Extended | **data at offset +0x20** |  |
| Function | **Implementations** |  |
| Platform | **type 2 = Lightning Ridge EX EC B3** |  |
| return | **2;** |  |
| Simple | **identity function - return the input value** |  |
| return | **Value;** |  |
| Return | **cached protocol if already found** |  |
| if | **(gUbaHobProtocol != NULL) {** |  |
| TPL | **guard: only locate protocol if current TPL <= TPL_NOTIFY (16)** |  |
| Raise | **to TPL_HIGH_LEVEL (31) to check, then restore** |  |
| OldTpl | **= gBootServices->RaiseTPL (TPL_HIGH_LEVEL);** |  |
| Locate | **the UBA HOB Database Protocol** |  |
| The | **debug print function at offset +0x08 in the protocol has signature:** |  |
| UINTN | **(*)(UINTN DebugLevel, CONST CHAR8 *Format, VA_LIST Args)** |  |
| It | **uses a debug flags mask: if (DebugFlags & DebugLevel) is non-zero** |  |
| the | **message is printed. Otherwise it is supressed.** |  |
| DebugFlags | **= 0x80000004;  ///< Default mask: allow INFO and ERROR levels** |  |
| Call | **protocol debug function (UINT64 function pointer at offset +0x08** |  |
| to | **match x64 calling convention padding)** |  |
| Result | **= ((UINT64 (*)(VOID *, UINTN, CONST CHAR8 *, VA_LIST))** |  |
| Log | **assert with UBA debug protocol** |  |
| UbaDebugPrint | **(** |  |
| Deadloop | **- CPU will spin here forever** |  |
| This | **matches the original decompiled behavior** |  |
| while | **(TRUE) {** |  |
| Return | **cached HOB list if already found** |  |
| if | **(gHobList != NULL) {** |  |
| Get | **Configuration Table info from SystemTable** |  |
| SystemTable | **+ 0x68 = NumberOfTableEntries** |  |
| SystemTable | **+ 0x70 = ConfigurationTable pointer** |  |
| gHobList | **= NULL;** |  |
| No | **configuration table entries - this is an error** |  |
| Log | **assert and enter deadloop** |  |
| Walk | **the Configuration Table entries looking for EFI_HOB_LIST_GUID** |  |
| Each | **entry is 24 bytes: GUID(16) + Interface pointer(8)** |  |
| for | **(Index = 0; Index < TableEntryCount; Index++) {** |  |
| Calculate | **current entry address (24 bytes per entry)** |  |
| VOID | ***Entry = (UINT8 *)ConfigTable + (Index * 24);** |  |
| Check | **if this entry's GUID matches EFI_HOB_LIST_GUID** |  |
| Compare | **by splitting both GUIDs into two 8-byte halves** |  |
| if | **(CompareGuidQwords (Entry, &gEfiHobListGuid, (UINT8 *)&gEfiHobListGuid + 8)) {** |  |
| Found | **the HOB list - cache the interface pointer at offset +0x10** |  |
| gHobList | **= *(VOID **)((UINT8 *)Entry + 16);** |  |
| If | **HOB list was not found, ASSERT** |  |
| if | **(gHobList == NULL) {** |  |
| Read | **unaligned QWORDs from both entries** |  |
| EntryQword0 | **= ReadUnaligned64 (EntryAddr);** |  |
| Both | **halves must match** |  |
| return | **(BOOLEAN)(EntryQword0 == TemplateQword0 && EntryQword1 == TemplateQword1);** |  |
| NULL | **pointer check (asserts and deadloops if NULL)** |  |
| if | **(Buffer == NULL) {** |  |
| Read | **8 bytes unaligned** |  |
| return | ***(volatile UINT64 *)Buffer;** |  |
| PHASE | **1: Initialize EFI Service Pointers** |  |
| Save | **ImageHandle - required for UEFI driver registration** |  |
| NULL | **check via ASSERT (from UefiBootServicesTableLib)** |  |
| gImageHandle | **= ImageHandle;** |  |
| Save | **SystemTable pointer** |  |
| NULL | **check via ASSERT** |  |
| gSystemTable | **= SystemTable;** |  |
| Cache | **Boot Services table pointer** |  |
| gBootServices | **= SystemTable->BootServices;** |  |
| Cache | **Runtime Services table pointer** |  |
| gRuntimeServices | **= SystemTable->RuntimeServices;** |  |
| PHASE | **2: Initialize HOB List Access** |  |
| Locate | **the HOB list from the System Table Configuration Table** |  |
| This | **is needed for subsequent HOB queries** |  |
| GetHobListFromConfigTable | **();** |  |
| PHASE | **3: Platform Identification** |  |
| Print | **platform identifier string for UBA framework debugging** |  |
| PHASE | **4: Query UBA HOB Protocol for Slot Data** |  |
| This | **protocol provides access to platform-specific HOBs** |  |
| Status | **= gBootServices->LocateProtocol (** |  |
| Query | **variant HOB (32-byte output buffer)** |  |
| This | **retrieves platform slot table variant data that defines** |  |
| the | **PCIe slot configuration for this specific board revision.** |  |
| Status | **= UbaHobProtocol->GetNextGuidHob (** |  |
| Query | **PSLT HOB (40-byte output buffer)** |  |
| This | **retrieves extended slot table data with additional** |  |

---
*Generated by HR650X BIOS Decompilation Project*