# StaticSkuDataDxeLightningRidgeEXECB2

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **PlatformAssert** |  |
|  | **PlatformDebugPrint** |  |
|  | **ReadUnaligned64** |  |
|  | **IsSkuConfigTableGuid** |  |
|  | **StaticSkuDataDxeEntryPoint** |  |
| Globals | **-- cached pointers set during ModuleEntryPoint** |  |
| Global | **image handle.** |  |
| Global | **system table pointer.** |  |
| Global | **boot services pointer (cached from SystemTable->BootServices).** |  |
| Global | **runtime services pointer (cached from SystemTable->RuntimeServices).** |  |
| Cached | **platform protocol pointer (lazy-init via GetPlatformProtocol).** |  |
| Cached | **SKU configuration table pointer (lazy-init via GetSkuConfigTable).** |  |
| Platform | **type variable (CMOS 0x4B result caching, used by PlatformDebugPrint)** |  |
| Cached | **platform type from CMOS register 0x4B.** |  |
| 0 | **= unknown, 1-3 = valid, >3 may check HW strap at 0xFDAF0490.** |  |
| GUID | **Definitions (in .rdata/.data section)** |  |
| PLATFORM_PROTOCOL_GUID | **{36232936-0E76-31C8-A13A-3AF2FC1C3932}** |  |
| SKU_CONFIG_TABLE_GUID | **{7739F24C-93D7-11D4-9A3A-0090273FC14D}** |  |
| NUMPT_PROTOCOL_GUID | **{0FF8A1CF-A0AB-4AC0-BFC9-34A78F68DD8A}** |  |
| PIRQ_PROTOCOL_GUID | **{4C1F48A5-C976-4D90-9F03-8E9B1C327FCF}** |  |
| ACPF_PROTOCOL_GUID | **{81129EF8-391D-4F63-AE99-58517EC077E3}** |  |
| Static | **Protocol Data (embedded in .data section)** |  |
| These | **structures are defined at fixed addresses in the PE .data section.** |  |
| The | **following extern declarations allow the code to reference them.** |  |
| Defined | **at absolute address 0x40B0 (after GUID header).** |  |
| Defined | **at absolute address 0x40D8.** |  |
| Defined | **at absolute address 0x9020.** |  |
| gPlatformProtocol | **is lazy-init via GetPlatformProtocol().** |  |
| If | **it's NULL, LocateProtocol hasn't succeeded and we skip.** |  |
| GetPlatformProtocol | **();** |  |
| Protocol | **offset +0x08: DebugAssert(FileName, LineNumber, Description)** |  |
| Return | **cached value if already resolved.** |  |
| if | **(gPlatformProtocol == NULL) {** |  |
| Health | **check: allocate 31 bytes as a pool probe.** |  |
| PoolProbe | **= (UINT64)gBootServices->AllocatePool (31);** |  |
| Free | **the probe allocation immediately.** |  |
| If | **pool returned > 0x10 bytes, allocator is healthy -> LocateProtocol.** |  |
| if | **(PoolProbe <= 0x10) {** |  |
| Locate | **the platform protocol by GUID.** |  |
| If | **LocateProtocol failed, ensure we return NULL.** |  |
| Read | **CMOS register 0x4B for platform type.** |  |
| Preserve | **NMI mask (bit 7) in CMOS address register.** |  |
| CmosAddr | **= __inbyte (0x70);** |  |
| Determine | **routing mask from platform type.** |  |
| if | **(PlatformType > 3) {** |  |
| Value | **is stale/invalid; treat as unchanged.** |  |
| PlatformType | **= PlatformType;  // No-op: preserve existing** |  |
| PlatformType | **= (*(volatile UINT8 *)0xFDAF0490 & 2) | 1;** |  |
| DEBUG_ERROR | **if (PlatformType == 1) {** |  |
| DEBUG_INIT | **}** |  |
| Call | **protocol's DebugPrint only if the status mask matches.** |  |
| if | **((RouteMask & Status) != 0) {** |  |
| Read | **the known GUID as two 64-bit unaligned values.** |  |
| KnownLow | **= ReadUnaligned64 (&mSkuConfigTableGuid);** |  |
| Read | **the candidate GUID as two 64-bit unaligned values.** |  |
| CheckLow | **= ReadUnaligned64 (GuidToCheck);** |  |
| if | **(gSkuConfigTable == NULL) {** |  |
| Initialize | **to NULL** |  |
| Get | **the configuration table count and array pointer from SystemTable.** |  |
| EntryCount | **= *(UINTN *)((UINT8 *)gSystemTable + 104);   // SystemTable->NumberOfTableEntries** |  |
| Walk | **the ConfigurationTable array looking for our GUID.** |  |
| Table | **entries are 24 bytes (16-byte GUID + 8-byte pointer).** |  |
| for | **(Index = 0; Index < EntryCount; Index++) {** |  |
| ASSERT_EFI_ERROR | **output for table not found.** |  |
| PlatformDebugPrint | **(** |  |
| EFI_NOT_FOUND | **encoding** |  |
| ConfigurationTable | **is NULL** | system not ready. |
| Cache | **ImageHandle.** |  |
| gImageHandle | **= ImageHandle;** |  |
| Cache | **SystemTable.** |  |
| gSystemTable | **= SystemTable;** |  |
| Cache | **BootServices.** |  |
| gBootServices | **= SystemTable->BootServices;** |  |
| Cache | **RuntimeServices.** |  |
| gRuntimeServices | **= SystemTable->RuntimeServices;** |  |
| Locate | **the SKU configuration table (cached in gSkuConfigTable).** |  |
| This | **walks SystemTable->ConfigurationTable[] looking for our GUID.** |  |
| GetSkuConfigTable | **(NULL);** |  |
| Locate | **platform protocol on the ImageHandle.** |  |
| This | **protocol handles InstallProtocol calls.** |  |
| Status | **= gBootServices->LocateProtocol (** |  |
| Install | **NUMPT protocol: GUID at 0x40C8, interface at 0x40B0, size 24.** |  |
| Status | **= ((PLATFORM_PROTOCOL *)Protocol)->InstallProtocol (** |  |
| Install | **PIRQ protocol: GUID at 0x40E8, interface at 0x40D8, size 16.** |  |
| Install | **ACPF protocol: GUID at 0x9030, interface at 0x9020, size 16.** |  |
| and | **mAcpfProtocolIf are defined in the .data section of the PE image** |  |
| at | **fixed offsets (0x40B0, 0x40D8, 0x9020 respectively). Their contents** |  |
| were | **set at build time by the UBA framework and are treated as** |  |
| The | **NUMPT interface references two additional tables:** |  |
| The | **PIRQ interface references one table (0x90D8):** |  |
| where | **PIRQ routing entries at 0x9240+ are 32 bytes each:** |  |
| The | **ACPF interface is self-contained (board type field).** |  |

---
*Generated by HR650X BIOS Decompilation Project*