# MultiSkuDistinctionDxe

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **ReadUnaligned64** |  |
|  | **CompareGuid** |  |
|  | **MsDebugPrint** |  |
|  | **MsDebugAssert** |  |
|  | **GetMultiSkuInfoFromHob** |  |
|  | **InstallSkuProtocol** |  |
|  | **MultiSkuDistinctionDxeEntryPoint** |  |
| Module | **globals** |  |
| Cached | **MsDebugProtocol pointer (0 until first successful Lookup).** |  |
| MS_DEBUG_PROTOCOL | ***gMsDebugProtocol = NULL;** |  |
| Cached | **HOB list pointer (0 until first successful GetHobList).** |  |
| VOID | ***gHobList         = NULL;** |  |
| GUID | **definitions** |  |
| Debug | **protocol lookup (sub_4C8)** |  |
| Debug | **print wrapper (sub_548)** |  |
| Read | **CMOS RTC index 0x4B** | system identification byte. |
| CmosIdx | **= IoRead8 (0x70);** |  |
| Determine | **mask based on SKU byte.** |  |
| if | **(SkuByte > 3) {** |  |
| SkuByte | **= (*(volatile UINT8 *)0xFDAF0490 & 2) | 1;** |  |
| Protocol | **vtable entry [0] is the DebugPrint function.** |  |
| return | **Protocol->DebugPrint (ErrorLevel, Format, Args);** |  |
| Assert | **wrapper (sub_5D0)** |  |
| Protocol | **vtable entry [1] is the DebugAssert function.** |  |
| HOB | **list retrieval (sub_610)** |  |
| No | **configuration table entries.** |  |
| MsDebugPrint | **(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", 0x800000000000000Eull);** |  |
| HOB | **GUID-ext search (sub_6F0)** |  |
| Extract | **Multi-SKU info from HOB (sub_740)** |  |
| Walk | **the HOB list looking for a GUID-ext HOB whose data matches** |  |
| Hob | **= FindHobByGuid (&gLenovoMultiSkuHobGuid, HobList);** |  |
| The | **3-byte SKU type is at offset 48 from the HOB base.** |  |
| SKU | **Protocol installation (sub_470)** |  |
| SKU | **info not available** | still try to publish protocol |
| with | **whatever we have (or the HOB info is not critical).** |  |
| Not | **a unified SKU byte: publish the protocol.** |  |
| Status | **= gBootServices->HandleProtocol (** |  |
| Entry | **Point (sub_344 / _ModuleEntryPoint)** |  |
| Save | **global protocol references.** |  |
| gImageHandle | **= ImageHandle;** |  |
| GetHobList | **();** |  |
| Read | **SKU info from HOB.** |  |
| Status | **= GetMultiSkuInfoFromHob (&SkuInfo);** |  |
| Check | **the SKU type byte.** |  |
| 0x55 | **= 'U' (unified / unknown SKU)** | delay installation. |
| if | **(SkuInfo.SkuType[0] == 0x55) {** |  |
| Create | **an ExitBootServices notification event.** |  |
| Status | **= gBootServices->CreateEvent (** |  |
| Register | **the configuration table entry for the SKU GUID.** |  |
| return | **InstallSkuProtocol ();** |  |

---
*Generated by HR650X BIOS Decompilation Project*