diff --git a/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.c b/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.c index a1121bc..2511d15 100644 --- a/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.c +++ b/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.c @@ -333,9 +333,9 @@ // // Detect TPM type (enable TPM 2.0 path if applicable). // - if (*(CHAR8 *)sub_6000 (1024068) >= 0) { - sub_6740 (sub_6000 (1024064)); - *(UINT8 *)sub_6000 (1024068) |= 0x80; + if (*(CHAR8 *)UefiLibGetVariable (1024068) >= 0) { + CopyMemWithOverlap (UefiLibGetVariable (1024064), 1280); + *(UINT8 *)UefiLibGetVariable (1024068) |= 0x80; } // @@ -349,10 +349,10 @@ TpmStatus = ReadControlRegister (); ClearInterruptFlag (); TpmPresent = (TpmStatus & 0x200) != 0; - Ticks = sub_6774 (1288) & 0xFFFFFF; + Ticks = IoRead32Wrapper (1288) & 0xFFFFFF; EnableInterruptFlag (); - while (((Ticks + 357 - (UINT32)sub_6774 (1288)) & 0x800000) == 0) { + while (((Ticks + 357 - (UINT32)IoRead32Wrapper (1288)) & 0x800000) == 0) { CpuPause (); } EnableInterruptFlag (); @@ -810,7 +810,7 @@ // // First invocation: measure boot variables and call OpRomStartEnd. // - sub_1E74 (); + MeasureBootVariablesAndCallOpRomStartEnd (); if (!EFI_ERROR (BootServices->LocateProtocol ( &unk_8AB0, @@ -837,7 +837,7 @@ DEBUG ((EFI_D_INFO, "Boot Variables not Measured. Error!\n")); } - sub_1F20 (); + TcgWriteResetShortEvent (7); // // Signal that we are done with boot measurements. @@ -870,11 +870,11 @@ &ResetData ); if (byte_8DA8) { - sub_6A4C (1, 50694662); + Tpm2PcrExtend (1, 50694662); } if (TpmStatus) { if (byte_8DA8) { - sub_6A4C (2147483650LL, 50694659); + Tpm2PcrExtend (2147483650LL, 50694659); } } } @@ -982,7 +982,7 @@ // // Read TPMPERBIOSFLAGS variable. // - sub_60EC ( + AmiSetVariable ( L"TPMPERBIOSFLAGS", &unk_8B30, 7, @@ -1006,7 +1006,7 @@ AmiTcgPpiVar[0] = 0; AmiTcgPpiVar[1] = 0; *((UINT32 *)&AmiTcgPpiVar[2]) = 0; - sub_60EC ( + AmiSetVariable ( L"AMITCGPPIVAR", &unk_8B20, 7, @@ -1091,12 +1091,12 @@ CommandResult = TpmSubmitCommand (TcgProtocol, 113, 1, &SetupValue); Tpm20Response = (UINT16)((CommandResult >> 8) | HIWORD (CommandResult) & 0xFF00); - sub_61C0 (TcgProtocol, Tpm20Response); + TpmUpdatePpiResponse (TcgProtocol, Tpm20Response); if (!IsTpm2Present ()) { TcgProtocolInstance->ExitBootServices (TcgProtocolInstance); } PpiFlags = 0; - sub_60EC (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); + AmiSetVariable (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); TpmResetSystem (); } @@ -1109,7 +1109,7 @@ TcgProtocolInstance->ExitBootServices (TcgProtocolInstance); } PpiFlags = 0; - sub_60EC (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); + AmiSetVariable (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); TpmResetSystem (); } @@ -1123,23 +1123,23 @@ if (!byte_8DA8) { goto PpiUpdateDone; } - sub_6A4C (1, 50694667); + Tpm2PcrExtend (1, 50694667); } else { if (!byte_8DA8) { goto PpiUpdateDone; } - sub_6A4C (2147483650LL, 50694676); + Tpm2PcrExtend (2147483650LL, 50694676); } PpiUpdateDone: Tpm20Response = (UINT16)((CommandResult >> 8) | HIWORD (CommandResult) & 0xFF00); - sub_61C0 (TcgProtocol, Tpm20Response); + TpmUpdatePpiResponse (TcgProtocol, Tpm20Response); if (!IsTpm2Present ()) { TcgProtocolInstance->ExitBootServices (TcgProtocolInstance); } PpiFlags = 0; - sub_60EC (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); + AmiSetVariable (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); TpmResetSystem (); } } else { @@ -1155,12 +1155,12 @@ CommandResult = TpmSubmitCommand (TcgProtocol, 113, 1, &SetupValue); Tpm20Response = (UINT16)((CommandResult >> 8) | HIWORD (CommandResult) & 0xFF00); - sub_61C0 (TcgProtocol, Tpm20Response); + TpmUpdatePpiResponse (TcgProtocol, Tpm20Response); if (!IsTpm2Present ()) { TcgProtocolInstance->ExitBootServices (TcgProtocolInstance); } PpiFlags = 0; - sub_60EC (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); + AmiSetVariable (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); TpmResetSystem (); } @@ -1173,7 +1173,7 @@ TcgProtocolInstance->ExitBootServices (TcgProtocolInstance); } PpiFlags = 0; - sub_60EC (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); + AmiSetVariable (L"TcgINTPPI", &unk_8C60, 3, 4, &PpiFlags); TpmResetSystem (); } @@ -1183,7 +1183,7 @@ // CommandResult = TpmSubmitCommand (TcgProtocol, 111, 0, NULL); if (byte_8DA8) { - sub_6A4C (1, 50694666); + Tpm2PcrExtend (1, 50694666); } if (!CommandResult) { CommandResult = TpmSubmitCommand (TcgProtocol, 114, 1, &SetupValue); @@ -1192,7 +1192,7 @@ if (!byte_8DA8) { goto PpiUpdateDone; } - sub_6A4C (2147483650LL, 50694676); + Tpm2PcrExtend (2147483650LL, 50694676); goto UpdateResponse; } } @@ -1407,7 +1407,7 @@ // // Process TPM PER BIOS flags and setup synchronisation. // - Status = sub_647C (&SyncRequired); + Status = ProcessTpmPerBiosFlagsAndSync (&SyncRequired); if (EFI_ERROR (Status)) { // // Register a periodic timer callback to retry PER BIOS processing. @@ -1446,7 +1446,7 @@ // Enable was requested. // DEBUG ((EFI_D_INFO, "\n ENABLE == Setup in setup \n")); - sub_24D8 (EnablePending); + SetTpmPpiRequestCode (EnablePending); EnablePending = 0; } return Status; @@ -1456,7 +1456,7 @@ // TPM state mismatch: trigger a TPM enable/disable request. // DEBUG ((EFI_D_INFO, "\n TMP_ENABLE != Setup in setup \n")); - sub_24D8 (7 - (TpmOldVarNew != 0)); + SetTpmPpiRequestCode (7 - (TpmOldVarNew != 0)); // // Refresh the platform type context. @@ -1900,7 +1900,7 @@ // // Read the UEFI variable. // - Status = sub_18E8 (VariableNames[Index], &Guid, &VariableSize); + Status = ReadUefiVariable (VariableNames[Index], &Guid, &VariableSize); if (Status == EFI_SUCCESS && VariableSize > 0) { // // Check if this is the SecureBoot variable. @@ -1934,7 +1934,7 @@ } if (byte_8DA8) { - sub_6A4C (1, 50694677); + Tpm2PcrExtend (1, 50694677); } BootServices->FreePool (VariableData); @@ -2155,7 +2155,7 @@ // // Determine PFA from the PCI I/O protocol. // - Pfa = sub_1234 (OpRomStartEnd); + Pfa = GetPfaFromOpRomStartEnd (OpRomStartEnd); // // Measure the option ROM image. @@ -2306,7 +2306,7 @@ if (SystemTable->NumberOfTableEntries > 0) { for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) { - if (sub_6814 (a1, + if (CompareGuid (a1, SystemTable->ConfigurationTable[Index].VendorTable)) { qword_8D60 = (UINT64)SystemTable->ConfigurationTable[Index].VendorTable; @@ -2378,9 +2378,9 @@ // // Get the HII package list for the given handle. // - PackageList = sub_63D8 (qword_9420); + PackageList = GetHiiPackageList (qword_9420); if (PackageList != NULL) { - sub_5BDC (PackageList, &PackageListCopy); + DuplicateHiiPackageList (PackageList, &PackageListCopy); if (PackageListCopy != NULL) { StringPtr = PackageListCopy; @@ -2388,7 +2388,7 @@ StringPtr = &unk_84FA; } - StringBuffer = sub_5CD4 ( + StringBuffer = BuildHiiStringBuffer ( (UINT64)PackageList, 0, &unk_84FA, @@ -2408,26 +2408,26 @@ // // Allocate a temporary buffer for the string. // - StringPtr = sub_69E0 (StringSize); + StringPtr = AllocateHiiStringBuffer (StringSize); if (StringPtr != NULL) { if (((EFI_STATUS (*)(VOID *, UINT16 *, UINT64, UINT16, UINT16 *, UINTN *, UINT32))( *(VOID **)((UINT8 *)qword_8D70 + 8) )) (qword_8D70, StringBuffer, qword_9420, StringId, StringPtr, &StringSize, 0) < 0) { - sub_6A08 (StringPtr); + FreeHiiStringBuffer (StringPtr); StringPtr = NULL; } } } } - sub_6A08 (PackageList); + FreeHiiStringBuffer (PackageList); if (PackageListCopy != NULL) { - sub_6A08 (PackageListCopy); + FreeHiiStringBuffer (PackageListCopy); } if (StringBuffer != NULL) { - sub_6A08 (StringBuffer); + FreeHiiStringBuffer (StringBuffer); } } diff --git a/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.h b/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.h index c9bc98e..6f150d1 100644 --- a/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.h +++ b/AmiModulePkg/TCG2/Common/AmiTcgPlatformDxe/AmiTcgPlatformDxe/AmiTcgPlatformDxe.h @@ -219,7 +219,7 @@ EFI_STATUS EFIAPI -= sub_4BC4 ();( +qword_8D68 = (UINT64)ImageHandle;( VOID ); @@ -231,7 +231,7 @@ EFI_STATUS EFIAPI -(*(CHAR8 *)sub_6000 (1024068) >= 0) {( +(*(CHAR8 *)UefiLibGetVariable (1024068) >= 0) {( VOID ); @@ -273,7 +273,7 @@ EFI_STATUS EFIAPI -= sub_5E18 ();( += RegisterAndMeasure ();( VOID ); @@ -297,7 +297,7 @@ EFI_STATUS EFIAPI -(EFI_ERROR (sub_1A2C ())) {( +(EFI_ERROR (MeasureSecureBootVariables ())) {( VOID ); @@ -435,7 +435,7 @@ EFI_STATUS EFIAPI -(EFI_ERROR (sub_1BCC ())) {( +(EFI_ERROR (MeasureBootVariablesAndCallOpRomStartEnd ())) {( VOID ); @@ -591,7 +591,7 @@ EFI_STATUS EFIAPI -= sub_10E8 (TcgProtocol, 113, 1, &SetupValue);( += TpmSubmitCommand (TcgProtocol, 113, 1, &SetupValue);( VOID ); @@ -615,7 +615,7 @@ EFI_STATUS EFIAPI -= sub_10E8 (TcgProtocol, 32879, 0, NULL);( += TpmSubmitCommand (TcgProtocol, 32879, 0, NULL);( VOID ); @@ -633,7 +633,7 @@ EFI_STATUS EFIAPI -= sub_10E8 (TcgProtocol, 111, 0, NULL);( += TpmSubmitCommand (TcgProtocol, 111, 0, NULL);( VOID ); @@ -675,7 +675,7 @@ EFI_STATUS EFIAPI -handler (sub_3BA0 for user confirmation flows).( +handler (PpiSetupFlowStub for user confirmation flows).( VOID ); @@ -777,7 +777,7 @@ EFI_STATUS EFIAPI -= sub_647C (&SyncRequired);( += ProcessTpmPerBiosFlagsAndSync (&SyncRequired);( VOID ); @@ -951,7 +951,7 @@ EFI_STATUS EFIAPI -= sub_4A10 (String);( += StrSize (String);( VOID ); @@ -1023,7 +1023,7 @@ EFI_STATUS EFIAPI -= sub_18E8 (VariableNames[Index], &Guid, &VariableSize);( += ReadUefiVariable (VariableNames[Index], &Guid, &VariableSize);( VOID ); @@ -1095,7 +1095,7 @@ EFI_STATUS EFIAPI -= sub_1234 (OpRomStartEnd);( += GetPfaFromOpRomStartEnd (OpRomStartEnd);( VOID ); @@ -1227,7 +1227,7 @@ EFI_STATUS EFIAPI -= sub_63D8 (qword_9420);( += GetHiiPackageList (qword_9420);( VOID ); @@ -1251,7 +1251,7 @@ EFI_STATUS EFIAPI -= sub_69E0 (StringSize);( += AllocateHiiStringBuffer (StringSize);( VOID ); @@ -1315,4 +1315,4 @@ VOID ); -#endif /* __AMITCGPLATFORMDXE_H__ */ \ No newline at end of file +#endif /* __AMITCGPLATFORMDXE_H__ */ diff --git a/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.c b/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.c index 3d7a48d..cfae7af 100644 --- a/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.c +++ b/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.c @@ -10,48 +10,48 @@ // _ModuleEntryPoint (0x3e0) EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { - sub_480(ImageHandle); /*0x3e9*/ + IntelPhyCardDriverInit(ImageHandle); /*0x3e9*/ if ( !::SystemTable ) /*0x3f6*/ { ::SystemTable = (__int64)SystemTable; /*0x3f8*/ BootServices = (__int64)SystemTable->BootServices; /*0x403*/ RuntimeServices = (__int64)SystemTable->RuntimeServices; /*0x40e*/ } - if ( (unsigned __int8)sub_1844() ) /*0x415*/ + if ( (unsigned __int8)GetOcpTypeCStatus() ) /*0x415*/ { - sub_1A50(0x80000000LL, "\nOCP present\n"); /*0x42a*/ - sub_E14(); /*0x42f*/ + DebugPrint(0x80000000LL, "\nOCP present\n"); /*0x42a*/ + ProvisionOcpCard(); /*0x42f*/ } else { - sub_1A50(0x80000000LL, "\nOCP not present\n"); /*0x43d*/ + DebugPrint(0x80000000LL, "\nOCP not present\n"); /*0x43d*/ } return (*(EFI_STATUS ( **)(__int64, __int64, __int64 ( *)()))(BootServices + 368))( /*0x478*/ 512, 8, - sub_18A0); + UpdateOcpCardStatus); } -// sub_480 (0x480) -__int64 sub_480(__int64 ImageHandle, __int64 a2) +// 480 (0x480) +__int64 IntelPhyCardDriverInit(__int64 ImageHandle, __int64 a2) { __int64 Status; // rax __int64 Status; // rbx __int64 Status; // rax __int64 v6; // rax __int64 v7; // rax __int64 v8; // rbx __int64 v9; // rax __int64 v10; // rax __int64 v11; // rax __int64 v12; // rcx __int64 v13; // rax _BYTE *v14; // rax __int16 v15; // bx bool v16; // bl __int64 v17; // rdi __int64 result; // rax ::ImageHandle = ImageHandle; /*0x495*/ if ( !ImageHandle ) /*0x4a9*/ - sub_1A98( /*0x4b8*/ + AssertHandler( /*0x4b8*/ "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); qword_4B50 = a2; /*0x4bd*/ if ( !a2 ) /*0x4c7*/ - sub_1A98("e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); /*0x4d6*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); /*0x4d6*/ qword_4B58 = *(_QWORD *)(a2 + 96); /*0x4df*/ if ( !qword_4B58 ) /*0x4e9*/ - sub_1A98("e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); /*0x4f8*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); /*0x4f8*/ qword_4B68 = *(_QWORD *)(a2 + 88); /*0x501*/ if ( !qword_4B68 ) /*0x50b*/ - sub_1A98( /*0x51e*/ + AssertHandler( /*0x51e*/ "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); @@ -59,15 +59,15 @@ Status = Status; /*0x536*/ if ( Status < 0 ) /*0x542*/ { - sub_1A50(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x551*/ - sub_1A98("e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 64, "!EFI_ERROR (Status)"); /*0x569*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x551*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 64, "!EFI_ERROR (Status)"); /*0x569*/ } if ( !qword_4B80 ) /*0x576*/ - sub_1A98("e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 65, "gDS != ((void *) 0)"); /*0x58b*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 65, "gDS != ((void *) 0)"); /*0x58b*/ if ( Status < 0 ) /*0x593*/ { - sub_1A50(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x5a2*/ - sub_1A98( /*0x5ba*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x5a2*/ + AssertHandler( /*0x5ba*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\IntelPhyCard\\IntelPhyCard\\DEBUG\\AutoGen.c", 453, "!EFI_ERROR (Status)"); @@ -77,39 +77,39 @@ Status = (*(__int64 ( **)(void *, _QWORD, __int64 *))(qword_4B58 + 320))(&unk_49B0, 0, &qword_4B88); /*0x5e0*/ if ( Status < 0 ) /*0x5e9*/ { - sub_1A50(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x5f8*/ - sub_1A98("e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 52, "!EFI_ERROR (Status)"); /*0x610*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x5f8*/ + AssertHandler("e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 52, "!EFI_ERROR (Status)"); /*0x610*/ } if ( !qword_4B88 ) /*0x61d*/ - sub_1A98("e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 53, "mPciUsra != ((void *) 0)"); /*0x632*/ + AssertHandler("e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 53, "mPciUsra != ((void *) 0)"); /*0x632*/ } sub_1C28(); /*0x637*/ - v6 = sub_1AD8(); /*0x63c*/ + v6 = GetPcdProtocol(); /*0x63c*/ qword_4B98 = (*(__int64 ( **)(__int64))(v6 + 32))(5); /*0x649*/ - v7 = sub_1AD8(); /*0x650*/ + v7 = GetPcdProtocol(); /*0x650*/ v8 = (*(__int64 ( **)(__int64))(v7 + 40))(7); /*0x65f*/ - v9 = sub_1AD8(); /*0x662*/ + v9 = GetPcdProtocol(); /*0x662*/ if ( (unsigned __int64)(*(__int64 ( **)(__int64))(v9 + 56))(7) > 0x48 ) /*0x670*/ - sub_1A98( /*0x683*/ + AssertHandler( /*0x683*/ "e:\\hs\\AmiCRBPkg\\Library\\AmiPcieSegBusLib\\AmiPcieSegBusDxeSmm.c", 60, "sizeof (PCIE_SEG_BUS_TABLE) >= LibPcdGetSize(7U)"); - v10 = sub_1AD8(); /*0x688*/ + v10 = GetPcdProtocol(); /*0x688*/ v11 = (*(__int64 ( **)(__int64))(v10 + 56))(7); /*0x690*/ sub_292C(v12, v8, v11); /*0x699*/ - if ( *(char *)sub_1CAC(1024068) >= 0 ) /*0x6ae*/ + if ( *(char *)PciExpressAddress(1024068) >= 0 ) /*0x6ae*/ { - v13 = sub_1CAC(1024064); /*0x6b3*/ + v13 = PciExpressAddress(1024064); /*0x6b3*/ sub_2878(v13); /*0x6bb*/ - v14 = (_BYTE *)sub_1CAC(1024068); /*0x6c2*/ + v14 = (_BYTE *)PciExpressAddress(1024068); /*0x6c2*/ *v14 |= 0x80u; /*0x6cc*/ } v15 = sub_360(); /*0x6d3*/ sub_350(); /*0x6d6*/ v16 = (v15 & 0x200) != 0; /*0x6e7*/ - v17 = sub_1950(1288) & 0xFFFFFF; /*0x6f1*/ + v17 = IoRead32Wrapper(1288) & 0xFFFFFF; /*0x6f1*/ sub_330(); /*0x6f7*/ - while ( (((_DWORD)v17 + 357 - (unsigned int)sub_1950(1288)) & 0x800000) == 0 ) /*0x717*/ + while ( (((_DWORD)v17 + 357 - (unsigned int)IoRead32Wrapper(1288)) & 0x800000) == 0 ) /*0x717*/ sub_320(); /*0x6fe*/ sub_330(); /*0x719*/ if ( v16 ) /*0x720*/ @@ -118,8 +118,8 @@ result = sub_2784(4278190080LL); /*0x733*/ if ( result < 0 ) /*0x73b*/ { - sub_1A50(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", result); /*0x74a*/ - return sub_1A98( /*0x762*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", result); /*0x74a*/ + return AssertHandler( /*0x762*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\IntelPhyCard\\IntelPhyCard\\DEBUG\\AutoGen.c", 471, "!EFI_ERROR (Status)"); @@ -127,8 +127,8 @@ return result; /*0x776*/ } -// sub_E14 (0xe14) -__int64 sub_E14() +// E14 (0xe14) +__int64 ProvisionOcpCard() { __int64 v0; // rax __int16 Index; // ax __int64 Index; // rdx unsigned int Index; // edi int v4; // eax int Status; // ebx __int64 v6; // rcx __int64 Result; // r8 __int64 v8; // r9 unsigned __int16 v9; // ax unsigned __int8 Index; // dl unsigned int v11; // ebx __int64 result; // rax int v13; // r12d int v14; // r15d int v15; // r14d int v16; // ebx unsigned __int16 v17; // si unsigned __int8 *v18; // rbx unsigned __int16 n4_1; // di __int64 Index; // r14 __int64 v21; // rcx __int64 v22; // r8 __int64 v23; // rax unsigned __int8 v24; // r12 unsigned __int8 v25; // al unsigned __int16 v26; // r15 __int64 v27; // r13 bool v28; // al __int64 Index; // rdi __int64 v30; // rcx __int64 v31; // r8 __int64 v32; // rdx char v33; // al __int16 v34; // kr08_2 __int64 v35; // r8 __int64 v36; // r9 char v37; // r10 void (*funcs_1386)(void); // rax char Index; // bl __int64 v40; // rdx unsigned __int16 n0x20; // si __int64 v42; // r14 __int64 v43; // rax __int64 v44; // rdi __int64 v45; // rbx __int64 v46; // rdx int n4096; // r12d unsigned int n4096_1; // r15d __int64 v49; // rdi unsigned int Index; // edx unsigned int v51; // r12d __int64 v52; // rax __int64 Index; // rcx char v54; // r8 const char *Write_success_%X_n; // rdx void (*funcs_157E)(void); // rax char Index; // bl __int64 v58; // r9 __int64 Status; // rbx int v60; // [rsp+28h] [rbp-D8h] __int64 v61; // [rsp+40h] [rbp-C0h] BYREF unsigned __int8 v62; // [rsp+48h] [rbp-B8h] @@ -144,7 +144,7 @@ __int128 Result; // [rsp+90h] [rbp-70h] BYREF _QWORD v79[40]; // [rsp+A0h] [rbp-60h] BYREF __int64 v80; // [rsp+1F0h] [rbp+F0h] BYREF __int64 v81; // [rsp+1F8h] [rbp+F8h] BYREF unsigned __int8 v82; // [rsp+200h] [rbp+100h] unsigned __int8 v83; // [rsp+208h] [rbp+108h] - v0 = sub_1AD8(); /*0xe30*/ + v0 = GetPcdProtocol(); /*0xe30*/ Index = (*(__int64 ( **)(__int64))(v0 + 16))(189); /*0xe3a*/ Index = qword_4A20; /*0xe3d*/ v65 = Index + 8; /*0xe50*/ @@ -159,7 +159,7 @@ Index = 0; /*0xe66*/ } Status = 0; /*0xe8c*/ - v6 = *(unsigned int *)sub_1CAC(1036304); /*0xe93*/ + v6 = *(unsigned int *)PciExpressAddress(1036304); /*0xe93*/ qword_4A20 = v6; /*0xe95*/ *(_DWORD *)(v6 + 180) = 0; /*0xe9e*/ if ( *(_DWORD *)(v6 + 184) == 267429210 ) /*0xeb6*/ @@ -230,14 +230,14 @@ v75 = v15; /*0x1019*/ v76 = v14; /*0x101d*/ v77 = v13; /*0x1021*/ - sub_1A50(64, "LanMac.MAC = [%X-%X-%X-%X-%X-%X] \n", v13, v14, v15, v74, v73, v16); /*0x102a*/ + DebugPrint(64, "LanMac.MAC = [%X-%X-%X-%X-%X-%X] \n", v13, v14, v15, v74, v73, v16); /*0x102a*/ v17 = v65; /*0x102f*/ v18 = v66; /*0x1034*/ n4_1 = 0; /*0x103b*/ Index = 4; /*0x1046*/ do /*0x1142*/ { - sub_1980(&v61, 6); /*0x1056*/ + SetMem(&v61, 6, 0); /*0x1056*/ v23 = sub_BEC(v21, v17, v22, &v61); /*0x1063*/ v62 = BYTE1(v61); /*0x1071*/ v24 = v61; /*0x1071*/ @@ -249,8 +249,8 @@ { v25 = sub_C90(&v68); /*0x10c5*/ *v18 = v25; /*0x10de*/ - sub_1A50(64, "ValidMacFRU[%d] = 0x%X \n", n4_1, v25); /*0x10e1*/ - sub_1A50( /*0x112a*/ + DebugPrint(64, "ValidMacFRU[%d] = 0x%X \n", n4_1, v25); /*0x10e1*/ + DebugPrint( /*0x112a*/ 64, "BMCFruMac.MAC = [%X-%X-%X-%X-%X-%X] \n", v24, @@ -274,7 +274,7 @@ v28 = v66[0] || v66[1] || v66[2] || v66[3]; /*0x1179*/ if ( v63 ) { - sub_1A50(64, "The MAC[%x %x %x %x %x %x] is Valid.\n", v77, v76, v75, v74, v73, v72); /*0x11ba*/ + DebugPrint(64, "The MAC[%x %x %x %x %x %x] is Valid.\n", v77, v76, v75, v74, v73, v72); /*0x11ba*/ v71[0] = -326642109; /*0x11d1*/ v71[1] = 1270213540; /*0x11dd*/ v71[2] = 1044374945; /*0x11ea*/ @@ -286,11 +286,11 @@ 24, &dword_4CC0); if ( result < 0 ) - return sub_1A50(64, "Write MAC to NVRAM fail: %r\n", result); + return DebugPrint(64, "Write MAC to NVRAM fail: %r\n", result); } else if ( v28 ) /*0x1228*/ { - sub_1A50(64, "The MAC is Invalid, but the MAC in FRU is Valid.\n"); /*0x1242*/ + DebugPrint(64, "The MAC is Invalid, but the MAC in FRU is Valid.\n"); /*0x1242*/ result = (*(__int64 ( **)(__int64, __int64, __int64 *))(qword_4B58 + 64))(4, 0x20000, &Result); /*0x125d*/ if ( result >= 0 ) /*0x1263*/ { @@ -298,7 +298,7 @@ Index = 0; /*0x1279*/ do /*0x1318*/ { - sub_1980(&v61, 6); /*0x1298*/ + SetMem(&v61, 6, 0); /*0x1298*/ sub_BEC(v30, v26, v31, &v61); /*0x12a6*/ v33 = v61; /*0x12ab*/ v26 += 6; /*0x12af*/ @@ -356,7 +356,7 @@ v49 = 0; /*0x1452*/ while ( 1 ) /*0x1460*/ { - sub_39AE(v79, 256, 0); /*0x1460*/ + SetMem(v79, 256, 0); /*0x1460*/ sub_27C4(v27 + v49 + v81, v79, 256); /*0x147c*/ n4096_1 -= 256; /*0x1484*/ Index = 0; /*0x148b*/ @@ -394,7 +394,7 @@ } Write_success_%X_n = "Write fail %X\n"; /*0x1667*/ LABEL_66: - sub_1A50(64, Write_success_%X_n, v42); /*0x14ee*/ + DebugPrint(64, Write_success_%X_n, v42); /*0x14ee*/ v40 = qword_4C28; /*0x14fd*/ if ( qword_4C28 || (sub_2784(v45), (v40 = qword_4C28) != 0) ) /*0x151e*/ { @@ -441,35 +441,35 @@ v67, &v80); (*(void ( **)(__int64))(qword_4B58 + 248))(360000000); /*0x163b*/ - return sub_1A50(64, "Send power cycle status - %r\n", Status); /*0x164e*/ + return DebugPrint(64, "Send power cycle status - %r\n", Status); /*0x164e*/ } } } else { - return sub_1A50(64, "Both of the Mac and MAC in FRU is invalid.\n"); /*0x1231*/ + return DebugPrint(64, "Both of the Mac and MAC in FRU is invalid.\n"); /*0x1231*/ } } return result; /*0x1653*/ } -// sub_18A0 (0x18A0) -__int64 sub_18A0() +// 18A0 (0x18A0) +__int64 UpdateOcpCardStatus() { __int64 result; // rax char v1; // [rsp+50h] [rbp+18h] - sub_1A50(0x80000000LL, "\nUpdateOCPCardStatus\n"); /*0x18b9*/ + DebugPrint(0x80000000LL, "\nUpdateOCPCardStatus\n"); /*0x18b9*/ if ( (unsigned __int8)sub_1674() == 1 ) /*0x18c5*/ { - result = sub_1844(); /*0x18c7*/ + result = GetOcpTypeCStatus(); /*0x18c7*/ if ( (_BYTE)result ) /*0x18ce*/ return result; /*0x18ce*/ v1 = 1; /*0x18d0*/ } else { - sub_1A50(0x80000000LL, "\nOCP not present\n"); /*0x18e1*/ - result = sub_1844(); /*0x18e6*/ + DebugPrint(0x80000000LL, "\nOCP not present\n"); /*0x18e1*/ + result = GetOcpTypeCStatus(); /*0x18e6*/ if ( !(_BYTE)result ) /*0x18ed*/ return result; /*0x18ed*/ v1 = 0; /*0x18ef*/ @@ -477,14 +477,14 @@ result = (*(__int64 ( **)(const __int16 *, void *, __int64))(qword_4B68 + 88))(L"OCP_TypeC", &unk_49D0, 3); /*0x191d*/ if ( v1 ) /*0x1925*/ { - sub_1A50(0x80000000LL, "\nOCP Conenct,Reset System\n"); /*0x1931*/ + DebugPrint(0x80000000LL, "\nOCP Conenct,Reset System\n"); /*0x1931*/ return (*(__int64 ( **)(_QWORD, _QWORD, _QWORD, _QWORD))(qword_4B68 + 104))(0, 0, 0, 0); /*0x1947*/ } return result; /*0x194a*/ } -// sub_1844 (0x1844) -char sub_1844() +// 1844 (0x1844) +char GetOcpTypeCStatus() { char Result; // [rsp+40h] [rbp+8h] BYREF __int64 v2; // [rsp+48h] [rbp+10h] BYREF v2 = 1; /*0x184f*/ Result = 0; /*0x1870*/ @@ -494,20 +494,20 @@ 0, &v2, &Result) < 0 ) - sub_1A50(0x80000000LL, "\nLnvGetOcpTypeCstatus Fail\n"); /*0x1890*/ + DebugPrint(0x80000000LL, "\nLnvGetOcpTypeCstatus Fail\n"); /*0x1890*/ return Result; /*0x1899*/ } -// sub_1950 (0x1950) -unsigned __int32 sub_1950(unsigned __int16 n1288) +// 1950 (0x1950) +unsigned __int32 IoRead32Wrapper(unsigned __int16 n1288) { if ( (n1288 & 3) != 0 ) /*0x195c*/ - sub_1A98((__int64)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 193, (__int64)"(Port & 3) == 0"); /*0x1971*/ + AssertHandler((__int64)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 193, (__int64)"(Port & 3) == 0"); /*0x1971*/ return __indword(n1288); /*0x197a*/ } -// sub_1A50 (0x1A50) -__int64 sub_1A50(__int64 a1, const char *a2, ...) +// 1A50 (0x1A50) +__int64 DebugPrint(__int64 a1, const char *a2, ...) { __int64 result; // rax __int64 ( **v4)(__int64, const char *, __int64 *); // r10 va_list va; // [rsp+40h] [rbp+18h] BYREF va_start(va, a2); result = sub_19D0(); /*0x1a67*/ @@ -520,8 +520,8 @@ return result; /*0x1a91*/ } -// sub_1A98 (0x1A98) -__int64 sub_1A98(__int64 a1, __int64 a2, __int64 a3) +// 1A98 (0x1A98) +__int64 AssertHandler(__int64 a1, __int64 a2, __int64 a3) { __int64 result; // rax result = sub_19D0(); /*0x1ab0*/ if ( result ) /*0x1ab8*/ @@ -529,8 +529,8 @@ return result; /*0x1ad0*/ } -// sub_1AD8 (0x1AD8) -__int64 sub_1AD8() +// 1AD8 (0x1AD8) +__int64 GetPcdProtocol() { __int64 result; // rax __int64 Status; // rax result = qword_4B78; /*0x1adc*/ if ( !qword_4B78 ) /*0x1ae6*/ @@ -538,32 +538,32 @@ Status = (*(__int64 ( **)(void *, _QWORD, __int64 *))(qword_4B58 + 320))(&unk_49C0, 0, &qword_4B78); /*0x1aff*/ if ( Status < 0 ) /*0x1b08*/ { - sub_1A50(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x1b19*/ - sub_1A98("e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 78, "!EFI_ERROR (Status)"); /*0x1b31*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x1b19*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 78, "!EFI_ERROR (Status)"); /*0x1b31*/ } result = qword_4B78; /*0x1b36*/ if ( !qword_4B78 ) /*0x1b40*/ { - sub_1A98("e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 79, "mPcd != ((void *) 0)"); /*0x1b53*/ + AssertHandler("e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 79, "mPcd != ((void *) 0)"); /*0x1b53*/ return qword_4B78; /*0x1b58*/ } } return result; /*0x1b5f*/ } -// sub_1CAC (0x1CAC) -__int64 sub_1CAC(__int64 a1) +// 1CAC (0x1CAC) +__int64 PciExpressAddress(__int64 a1) { if ( (a1 & 0xFFFFFFFFF0000000uLL) != 0 ) /*0x1cbc*/ - sub_1A98( /*0x1cd1*/ + AssertHandler( /*0x1cd1*/ (__int64)"e:\\hs\\MdePkg\\Library\\SmmPciExpressLib\\PciExpressLib.c", 118, (__int64)"((Address) & ~0xfffffff) == 0"); return a1 + qword_4B98; /*0x1ce0*/ } -// sub_1DF8 (0x1DF8) -__int64 sub_1DF8(char a1, char a2) +// 1DF8 (0x1DF8) +__int64 FlashCommandStatusControl(char a1, char a2) { unsigned int n0x4000000; // r8d unsigned int i; // r9d __int64 result; // rax n0x4000000 = 0; /*0x1df8*/ if ( a1 ) /*0x1e03*/ @@ -591,8 +591,8 @@ return result; /*0x1e5c*/ } -// sub_1EA4 (0x1EA4) -char sub_1EA4(__int64 a1, __int64 a2, unsigned int n2, char a4) +// 1EA4 (0x1EA4) +char VerifyFlashPageBuffer(__int64 a1, __int64 a2, unsigned int n2, char a4) { __int64 v4; // rdi unsigned int n2_1; // ebx unsigned int n2_2; // esi unsigned int Index; // edx unsigned int v12; // esi __int64 Index; // rcx char v14; // r8 char dst[64]; // [rsp+20h] [rbp-68h] BYREF unsigned int p_n2; // [rsp+A0h] [rbp+18h] BYREF v4 = 0; /*0x1ebb*/ n2_1 = n2; /*0x1ebd*/ @@ -602,7 +602,7 @@ return 1; /*0x1f70*/ while ( 1 ) /*0x1ee7*/ { - sub_39AE(dst, 64, 0); /*0x1ee7*/ + SetMem(dst, 64, 0); /*0x1ee7*/ if ( a4 ) /*0x1eef*/ { sub_253C(v4 + a1, dst, &p_n2); /*0x1f02*/ @@ -614,7 +614,7 @@ n2_1 = 0; /*0x1f1a*/ else n2_1 -= 64; /*0x1f15*/ p_n2 = n2_1; /*0x1f1e*/ - sub_3A00(dst, (char *)(v4 + a1), n2_2 - n2_1); /*0x1f33*/ + MemMove(dst, (char *)(v4 + a1), n2_2 - n2_1); /*0x1f33*/ } Index = 0; /*0x1f38*/ v12 = n2_2 - n2_1; /*0x1f3a*/ @@ -639,8 +639,8 @@ } } -// sub_1F90 (0x1F90) -unsigned __int64 sub_1F90(int a1, unsigned int *a2) +// 1F90 (0x1F90) +unsigned __int64 CalculateFlashAddressRange(int a1, unsigned int *a2) { __int64 v2; // r8 unsigned __int64 v5; // r10 unsigned __int64 Index; // r11 unsigned int v7; // eax unsigned __int64 v9; // [rsp+30h] [rbp+8h] BYREF __int64 v10; // [rsp+40h] [rbp+18h] BYREF __int64 v11; // [rsp+48h] [rbp+20h] BYREF LODWORD(v2) = qword_4C18; /*0x1f9c*/ LODWORD(v5) = qword_4C00; /*0x1fb0*/ @@ -682,23 +682,23 @@ return 0; /*0x20c0*/ } -// sub_216C (0x216C) -char sub_216C(__int64 a1, int *p_n24608) +// 216C (0x216C) +char IdentifySpiFlash(__int64 a1, int *p_n24608) { - int v3; // edx qword_4A20 = *(unsigned int *)sub_1CAC(1036304); /*0x2183*/ + int v3; // edx qword_4A20 = *(unsigned int *)PciExpressAddress(1036304); /*0x2183*/ *(_DWORD *)(qword_4A20 + 8) = 0; /*0x218a*/ *(_WORD *)(qword_4A20 + 6) = 525; /*0x219d*/ - sub_1DF8(1, 0); /*0x21a3*/ + FlashCommandStatusControl(1, 0); /*0x21a3*/ sub_1CE8((unsigned int)(v3 + 35)); /*0x21ab*/ *p_n24608 = *(_DWORD *)(qword_4A20 + 16) & 0xFFFFFF; /*0x21c2*/ return 1; /*0x21c4*/ } -// sub_234C (0x234C) -char sub_234C(__int64 a1, __int64 a2, _DWORD *a3) +// 234C (0x234C) +char ProgramSpiFlashPage(__int64 a1, __int64 a2, _DWORD *a3) { __int64 v6; // r9 unsigned __int16 Index; // bx char n2_2; // si __int64 Index; // rdx __int64 n2_1; // r9 char v11; // r10 unsigned __int16 i; // r8 char v13; // r15 unsigned int v15; // [rsp+68h] [rbp+20h] BYREF v15 = 0; /*0x2373*/ - v6 = *(unsigned int *)sub_1CAC(1036304); /*0x238b*/ + v6 = *(unsigned int *)PciExpressAddress(1036304); /*0x238b*/ Index = Index; /*0x2392*/ qword_4A20 = v6; /*0x2398*/ if ( Index == 1 ) /*0x23a2*/ @@ -723,7 +723,7 @@ n2_2 = 0; /*0x23e8*/ while ( 1 ) /*0x23ef*/ { - if ( sub_1EA4(a2, 0, Index, 0) ) /*0x23fa*/ + if ( VerifyFlashPageBuffer(a2, 0, Index, 0) ) /*0x23fa*/ { LABEL_28: *a3 -= Index; /*0x2512*/ @@ -748,20 +748,20 @@ } while ( n2_1 ); /*0x2451*/ } - sub_1DF8(1, 1); /*0x2459*/ - if ( (sub_1F90(a1, &v15) & 0x8000000000000000uLL) != 0LL ) /*0x246e*/ + FlashCommandStatusControl(1, 1); /*0x2459*/ + if ( (CalculateFlashAddressRange(a1, &v15) & 0x8000000000000000uLL) != 0LL ) /*0x246e*/ return 0; /*0x2527*/ v13 = v15; /*0x247d*/ *(_DWORD *)(qword_4A20 + 8) = v15; /*0x2485*/ *(_WORD *)(qword_4A20 + 6) = (Index << 8) - 251; /*0x24a0*/ - sub_1DF8(1, 0); /*0x24a7*/ + FlashCommandStatusControl(1, 0); /*0x24a7*/ sub_1E60(); /*0x24ac*/ if ( byte_4AA8 && (v13 & 1) == 0 && Index >= 2u ) /*0x24c7*/ { *(_WORD *)(qword_4A20 + 161) = 114; /*0x24d6*/ - sub_1DF8(0, 1); /*0x24df*/ + FlashCommandStatusControl(0, 1); /*0x24df*/ } - if ( !sub_1EA4(a1, a2, Index, 1) ) /*0x24f0*/ + if ( !VerifyFlashPageBuffer(a1, a2, Index, 1) ) /*0x24f0*/ { if ( n2_2 == 2 ) /*0x2503*/ return 0; /*0x2503*/ @@ -772,17 +772,17 @@ } } -// sub_2638 (0x2638) -signed __int64 sub_2638(int a1) +// 2638 (0x2638) +signed __int64 EraseSpiFlashSector(int a1) { signed __int64 Result; // rax __int64 v2; // rcx __int64 n12; // rdx __int64 v4; // rcx unsigned int v5; // [rsp+38h] [rbp+10h] BYREF v5 = 0; /*0x2640*/ - Result = sub_1F90(a1, &v5); /*0x264a*/ + Result = CalculateFlashAddressRange(a1, &v5); /*0x264a*/ if ( Result >= 0 ) /*0x2652*/ { if ( v5 ) /*0x265e*/ *(_DWORD *)(qword_4A20 + 8) = v5; /*0x2667*/ *(_WORD *)(qword_4A20 + 6) = 17; /*0x2678*/ - sub_1DF8(1, 0); /*0x267e*/ + FlashCommandStatusControl(1, 0); /*0x267e*/ Result = 28; /*0x268c*/ n12 = 12; /*0x2692*/ if ( (_BYTE)n24608_0 == 31 ) /*0x269e*/ @@ -791,7 +791,7 @@ { LOBYTE(n12) = 1; /*0x26a5*/ LOBYTE(v2) = 1; /*0x26a7*/ - sub_1DF8(v2, n12); /*0x26a9*/ + FlashCommandStatusControl(v2, n12); /*0x26a9*/ *(_BYTE *)(qword_4A20 + 16) = 0; /*0x26b5*/ *(_DWORD *)(qword_4A20 + 8) = v5; /*0x26c4*/ Result = 2048; /*0x26d2*/ @@ -799,7 +799,7 @@ { LOBYTE(v4) = 1; /*0x26e8*/ *(_WORD *)(qword_4A20 + 6) = 15; /*0x26ea*/ - sub_1DF8(v4, 0); /*0x26f0*/ + FlashCommandStatusControl(v4, 0); /*0x26f0*/ return sub_1E60(); /*0x26f5*/ } } @@ -807,7 +807,7 @@ return Result; /*0x26fa*/ } -// sub_2784 (0x2784) +// 2784 (0x2784) __int64 sub_2784(__int64 a1) { __int64 ( **v2)(); // rbx char v3; // al v2 = off_4320; /*0x2791*/ @@ -821,10 +821,10 @@ return 0; /*0x27bb*/ } -// sub_2BC0 (0x2BC0) -char sub_2BC0(__int64 a1, __int64 *a2) +// 2BC0 (0x2BC0) +char DetectSst25lfFlash(__int64 a1, __int64 *a2) { - const char *SST_25LF040; // rdx __int64 v5; // rcx if ( !(unsigned __int8)sub_216C(a1, &n24608) ) /*0x2bd4*/ + const char *SST_25LF040; // rdx __int64 v5; // rcx if ( !(unsigned __int8)IdentifySpiFlash(a1, &n24608) ) /*0x2bd4*/ return 0; /*0x2bdb*/ if ( (unsigned __int16)n24608 == 17599 ) /*0x2bf0*/ { @@ -838,9 +838,9 @@ n0x1000000 = 0x100000; /*0x2bf9*/ SST_25LF040 = "SST 25LF080"; /*0x2c03*/ } - sub_3A00(&unk_4C40, SST_25LF040, 11); /*0x2c2d*/ + MemMove(&unk_4C40, SST_25LF040, 11); /*0x2c2d*/ *a2 = (__int64)off_4A30; /*0x2c46*/ - sub_3A00(&unk_4A88, &unk_4B20, 24); /*0x2c50*/ + MemMove(&unk_4A88, &unk_4B20, 24); /*0x2c50*/ n24608_0 = n24608; /*0x2c5b*/ v5 = *a2; /*0x2c61*/ n24608_1 = n24608; /*0x2c64*/ @@ -850,10 +850,10 @@ return 1; /*0x2c8e*/ } -// sub_2C94 (0x2C94) -char sub_2C94(__int64 a1, __int64 *a2) +// 2C94 (0x2C94) +char DetectAdestoMicronAtmelFlash(__int64 a1, __int64 *a2) { - const char *ADESTO_AT25SF641; // rdx __int64 n17; // r8 __int64 v6; // rcx if ( !(unsigned __int8)sub_216C(a1, &n24608) ) /*0x2ca8*/ + const char *ADESTO_AT25SF641; // rdx __int64 n17; // r8 __int64 v6; // rcx if ( !(unsigned __int8)IdentifySpiFlash(a1, &n24608) ) /*0x2ca8*/ return 0; /*0x2cb1*/ switch ( (unsigned __int16)n24608 ) /*0x2cc6*/ { @@ -905,23 +905,23 @@ ADESTO_AT25SF641 = "ATMEL 26DF161/25DQ161"; /*0x2d1a*/ n17 = 21; /*0x2d21*/ LABEL_22: - sub_3A00(&unk_4C40, ADESTO_AT25SF641, n17); /*0x2de5*/ + MemMove(&unk_4C40, ADESTO_AT25SF641, n17); /*0x2de5*/ *a2 = (__int64)off_4A30; /*0x2e08*/ - sub_3A00(&unk_4A88, &unk_4AD8, 24); /*0x2e12*/ + MemMove(&unk_4A88, &unk_4AD8, 24); /*0x2e12*/ n24608_0 = n24608; /*0x2e1d*/ v6 = *a2; /*0x2e23*/ n24608_1 = n24608; /*0x2e26*/ *(_DWORD *)(v6 + 72) = dword_4AE8; /*0x2e33*/ *(_DWORD *)(*a2 + 76) = n4096_0; /*0x2e3f*/ *(_QWORD *)(*a2 + 80) = &unk_4C40; /*0x2e4a*/ - qword_4A20 = *(unsigned int *)sub_1CAC(1036304); /*0x2e57*/ - sub_20C8(); /*0x2e5e*/ - sub_2638(4278190080LL); /*0x2e68*/ + qword_4A20 = *(unsigned int *)PciExpressAddress(1036304); /*0x2e57*/ + CompareGuid(); /*0x2e5e*/ + EraseSpiFlashSector(4278190080LL); /*0x2e68*/ return 1; /*0x2e74*/ } -// sub_2E7C (0x2E7C) -__int64 sub_2E7C(unsigned int a1) +// 2E7C (0x2E7C) +__int64 GetSpiFlashSizeFromJedecId(unsigned int a1) { unsigned int n23; // ecx n23 = HIWORD(a1); /*0x2e7c*/ if ( (unsigned __int8)n23 <= 0x18u ) /*0x2e85*/ @@ -971,10 +971,10 @@ return 0x2000000; /*0x2eb6*/ } -// sub_2FD4 (0x2FD4) -char sub_2FD4(__int64 a1, __int64 *a2) +// 2FD4 (0x2FD4) +char DetectXmcWinbondAmicMxicFlash(__int64 a1, __int64 *a2) { - const char *XMC_25QH_Series; // rdx __int64 n15; // r8 int n0x40000; // r8d bool v7; // zf __int64 v8; // rcx if ( !(unsigned __int8)sub_216C(a1, &n24608) ) /*0x2fe8*/ + const char *XMC_25QH_Series; // rdx __int64 n15; // r8 int n0x40000; // r8d bool v7; // zf __int64 v8; // rcx if ( !(unsigned __int8)IdentifySpiFlash(a1, &n24608) ) /*0x2fe8*/ return 0; /*0x2fef*/ if ( (unsigned __int16)n24608 > 0x40C8u ) /*0x3008*/ { @@ -988,7 +988,7 @@ { n4096 = 4096; /*0x3424*/ n32 = 32; /*0x342e*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x343a*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x343a*/ XMC_25QH_Series = "XMC 25QH Series"; /*0x3440*/ n15 = 15; /*0x3447*/ goto LABEL_92; /*0x344d*/ @@ -1005,7 +1005,7 @@ { n4096 = 4096; /*0x33c4*/ n32 = 32; /*0x33ce*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x33da*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x33da*/ XMC_25QH_Series = "Spansion 25FL(L) Series"; /*0x33e0*/ n15 = 23; /*0x33e7*/ goto LABEL_92; /*0x33ed*/ @@ -1020,7 +1020,7 @@ { n4096 = 4096; /*0x34d6*/ n32 = 32; /*0x34e0*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x34ec*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x34ec*/ XMC_25QH_Series = "ISSI 25LP Series"; /*0x34f2*/ n15 = 16; /*0x34f9*/ goto LABEL_92; /*0x34ff*/ @@ -1034,7 +1034,7 @@ LABEL_62: n4096 = 4096; /*0x3474*/ n32 = 32; /*0x3480*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x348c*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x348c*/ XMC_25QH_Series = "EON 25F/Q/S/QH Series"; /*0x3492*/ n15 = 21; /*0x3499*/ goto LABEL_92; /*0x349f*/ @@ -1044,7 +1044,7 @@ LABEL_63: n4096 = 4096; /*0x34a4*/ n32 = 32; /*0x34b0*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x34bc*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x34bc*/ XMC_25QH_Series = "GigaDevice 25Q Series"; /*0x34c2*/ n15 = 21; /*0x34c9*/ goto LABEL_92; /*0x34cf*/ @@ -1052,7 +1052,7 @@ LABEL_73: n4096 = 4096; /*0x3579*/ n32 = 32; /*0x3585*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x3591*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x3591*/ XMC_25QH_Series = "STM/Micron/Numonyx 25PF/PX Series"; /*0x3597*/ n15 = 33; /*0x359e*/ goto LABEL_92; /*0x35a4*/ @@ -1066,7 +1066,7 @@ case 0x709Du: /*0x3511*/ n4096 = 4096; /*0x35ab*/ n32 = 32; /*0x35b5*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x35c1*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x35c1*/ XMC_25QH_Series = "ISSI 25WP Series"; /*0x35c7*/ n15 = 16; /*0x35ce*/ goto LABEL_92; /*0x35d4*/ @@ -1081,7 +1081,7 @@ { n4096 = 256; /*0x354b*/ n32 = -37; /*0x3555*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x3561*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x3561*/ XMC_25QH_Series = "STM/Numonyx 25PE Series"; /*0x3567*/ n15 = 23; /*0x356e*/ goto LABEL_92; /*0x3574*/ @@ -1107,7 +1107,7 @@ { n4096 = 4096; /*0x362c*/ n32 = 32; /*0x3636*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x3642*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x3642*/ XMC_25QH_Series = "Micron/Numonyx 25Q Series"; /*0x3648*/ n15 = 25; /*0x364f*/ goto LABEL_92; /*0x3655*/ @@ -1155,7 +1155,7 @@ { n4096 = 4096; /*0x3287*/ n32 = 32; /*0x3291*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x329d*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x329d*/ XMC_25QH_Series = "XMC 25QU Series"; /*0x32a3*/ n15 = 15; /*0x32aa*/ goto LABEL_92; /*0x32b0*/ @@ -1169,7 +1169,7 @@ case 0x32F8u: /*0x320b*/ n4096 = 4096; /*0x3257*/ n32 = 32; /*0x3261*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x326d*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x326d*/ XMC_25QH_Series = "FIDELIX 25Q Series"; /*0x3273*/ n15 = 18; /*0x327a*/ goto LABEL_92; /*0x3280*/ @@ -1186,7 +1186,7 @@ LABEL_75: n4096 = 4096; /*0x35d9*/ n32 = 32; /*0x35e5*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x35f1*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x35f1*/ XMC_25QH_Series = "Winbond 25X/Q Series"; /*0x35f7*/ n15 = 20; /*0x35fe*/ goto LABEL_92; /*0x3604*/ @@ -1195,7 +1195,7 @@ { n4096 = 4096; /*0x3336*/ n32 = 32; /*0x3340*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x334c*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x334c*/ XMC_25QH_Series = "Spansion 25FL(K) Series"; /*0x3352*/ n15 = 23; /*0x3359*/ goto LABEL_92; /*0x335f*/ @@ -1208,7 +1208,7 @@ { n4096 = 4096; /*0x32d6*/ n32 = 32; /*0x32e0*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x32ec*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x32ec*/ XMC_25QH_Series = "Fudan FM25Q Series"; /*0x32f2*/ n15 = 18; /*0x32f9*/ goto LABEL_92; /*0x32ff*/ @@ -1218,7 +1218,7 @@ LABEL_56: n4096 = 4096; /*0x33f2*/ n32 = 32; /*0x33fe*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x340a*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x340a*/ XMC_25QH_Series = "ESMT 25L QA/PA Series"; /*0x3410*/ n15 = 21; /*0x3417*/ goto LABEL_92; /*0x341d*/ @@ -1228,7 +1228,7 @@ LABEL_44: n4096 = 4096; /*0x3304*/ n32 = 32; /*0x3310*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x331c*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x331c*/ XMC_25QH_Series = "AMIC 25L/LQ Series"; /*0x3322*/ n15 = 18; /*0x3329*/ goto LABEL_92; /*0x332f*/ @@ -1249,7 +1249,7 @@ case 0x28C2u: /*0x3162*/ n4096 = 4096; /*0x318b*/ n32 = 32; /*0x3195*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x31a1*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x31a1*/ XMC_25QH_Series = "MXIC 25R Series"; /*0x31a7*/ n15 = 15; /*0x31ae*/ goto LABEL_92; /*0x31b4*/ @@ -1272,20 +1272,20 @@ goto LABEL_92; /*0x3157*/ case 0x2001u: /*0x303c*/ n4096 = 0x10000; /*0x310c*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x3118*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x3118*/ XMC_25QH_Series = "Spansion 25FL(P) Series"; /*0x311e*/ n15 = 23; /*0x3125*/ goto LABEL_92; /*0x312b*/ case 0x201Cu: /*0x303c*/ n32 = -40; /*0x30d7*/ n4096 = 0x10000; /*0x30e0*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x30ec*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x30ec*/ XMC_25QH_Series = "EON 25P Series"; /*0x30f2*/ n15 = 14; /*0x30f9*/ goto LABEL_92; /*0x30ff*/ case 0x2020u: /*0x303c*/ n32 = -40; /*0x3092*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x30a9*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x30a9*/ XMC_25QH_Series = "STM/Micron/Numonyx 25P Series"; /*0x30b4*/ if ( n0x1000000 == 0x1000000 ) /*0x30bb*/ n0x40000 = 0x40000; /*0x30bb*/ @@ -1299,39 +1299,39 @@ LABEL_14: n4096 = 4096; /*0x3060*/ n32 = 32; /*0x306c*/ - n0x1000000 = sub_2E7C((unsigned int)n24608); /*0x3078*/ + n0x1000000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x3078*/ XMC_25QH_Series = "MXIC 25L/U Series"; /*0x307e*/ n15 = 17; /*0x3085*/ LABEL_92: - sub_3A00(&unk_4C40, XMC_25QH_Series, n15); /*0x36f4*/ + MemMove(&unk_4C40, XMC_25QH_Series, n15); /*0x36f4*/ *a2 = (__int64)off_4A30; /*0x3717*/ - sub_3A00(&unk_4A88, &unk_4B08, 24); /*0x3721*/ + MemMove(&unk_4A88, &unk_4B08, 24); /*0x3721*/ n24608_0 = n24608; /*0x372c*/ v8 = *a2; /*0x3732*/ n24608_1 = n24608; /*0x3735*/ *(_DWORD *)(v8 + 72) = dword_4B18; /*0x3742*/ *(_DWORD *)(*a2 + 76) = n4096; /*0x374e*/ *(_QWORD *)(*a2 + 80) = &unk_4C40; /*0x3754*/ - qword_4A20 = *(unsigned int *)sub_1CAC(1036304); /*0x3764*/ - sub_20C8(); /*0x376b*/ - sub_2638(4278190080LL); /*0x3775*/ + qword_4A20 = *(unsigned int *)PciExpressAddress(1036304); /*0x3764*/ + CompareGuid(); /*0x376b*/ + EraseSpiFlashSector(4278190080LL); /*0x3775*/ return 1; /*0x3781*/ } -// sub_3788 (0x3788) -char sub_3788(__int64 a1, __int64 *a2) +// 3788 (0x3788) +char DetectEsmtAndSst25vfFlash(__int64 a1, __int64 *a2) { - unsigned int n0x800000; // eax int n256; // ecx __int64 n17; // r8 const char *ESMT_25L_T_Series; // rdx __int64 v8; // rcx if ( !(unsigned __int8)sub_216C(a1, &n24608) ) /*0x379c*/ + unsigned int n0x800000; // eax int n256; // ecx __int64 n17; // r8 const char *ESMT_25L_T_Series; // rdx __int64 v8; // rcx if ( !(unsigned __int8)IdentifySpiFlash(a1, &n24608) ) /*0x379c*/ return 0; /*0x37a3*/ if ( (unsigned __int16)n24608 == 8332 ) /*0x37ba*/ { - n0x800000 = sub_2E7C((unsigned int)n24608); /*0x380c*/ + n0x800000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x380c*/ ESMT_25L_T_Series = "ESMT 25L T Series"; /*0x3811*/ goto LABEL_11; /*0x3811*/ } if ( (unsigned __int16)n24608 == 8588 ) /*0x37c1*/ { - n0x800000 = sub_2E7C((unsigned int)n24608); /*0x37f7*/ + n0x800000 = GetSpiFlashSizeFromJedecId((unsigned int)n24608); /*0x37f7*/ byte_4AFC = 0; /*0x37fc*/ ESMT_25L_T_Series = "ESMT 25L B Series"; /*0x3803*/ LABEL_11: @@ -1349,23 +1349,23 @@ n256 = n256; /*0x37ef*/ LABEL_12: n0x1000000 = n0x800000; /*0x381e*/ - sub_3A00(&unk_4C40, ESMT_25L_T_Series, n17); /*0x382e*/ + MemMove(&unk_4C40, ESMT_25L_T_Series, n17); /*0x382e*/ *a2 = (__int64)off_4A30; /*0x3847*/ - sub_3A00(&unk_4A88, &unk_4AF0, 24); /*0x3851*/ + MemMove(&unk_4A88, &unk_4AF0, 24); /*0x3851*/ n24608_0 = n24608; /*0x385c*/ v8 = *a2; /*0x3862*/ n24608_1 = n24608; /*0x3865*/ *(_DWORD *)(v8 + 72) = n256; /*0x3872*/ *(_DWORD *)(*a2 + 76) = dword_4B04; /*0x387e*/ *(_QWORD *)(*a2 + 80) = &unk_4C40; /*0x3889*/ - qword_4A20 = *(unsigned int *)sub_1CAC(1036304); /*0x3896*/ - sub_20C8(); /*0x389d*/ - sub_2638(4278190080LL); /*0x38a7*/ + qword_4A20 = *(unsigned int *)PciExpressAddress(1036304); /*0x3896*/ + CompareGuid(); /*0x389d*/ + EraseSpiFlashSector(4278190080LL); /*0x38a7*/ return 1; /*0x38b3*/ } -// sub_3960 (0x3960) -__int64 sub_3960(unsigned int _RAX_1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5) +// 3960 (0x3960) +__int64 CpuidWrapper(unsigned int _RAX_1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5) { __int64 result; // rax _RAX = _RAX_1; /*0x396f*/ __asm { cpuid } /*0x3974*/ @@ -1380,8 +1380,8 @@ return result; /*0x3996*/ } -// sub_3A00 (0x3A00) -char *sub_3A00(char *dst_1, char *src, unsigned __int64 n8) +// 3A00 (0x3A00) +char *MemMove(char *dst_1, char *src, unsigned __int64 n8) { char *dst; // rdi unsigned __int64 count_2; // rcx char v10; // dl unsigned __int64 n8_1; // rax unsigned __int64 count; // rax __int64 count_1; // rbx char count_3; // al unsigned __int64 Ptr; // rcx unsigned __int64 count_4; // rax __asm { pushf } /*0x3a03*/ dst = dst_1; /*0x3a09*/ diff --git a/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.h b/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.h index 9aea10d..cbc9585 100644 --- a/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.h +++ b/LenovoServerPkg/IntelPhyCard/IntelPhyCard/IntelPhyCard.h @@ -26,35 +26,35 @@ ); // Main initialization -__int64 sub_480(__int64 ImageHandle, __int64 a2); +__int64 IntelPhyCardDriverInit(__int64 ImageHandle, __int64 a2); // OCP PHY/MAC driver functions -__int64 sub_E14(void); -void sub_18A0(void); -char sub_1844(void); +__int64 ProvisionOcpCard(void); +void UpdateOcpCardStatus(void); +char GetOcpTypeCStatus(void); // SPI Flash / I2C functions -char __fastcall sub_234C(__int64 a1, __int64 a2, _DWORD *a3); -char __fastcall sub_2C94(__int64 a1, __int64 *a2); -char __fastcall sub_2FD4(__int64 a1, __int64 *a2); -char __fastcall sub_2BC0(__int64 a1, __int64 *a2); -char __fastcall sub_3788(__int64 a1, __int64 *a2); -signed __int64 __fastcall sub_2638(int a1); -__int64 __fastcall sub_2E7C(unsigned int a1); -char __fastcall sub_216C(__int64 a1, int *p_n24608); -char __fastcall sub_1EA4(__int64 a1, __int64 a2, unsigned int n2, char a4); -unsigned __int64 __fastcall sub_1F90(int a1, unsigned int *a2); -__int64 __fastcall sub_1DF8(char a1, char a2); -char *__fastcall sub_3A00(char *dst, char *src, unsigned __int64 n); +char __fastcall ProgramSpiFlashPage(__int64 a1, __int64 a2, _DWORD *a3); +char __fastcall DetectAdestoMicronAtmelFlash(__int64 a1, __int64 *a2); +char __fastcall DetectXmcWinbondAmicMxicFlash(__int64 a1, __int64 *a2); +char __fastcall DetectSst25lfFlash(__int64 a1, __int64 *a2); +char __fastcall DetectEsmtAndSst25vfFlash(__int64 a1, __int64 *a2); +signed __int64 __fastcall EraseSpiFlashSector(int a1); +__int64 __fastcall GetSpiFlashSizeFromJedecId(unsigned int a1); +char __fastcall IdentifySpiFlash(__int64 a1, int *p_n24608); +char __fastcall VerifyFlashPageBuffer(__int64 a1, __int64 a2, unsigned int n2, char a4); +unsigned __int64 __fastcall CalculateFlashAddressRange(int a1, unsigned int *a2); +__int64 __fastcall FlashCommandStatusControl(char a1, char a2); +char *__fastcall MemMove(char *dst, char *src, unsigned __int64 n); // Debug/Assert/Utility functions -__int64 sub_1AD8(void); -__int64 __fastcall sub_1A50(__int64 a1, const char *a2, ...); -__int64 __fastcall sub_1A98(__int64 a1, __int64 a2, __int64 a3); +__int64 GetPcdProtocol(void); +__int64 __fastcall DebugPrint(__int64 a1, const char *a2, ...); +__int64 __fastcall AssertHandler(__int64 a1, __int64 a2, __int64 a3); __int64 __fastcall sub_2784(__int64 a1); -__int64 __fastcall sub_1CAC(__int64 a1); -unsigned __int32 __fastcall sub_1950(unsigned __int16 Port); -__int64 __fastcall sub_3960(unsigned int _RAX_1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5); +__int64 __fastcall PciExpressAddress(__int64 a1); +unsigned __int32 __fastcall IoRead32Wrapper(unsigned __int16 Port); +__int64 __fastcall CpuidWrapper(unsigned int _RAX_1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5); // Global data extern UINT64 qword_4A20; // PciExpress MMIO base diff --git a/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.c b/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.c index 1f796e7..af4cab4 100644 --- a/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.c +++ b/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.c @@ -42,7 +42,7 @@ *Address: 0x370 *Size: 0xD7 *Purpose: UEFI driver entry point. Initializes global protocol pointers - *and calls sub_18F4 (library init) and sub_1850 (secondary init). + *and calls InitUefiPhase1 (library init) and InitUefiPhase2 (secondary init). *===========================================================================*/ EFI_STATUS EFIAPI ModuleEntryPoint( IN EFI_HANDLE ImageHandle, @@ -50,7 +50,7 @@ ) { if (!ImageHandle) { - sub_1810( + AssertBreak( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); @@ -58,7 +58,7 @@ ::ImageHandle = (__int64)ImageHandle; if (!SystemTable) { - sub_1810( + AssertBreak( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); @@ -67,7 +67,7 @@ BootServices = (__int64)SystemTable->BootServices; if (!BootServices) { - sub_1810( + AssertBreak( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); @@ -75,13 +75,13 @@ RuntimeServices = (__int64)SystemTable->RuntimeServices; if (!RuntimeServices) { - sub_1810( + AssertBreak( "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); } - sub_18F4(); + InitUefiPhase1(); if (!SystemTable_0) { SystemTable_0 = (__int64)SystemTable; @@ -89,12 +89,12 @@ RuntimeServices_0 = (__int64)SystemTable->RuntimeServices; } - sub_1850(0LL, 0LL, 0LL, 0LL); + InitUefiPhase2(0LL, 0LL, 0LL, 0LL); return 0; } /*============================================================================= - *Function: sub_448 + *Function: IpmiDeviceAmountEnumerateAll *Address: 0x448 *Size: 0x5DA *Purpose: Main device enumeration routine. Opens all handles, locates @@ -103,19 +103,19 @@ *NOTE: IDA output truncated - this is a partial decompilation. *Full source is ~10,277 chars but only 1,023 were returned. *===========================================================================*/ -__int64 sub_448(unsigned __int8 *a1, _WORD *a2) +__int64 IpmiDeviceAmountEnumerateAll(unsigned __int8 *a1, _WORD *a2) { __int64 Ptr; // rbx unsigned __int8 *v3; // r13 unsigned __int8 n4_3; // r14 __int64 v5; // rax __int64 v6; // rsi unsigned __int64 v8; // r12 __int64 n4; // r15 __int64 v10; // rax _BYTE *i; // rdx __int64 v12; // rax __int64 v13; // rsi __int64 v14; // r12 __int64 v15; // rax __int64 v16; // rax __int64 v17; // r14 unsigned __int64 v18; // r13 unsigned __int8 n4_1; // cl __int64 v20; // r14 __int64 v21; // rcx __int64 v22; // rax const char *v23; // rsi __int64 v24; // rax __int64 v25; // r15 __int64 v26; // r15 __int64 v27; // rax unsigned int v28; // r15d __int64 v29; // r9 _QWORD *v30; // r10 unsigned __int64 v31; // r8 // NOTE: Full decompilation was too large for IDA output. - // See sub_A24 for the per-controller enumeration logic, - // and sub_E2C for the per-controller iteration. + // See EnumerateDevicesOnController for the per-controller enumeration logic, + // and ReportDeviceAmountToBmc for the per-controller iteration. // This function appears to be the outermost dispatcher. return 0; } /*============================================================================= - *Function: sub_A24 + *Function: EnumerateDevicesOnController *Address: 0xA24 *Size: 0x408 *Purpose: Enumerate storage devices on a single ATA controller. @@ -129,7 +129,7 @@ *a4 - Output: SSD count *a5 - Output: SSD total capacity (GB) *===========================================================================*/ -__int64 sub_A24( +__int64 EnumerateDevicesOnController( __int64 a1, _BYTE *a2, _WORD *a3, @@ -180,7 +180,7 @@ if (result < 0) return result; // Check if device matches expected GUID (unk_2CC0) - if (!sub_16E0(v30, &unk_2CC0)) + if (!CompareGuid(v30, &unk_2CC0)) goto LABEL_NEXT_PORT; // Get device type info (HDD vs SSD detection) @@ -191,8 +191,8 @@ v14 = BootServices_0->AllocatePool(4, 512, &v26); v15 = v14; if (v14 < 0) { - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); - sub_1810("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", 398, "!EFI_ERROR (Status)"); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); + AssertBreak("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", 398, "!EFI_ERROR (Status)"); return v15; } @@ -228,11 +228,11 @@ v33[n39--] = 0; } while (n39); - // Format model name as ASCII string sub_1BE8(v28, L"%a", v33); - sub_17C8(0x80000000LL, "Device Model Number = %s ,", v28); + // Format model name as ASCII string SPrint(v28, L"%a", v33); + DebugPrint(0x80000000LL, "Device Model Number = %s ,", v28); // Calculate capacity if (*v26 < 0) { - // Device does not support LBA - use ATAPI fallback sub_1BE8(v28, L"%a ATAPI\n", v33); + // Device does not support LBA - use ATAPI fallback SPrint(v28, L"%a ATAPI\n", v33); } else { if ((v26[83] & 0x400) != 0) { // 48-bit LBA addressing: words 100-103 BootServices_0->CopyMem(&v29, v26 + 100, 8); @@ -246,11 +246,11 @@ // Convert sectors to GB (sector size = 512 bytes = << 9) v24 = v23 << 9; // total bytes v6 = v24 / 1000000000; // GB integer part v25 = v24 % 1000000000 / 100000000; // GB fractional part (1 decimal) - sub_1BE8(v32, L"%d.%dGB", (unsigned int)(v24 / 1000000000), v25); - sub_17C8(0x80000000LL, " = %d.%dGB ,\n", v6, v25); + SPrint(v32, L"%d.%dGB", (unsigned int)(v24 / 1000000000), v25); + DebugPrint(0x80000000LL, " = %d.%dGB ,\n", v6, v25); } - // Categorize as SSD or HDD if (sub_1624(v28)) { + // Categorize as SSD or HDD if (IsSsd(v28)) { ++*a4; // SSD count *a5 += v6; // SSD total capacity } else { @@ -263,13 +263,13 @@ goto LABEL_NEXT_PORT; } - // ASSERT on failure sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v16); + // ASSERT on failure DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v16); n411 = 411; } else { - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v12); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v12); n411 = 391; } - sub_1810("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", n411, "!EFI_ERROR (Status)"); + AssertBreak("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", n411, "!EFI_ERROR (Status)"); LABEL_NEXT_PORT: ++v10; @@ -285,12 +285,12 @@ } /*============================================================================= - *Function: sub_E2C + *Function: ReportDeviceAmountToBmc *Address: 0xE2C *Size: 0x294 *Purpose: Enumerate all ATA/SATA controllers and count devices on each. *Iterates all handles with ATA Pass Thru protocol, opens the - *Block IO protocol, and for each controller calls sub_A24. + *Block IO protocol, and for each controller calls EnumerateDevicesOnController. * *Parameters: *a1 - Output: HDD count (accumulated) @@ -298,13 +298,13 @@ *a3 - Output: SSD count (accumulated) *a4 - Output: SSD total capacity (accumulated) *===========================================================================*/ -__int64 sub_E2C( +__int64 ReportDeviceAmountToBmc( _BYTE *a1, _WORD *a2, _BYTE *a3, _WORD *a4) { - __int64 result; // rax __int64 v10; // rbx - status unsigned __int8 v11; // si - loop index __int64 v12; // rax - status __int64 n533; // rdx - line number for assert __int64 v14; // rax - status __int64 v15; // rax - status __int64 v16; // rax - status __int64 v17; // rcx __int64 v18; // rax - status from sub_A24 char v19; // [rsp+40h] [rbp-19h] BYREF - HDD count _BYTE v20[3]; // [rsp+41h] [rbp-18h] BYREF - SSD count __int16 v21; // [rsp+44h] [rbp-15h] BYREF - HDD capacity _WORD v22[2]; // [rsp+48h] [rbp-11h] BYREF - SSD capacity unsigned int v23; // [rsp+4Ch] [rbp-Dh] + __int64 result; // rax __int64 v10; // rbx - status unsigned __int8 v11; // si - loop index __int64 v12; // rax - status __int64 n533; // rdx - line number for assert __int64 v14; // rax - status __int64 v15; // rax - status __int64 v16; // rax - status __int64 v17; // rcx __int64 v18; // rax - status from EnumerateDevicesOnController char v19; // [rsp+40h] [rbp-19h] BYREF - HDD count _BYTE v20[3]; // [rsp+41h] [rbp-18h] BYREF - SSD count __int16 v21; // [rsp+44h] [rbp-15h] BYREF - HDD capacity _WORD v22[2]; // [rsp+48h] [rbp-11h] BYREF - SSD capacity unsigned int v23; // [rsp+4Ch] [rbp-Dh] __int64 v24; // [rsp+50h] [rbp-9h] BYREF - handle buffer unsigned __int64 v25; // [rsp+58h] [rbp-1h] BYREF - handle count __int64 v26; // [rsp+60h] [rbp+7h] BYREF - ATA protocol interface __int64 v27; // [rsp+68h] [rbp+Fh] BYREF - function number __int64 v28; // [rsp+70h] [rbp+17h] BYREF - device number __int64 v29; // [rsp+78h] [rbp+1Fh] BYREF - bus number __int64 v30; // [rsp+80h] [rbp+27h] BYREF - target ID _BYTE v31[8]; // [rsp+88h] [rbp+2Fh] BYREF - protocol instance v19 = 0; v20[0] = 0; v21 = 0; @@ -333,7 +333,7 @@ if (v12 >= 0) break; - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v12); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v12); n533 = 533; goto LABEL_ASSERT; } @@ -344,7 +344,7 @@ &v26); v10 = v14; if (v14 < 0) { - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); n533 = 541; goto LABEL_ASSERT; } @@ -358,7 +358,7 @@ &v27); v10 = v15; if (v15 < 0) { - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v15); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v15); n533 = 551; goto LABEL_ASSERT; } @@ -366,12 +366,12 @@ // Reset the ATA controller port v16 = (*(__int64 ( **)(__int64, __int64, _QWORD))(v26 + 48))(v26, 2, 0); v10 = v16; if (v16 < 0) { - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v16); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v16); n533 = 565; goto LABEL_ASSERT; } - // Debug print: SATA controller location sub_17C8( + // Debug print: SATA controller location DebugPrint( 0x80000000LL, "SATA %04X %04X (S:%02X B:%02X D:%02X F:%02X)\n", (unsigned __int16)v23, @@ -386,7 +386,7 @@ v17 = *(_QWORD *)(v24 + 8 *v11); v22[0] = 0; v21 = 0; - v18 = sub_A24(v17, &v19, &v21, v20, v22); + v18 = EnumerateDevicesOnController(v17, &v19, &v21, v20, v22); v10 = v18; if (v18 >= 0) { *a1 += v19; // Accumulate HDD count @@ -395,12 +395,12 @@ *a4 += v22[0]; // Accumulate SSD capacity goto LABEL_NEXT; } - sub_17C8(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v18); - sub_1810("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", 579, "!EFI_ERROR (Status)"); + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v18); + AssertBreak("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", 579, "!EFI_ERROR (Status)"); return v10; LABEL_ASSERT: - sub_1810("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", n533, "!EFI_ERROR (Status)"); + AssertBreak("e:\\hs\\LenovoServerPkg\\IpmiDeviceAmount\\LnvIpmiDeviceAmount.c", n533, "!EFI_ERROR (Status)"); LABEL_NEXT: v11++; @@ -409,7 +409,7 @@ } /*============================================================================= - *Function: sub_10C0 + *Function: ReadyToBootCallback *Address: 0x10C0 *Size: 0x4CD *Purpose: Register ready-to-boot callback. Reads CPU information, @@ -419,7 +419,7 @@ *Parameters: *a1 - ImageHandle or driver binding handle *===========================================================================*/ -__int64 sub_10C0(__int64 a1) +__int64 ReadyToBootCallback(__int64 a1) { __int64 Ptr; // r13 unsigned __int8 Ptr; // r15 unsigned __int8 Ptr; // r12 __int64 v4; // rdx __int64 v5; // rcx __int64 v6; // rbx char v7; // di __int64 v8; // rbx _BYTE *v9; // rdx char v10; // r8 char v11; // cl _BYTE *v12; // rdx unsigned __int8 n5; // cl __int64 n0x7FFF; // rdx __int64 n0x7FFF_1; // rcx __int64 v16; // r8 char v17; // bl __int64 v18; // rdi __int64 v19; // rax unsigned __int8 v20; // r14 unsigned int v21; // ebx unsigned __int8 v22; // si __int64 v23; // rax unsigned __int8 v24; // di unsigned __int8 n0x17; // bl unsigned __int8 *v26; // rbx __int64 n23; // rdi __int64 v28; // r9 __int64 v29; // rax __int64 result; // rax char *v31; // rdx __int64 v32; // rax __int64 v33; // [rsp+20h] [rbp-99h] __int64 v34; // [rsp+20h] [rbp-99h] @@ -434,22 +434,22 @@ } /*============================================================================= - *Function: sub_1590 - StrLen (Unicode string length) + *Function: UnicodeStringLength - StrLen (Unicode string length) *Address: 0x1590 *Size: 0x93 *===========================================================================*/ -unsigned __int64 sub_1590(_WORD *SSD) +unsigned __int64 UnicodeStringLength(_WORD *SSD) { _WORD *v1; // rbx unsigned __int64 n0xF4240; // rdi - counter, max 1,000,000 v1 = SSD; if (!SSD) - sub_1810("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 172, "String != ((void *) 0)"); + AssertBreak("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 172, "String != ((void *) 0)"); if (((unsigned __int8)v1 & 1) != 0) - sub_1810("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 173, "((UINTN) String & 0x00000001) == 0"); + AssertBreak("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 173, "((UINTN) String & 0x00000001) == 0"); n0xF4240 = 0; while (*v1) { if (n0xF4240 >= 0xF4240) - sub_1810( + AssertBreak( "e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 181, "Length < _gPcd_FixedAtBuild_PcdMaximumUnicodeStringLength"); @@ -460,7 +460,7 @@ } /*============================================================================= - *Function: sub_1624 - IsSsd (detect SSD from model string) + *Function: IsSsd (detect SSD from model string) *Address: 0x1624 *Size: 0xB9 *Purpose: Check if the device model string indicates an SSD. @@ -468,7 +468,7 @@ * *Returns: pointer to matched substring if SSD, NULL otherwise *===========================================================================*/ -_WORD *sub_1624(_WORD *SSD_1) +_WORD *IsSsd(_WORD *SSD_1) { _WORD *result; // rax _WORD *Index; // rbx __int64 v3; // rdx __int64 v4; // r8 __int64 v5; // r9 __int64 v6; // r10 __int64 v7; // r11 unsigned __int64 n3; // rdi __int64 v9; // rcx __int16 v10; // dx _WORD *v11; // rax result = SSD_1; if (!SSD_1) @@ -480,7 +480,7 @@ v5 = 0; v6 = 0; v7 = 0; - n3 = sub_1590(Index); + n3 = UnicodeStringLength(Index); if (!n3) break; // Compare first 5 characters for "SSD" pattern match if ((*Index & 0xFFDF) == 'S' && (Index[1] & 0xFFDF) == 'S' && (Index[2] & 0xFFDF) == 'D') @@ -508,11 +508,11 @@ } /*============================================================================= - *Function: sub_16E0 - CompareGuid + *Function: CompareGuid *Address: 0x16E0 *Size: 0x67 *===========================================================================*/ -BOOLEAN sub_16E0(__int64 a1, __int64 a2) +BOOLEAN CompareGuid(__int64 a1, __int64 a2) { __int64 v2; // rdx __int64 v3; // rcx __int64 v4; // r8 __int64 v5; // r9 @@ -521,24 +521,24 @@ } /*============================================================================= - *Function: sub_1748 - GetCurrentTimeString + *Function: GetCurrentTimeString *Address: 0x1748 *Size: 0x7F *===========================================================================*/ -__int64 sub_1748() +__int64 GetCurrentTimeString() { // Returns current time formatted as a string buffer // Used for debug/timestamp output return 0; } /*============================================================================= - *Function: sub_17C8 - DebugPrint + *Function: DebugPrint *Address: 0x17C8 *Size: 0x47 *Purpose: Internal debug logging. Wraps the UEFI DebugPrint or similar. *Used extensively with format string "\nASSERT_EFI_ERROR (Status = %r)\n". *===========================================================================*/ -__int64 sub_17C8(__int64 a1, const char *a2, ...) +__int64 DebugPrint(__int64 a1, const char *a2, ...) { __int64 result; // rax va_list va; // [rsp+48h] [rbp+10h] BYREF va_start(va, a2); // Wraps DebugPrint or similar UEFI debug output function result = 0; @@ -546,13 +546,13 @@ } /*============================================================================= - *Function: sub_1810 - AssertBreak (internal assertion handler) + *Function: AssertBreak (internal assertion handler) *Address: 0x1810 *Size: 0x3E *Purpose: Invoked on ASSERT failures. Logs file/line/expression and *enters dead loop (CpuDeadLoop). *===========================================================================*/ -__int64 sub_1810(__int64 a1, __int64 a2, __int64 a3) +__int64 AssertBreak(__int64 a1, __int64 a2, __int64 a3) { // Standard UEFI ASSERT implementation: // DEBUG((DEBUG_ERROR, "ASSERT [module] %s(%d): %s\n", File, Line, Expression)); @@ -561,28 +561,28 @@ } /*============================================================================= - *Function: sub_1850 - InitUefiPhase2 + *Function: InitUefiPhase2 *Address: 0x1850 *Size: 0xA2 *Purpose: Secondary UEFI initialization. Appears to register the - *device enumeration callback (sub_10C0) for ReadyToBoot event. + *device enumeration callback (ReadyToBootCallback) for ReadyToBoot event. *===========================================================================*/ -__int64 sub_1850(__int64 a1, __int64 a2, __int64 a3, __int64 a4) +__int64 InitUefiPhase2(__int64 a1, __int64 a2, __int64 a3, __int64 a4) { - // Registers sub_10C0 as a ReadyToBoot callback - // Uses gBS->CreateEventEx(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, sub_10C0, ...) + // Registers ReadyToBootCallback as a ReadyToBoot callback + // Uses gBS->CreateEventEx(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, ReadyToBootCallback, ...) // or gBS->RegisterProtocolNotify(...) return 0; } /*============================================================================= - *Function: sub_18F4 - InitUefiPhase1 + *Function: InitUefiPhase1 *Address: 0x18F4 *Size: 0xDD *Purpose: Primary UEFI library initialization. Initializes UefiLib, *HOB library, and other base services. *===========================================================================*/ -__int64 sub_18F4() +__int64 InitUefiPhase1() { // Initialize UEFI libraries: // - UefiLib initialization @@ -591,90 +591,90 @@ } /*============================================================================= - *Function: sub_19D4 - MemSet (fill memory) + *Function: MemSet (fill memory) *Address: 0x19D4 *Size: 0x71 *===========================================================================*/ -_BYTE *sub_19D4(__int64 a1, _BYTE *n, int n10, char a4) +_BYTE *MemSet(__int64 a1, _BYTE *n, int n10, char a4) { // Wraps gBS->SetMem() or BaseMemoryLib SetMem() return NULL; } /*============================================================================= - *Function: sub_1A48 - AsciiStrToUpper + *Function: AsciiStrToUpper *Address: 0x1A48 *Size: 0xD7 *===========================================================================*/ -__int64 sub_1A48(char *a1, char **a2) +__int64 AsciiStrToUpper(char *a1, char **a2) { // Converts ASCII string to uppercase return 0; } /*============================================================================= - *Function: sub_1B20 - GetCpuInfo + *Function: GetCpuInfo *Address: 0x1B20 *Size: 0xC7 *Purpose: Reads CPU model name and count from HOB or SMBIOS. - *Used by sub_10C0 for IPMI reporting. + *Used by ReadyToBootCallback for IPMI reporting. *===========================================================================*/ -const char *sub_1B20(__int64 n4) +const char *GetCpuInfo(__int64 n4) { // Reads CPU information via HOB or SMBIOS return ""; } /*============================================================================= - *Function: sub_1BE8 - SPrint + *Function: SPrint *Address: 0x1BE8 *Size: 0x26 *Purpose: Unicode string formatted print. Wraps UnicodeSPrint or *similar to format a Unicode string from format + args. *===========================================================================*/ -__int64 sub_1BE8(__int16 *m, char *Format, ...) +__int64 SPrint(__int16 *m, char *Format, ...) { // Wraps UnicodeSPrint(dst, size, fmt, ...) return 0; } /*============================================================================= - *Function: sub_1C10 - ShellPrint + *Function: ShellPrint *Address: 0x1C10 *Size: 0x478 *Purpose: Formatted debug print to serial/console output. *Handles format string parsing, width/precision specifiers, *and outputs to the UEFI console or serial port. *===========================================================================*/ -__int64 sub_1C10(__int16 *m, __int64 a2, char *Format, ...) +__int64 ShellPrint(__int16 *m, __int64 a2, char *Format, ...) { // Full serial/console print implementation with format string support return 0; } /*============================================================================= - *Function: sub_2088 - ShellPrintEx + *Function: ShellPrintEx *Address: 0x2088 *Size: 0x1D *===========================================================================*/ -__int64 sub_2088(__int16 *m, __int64 a2, char *Format, ...) +__int64 ShellPrintEx(__int16 *m, __int64 a2, char *Format, ...) { // Short-form serial print wrapper return 0; } /*============================================================================= - *Function: sub_20A8 - GetSerialPort + *Function: GetSerialPort *Address: 0x20A8 *Size: 0x4E *===========================================================================*/ -__int64 sub_20A8() +__int64 GetSerialPort() { // Returns current serial port configuration return 0; } /*============================================================================= - *Function: sub_20F8 - SerialPrint + *Function: SerialPrint *Address: 0x20F8 *Size: 0x2F *===========================================================================*/ -__int64 sub_20F8(__int64 a1) +__int64 SerialPrint(__int64 a1) { // Low-level serial byte output return 0; } diff --git a/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.h b/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.h index ab3dcc6..2d94dce 100644 --- a/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.h +++ b/LenovoServerPkg/IpmiDeviceAmount/IpmiDeviceAmount/IpmiDeviceAmount.h @@ -369,7 +369,7 @@ EFI_STATUS EFIAPI -__int64 v18; // rax - status from sub_A24( +__int64 v18; // rax - status from EnumerateDevicesOnController( VOID ); @@ -669,7 +669,7 @@ EFI_STATUS EFIAPI -gBS->CreateEventEx(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, sub_10C0, ...)( +gBS->CreateEventEx(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, ReadyToBootCallback, ...)( VOID ); @@ -721,4 +721,4 @@ VOID ); -#endif /* __IPMIDEVICEAMOUNT_H__ */ \ No newline at end of file +#endif /* __IPMIDEVICEAMOUNT_H__ */ diff --git a/LenovoServerPkg/SetupDefaults/SetupDefaultLoad/SetupDefaultLoad.c b/LenovoServerPkg/SetupDefaults/SetupDefaultLoad/SetupDefaultLoad.c index cdb9d21..765e040 100644 --- a/LenovoServerPkg/SetupDefaults/SetupDefaultLoad/SetupDefaultLoad.c +++ b/LenovoServerPkg/SetupDefaults/SetupDefaultLoad/SetupDefaultLoad.c @@ -8,42 +8,42 @@ #include "SetupDefaultLoad.h" /* - *sub_2A0 at 0x2a0 + *SetMem at 0x2a0 */ -void *sub_2A0(void *buf, unsigned __int64 count, char value) +void *SetMem(void *buf, unsigned __int64 count, char value) { memset(buf, value, count); /*0x2aa*/ return buf; /*0x2af*/ } /* - *_mm_pause_w at 0x300 + *MmPause at 0x300 */ -void sub_300() +void MmPause() { _mm_pause(); /*0x300*/ } /* - *__rdtsc_w at 0x310 + *RdtSc at 0x310 */ -unsigned __int64 sub_310() +unsigned __int64 RdtSc() { return __rdtsc(); /*0x319*/ } /* - *_enable_w at 0x320 + *EnableInterrupts at 0x320 */ -void sub_320() +void EnableInterrupts() { _enable(); /*0x320*/ } /* - *_disable_w at 0x330 + *DisableInterrupts at 0x330 */ -void sub_330() +void DisableInterrupts() { _disable(); /*0x330*/ } @@ -57,9 +57,9 @@ } /* - *sub_350 at 0x350 + *CopyMem at 0x350 */ -char *sub_350(char *dst, char *src, unsigned __int64 count) +char *CopyMem(char *dst, char *src, unsigned __int64 count) { char *dst_1; // rax unsigned __int64 count_1; // rcx char *dst_2; // rdi char *src_1; // rsi dst_1 = dst; /*0x360*/ if ( src < dst && &src[count - 1] >= dst ) /*0x368*/ @@ -808,7 +808,7 @@ unsigned __int32 CalculateCheckSum(unsigned __int16 n1288) { if ( (n1288 & 3) != 0 ) /*0x5364*/ - sub_5450((__int64)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 193, (__int64)"(Port & 3) == 0"); /*0x5379*/ + VPrintWrapper((__int64)"e:\\hs\\MdePkg\\Library\\BaseIoLibIntrinsic\\IoLibMsc.c", 193, (__int64)"(Port & 3) == 0"); /*0x5379*/ return __indword(n1288); /*0x5382*/ } @@ -848,7 +848,7 @@ result = LogDebugMessage(); /*0x541f*/ if ( result ) /*0x542a*/ { - result = sub_5DA0(); /*0x542c*/ + result = GetCurrentTsc(); /*0x542c*/ if ( ((unsigned int)result & (unsigned int)a1) != 0 ) /*0x5437*/ return (*v4)(a1, a2, (__int64 *)va); /*0x5446*/ } @@ -876,7 +876,7 @@ (__int64)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\SetMemWrapper.c", 54, (__int64)"(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)Buffer)"); - return sub_2A0(p_n2, n256, 0); /*0x54d6*/ + return SetMem(p_n2, n256, 0); /*0x54d6*/ } /* @@ -893,7 +893,7 @@ *a2 = 0; /*0x553e*/ if ( !*(_QWORD *)(SystemTable + 104) ) /*0x5542*/ return 0x800000000000000EuLL; /*0x556b*/ - for ( i = 0; !sub_5F54(a1, i + *(_QWORD *)(SystemTable + 112)); i += 24 ) /*0x5548*/ + for ( i = 0; !ValidateMemoryBuffer(a1, i + *(_QWORD *)(SystemTable + 112)); i += 24 ) /*0x5548*/ { if ( (unsigned __int64)++Index >= *(_QWORD *)(SystemTable + 104) ) /*0x5569*/ return 0x800000000000000EuLL; /*0x5569*/ @@ -1434,7 +1434,7 @@ (__int64)"(Length - 1) <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)SourceBuffer)"); if ( dst == src ) /*0x5f29*/ return dst; /*0x5f2b*/ - else return sub_350(dst, src, count); /*0x5f39*/ + else return CopyMem(dst, src, count); /*0x5f39*/ } /* diff --git a/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.c b/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.c index 2faa4da..f342971 100644 --- a/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.c +++ b/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.c @@ -30,26 +30,26 @@ // --------------------------------------------------------------------------- // Forward declarations // --------------------------------------------------------------------------- -char *sub_2A0(char *Buf, UINTN Size); -UINTN sub_C00(CONST CHAR16 *String); -UINTN sub_E78(CONST CHAR8 *String); -__int64 sub_EE4(void); -__int64 sub_FEC(__int64 a1, __int64 a2, __int64 a3); -BOOL sub_1090(__int64 a1, __int64 a2); -__int64 sub_10F8(void); -EFI_STATUS sub_1184(EFI_GUID *TableGuid, VOID **Table); -UINT32 sub_1248(void); -__int64 sub_1278(void); -__int64 sub_134C(__int64 Value, _BYTE *Buffer, int Radix, char Flag); -__int64 sub_13C0(char *String, char **EndPtr); -const char *sub_1498(__int64 Status); -INTN sub_1588(__int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, __int64 VaList); -UINTN sub_1A00(__int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, ...); -UINT32 sub_1A20(UINT32 DefaultFs1); -UINT64 sub_1AD8(__int64 a1); -void sub_1B50(__int64 Buffer, __int64 Value, int Size); -int *sub_1B5E(int *Buffer, UINTN Size, unsigned int Value); -char *sub_1BB0(char *Dst, const char *Src, UINTN Size); +char *SimpleMemset(char *Buf, UINTN Size); +UINTN UnicodeStringLength(CONST CHAR16 *String); +UINTN AsciiStringLength(CONST CHAR8 *String); +__int64 DebugPrintProtocolLazyInit(void); +__int64 AssertHandler(__int64 a1, __int64 a2, __int64 a3); +BOOL CompareGuid(__int64 a1, __int64 a2); +__int64 PcdProtocolLookupLazyInit(void); +EFI_STATUS GetConfigurationTableByGuid(EFI_GUID *TableGuid, VOID **Table); +UINT32 MmioRead32(void); +__int64 InitializeHobList(void); +__int64 IntegerToAscii(__int64 Value, _BYTE *Buffer, int Radix, char Flag); +__int64 AsciiToInteger(char *String, char **EndPtr); +const char *EfiStatusToString(__int64 Status); +INTN UnicodeVSPrint(__int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, __int64 VaList); +UINTN UnicodeSPrintVaList(__int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, ...); +UINT32 GetMeFirmwareStatusFromHob(UINT32 DefaultFs1); +UINT64 ReadUnaligned64(__int64 a1); +void ZeroMemAlignedWriter(__int64 Buffer, __int64 Value, int Size); +int *Memset(int *Buffer, UINTN Size, unsigned int Value); +char *Memcpy(char *Dst, const char *Src, UINTN Size); // =========================================================================== // Entry Point @@ -60,15 +60,15 @@ IN EFI_SYSTEM_TABLE *SystemTable ) { - sub_384 ((__int64)ImageHandle, SystemTable); - return sub_550 (); + DriverInitialization ((__int64)ImageHandle, SystemTable); + return SmbiosType11SupportInstall (); } // =========================================================================== -// Driver Initialization (sub_384) +// Driver Initialization (DriverInitialization) // =========================================================================== -__int64 sub_384 ( +__int64 DriverInitialization ( __int64 ImageHandle, EFI_SYSTEM_TABLE *SystemTable ) @@ -80,52 +80,52 @@ ::ImageHandle = (EFI_HANDLE)ImageHandle; if (!ImageHandle) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, (__int64)"gImageHandle != ((void *) 0)"); ::SystemTable = (EFI_SYSTEM_TABLE *)SystemTable; if (!SystemTable) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, (__int64)"gST != ((void *) 0)"); BootServices = SystemTable->BootServices; if (!BootServices) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, (__int64)"gBS != ((void *) 0)"); RuntimeServices = SystemTable->RuntimeServices; if (!RuntimeServices) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, (__int64)"gRT != ((void *) 0)"); - v3 = sub_1184 (&gEfiDxeServicesTableGuid, (VOID **)&gDS); + v3 = GetConfigurationTableByGuid (&gEfiDxeServicesTableGuid, (VOID **)&gDS); v4 = v3; if (v3 < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v3); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v3); + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 64, (__int64)"!EFI_ERROR (Status)"); } if (!gDS) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxeServicesTableLib\\DxeServicesTableLib.c", 65, (__int64)"gDS != ((void *) 0)"); if (v4 < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v4); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v4); + AssertHandler ( (__int64)"e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SmbiosType11\\SmbiosType11\\DEBUG\\AutoGen.c", 323, (__int64)"!EFI_ERROR (Status)"); @@ -139,29 +139,29 @@ (VOID **)&mPciUsra); if (v5 < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v5); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v5); + AssertHandler ( (__int64)"e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 52, (__int64)"!EFI_ERROR (Status)"); } if (!mPciUsra) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\CpRcPkg\\Library\\DxeMmPciBaseLib\\DxeMmPciBaseLib.c", 53, (__int64)"mPciUsra != ((void *) 0)"); } - sub_1278 (); - v6 = sub_10F8 (); + InitializeHobList (); + v6 = PcdProtocolLookupLazyInit (); return ((EFI_SMBIOS_PROTOCOL *)v6)->SetString (5); } // =========================================================================== -// SMBIOS Type 11 Support Install (sub_550) +// SMBIOS Type 11 Support Install (SmbiosType11SupportInstall) // =========================================================================== -__int64 sub_550 ( +__int64 SmbiosType11SupportInstall ( __int64 a1, __int64 a2 ) @@ -174,16 +174,16 @@ v6 = a2; v5 = a1; - sub_F64 (-1, "SmbiosType11Support entered\n"); + DebugPrint (-1, "SmbiosType11Support entered\n"); v2 = BootServices->RegisterProtocolNotify ( 512, 8, - sub_954); + SmbiosType11Installer); if (v2 < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v2); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v2); + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiLib\\UefiLib.c", 167, (__int64)"!EFI_ERROR (Status)"); @@ -195,23 +195,23 @@ &v5); if (v3 < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v3); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v3); + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiLib\\UefiLib.c", 179, (__int64)"!EFI_ERROR (Status)"); } BootServices->CloseEvent (v6); - sub_F64 (-1, "SmbiosType11Support exiting.......\n"); + DebugPrint (-1, "SmbiosType11Support exiting.......\n"); return 0; } // =========================================================================== -// ME Status IPMI SEL Logging (sub_640) +// ME Status IPMI SEL Logging (MeStatusIpmiSelLogging) // =========================================================================== -unsigned __int64 sub_640 ( +unsigned __int64 MeStatusIpmiSelLogging ( void ) { @@ -233,27 +233,27 @@ V10 = 0; ZeroMem (Data, sizeof (Data)); - sub_102C ((__int64)&V15, 4); - sub_102C ((__int64)&V16, 4); + ZeroMem ((__int64)&V15, 4); + ZeroMem ((__int64)&V16, 4); - Fs = *(UINT32 *)(sub_1248 () + 64); + Fs = *(UINT32 *)(MmioRead32 () + 64); FsLowNib = (CHAR8)Fs; V15 = Fs; if (Fs == (UINT32)-1) { - Fs1 = sub_1A20 (-1); + Fs1 = GetMeFirmwareStatusFromHob (-1); FsLowNib = (CHAR8)Fs1; V15 = Fs1; } // Set PCD value based on FS[3:0] - Status = sub_10F8 (); + Status = PcdProtocolLookupLazyInit (); ((EFI_PCD_PROTOCOL *)Status)->Set8 (217, FsLowNib & 0xF); if ((V15 & 0xF) == 2) { - // ME in recovery mode V16 = *(UINT32 *)(sub_1248 () + 72); - sub_F64 (2, "[SPS] WARNING: ME is in recovery mode (cause: %d)\n", (V16 >> 8) & 7); + // ME in recovery mode V16 = *(UINT32 *)(MmioRead32 () + 72); + DebugPrint (2, "[SPS] WARNING: ME is in recovery mode (cause: %d)\n", (V16 >> 8) & 7); } else if ((V15 & 0xF) != 5) { @@ -264,7 +264,7 @@ &gEfiDxeIpmiTransportProtocolGuid, NULL, &V10); - sub_F64 (-1, " LogFailDimmIntoSel gEfiDxeIpmiTransportProtocolGuid Status: %r \n", Ipmi); + DebugPrint (-1, " LogFailDimmIntoSel gEfiDxeIpmiTransportProtocolGuid Status: %r \n", Ipmi); if (Ipmi >= 0) { @@ -295,7 +295,7 @@ 16, &RecordId, &Reply); - sub_F64 (-1, " IPMI_STORAGE_ADD_SEL_ENTRY Status: %r RecordId: %x \n", Ipmi, RecordId); + DebugPrint (-1, " IPMI_STORAGE_ADD_SEL_ENTRY Status: %r RecordId: %x \n", Ipmi, RecordId); } } @@ -303,10 +303,10 @@ } // =========================================================================== -// SPS/ME Version String (sub_7F8) +// SPS/ME Version String (SpsMeVersionString) // =========================================================================== -__int64 sub_7F8 ( +__int64 SpsMeVersionString ( __int64 a1 ) { @@ -321,10 +321,10 @@ Ipmi = NULL; - sub_102C ((__int64)&V13, 4); - V13 = *(UINT32 *)(sub_1248 () + 64); + ZeroMem ((__int64)&V13, 4); + V13 = *(UINT32 *)(MmioRead32 () + 64); if ((UINT32)V13 == (UINT32)-1) - V13 = sub_1A20 (-1); + V13 = GetMeFirmwareStatusFromHob (-1); Status = BootServices->LocateProtocol ( &gEfiDxeIpmiTransportProtocolGuid, @@ -350,8 +350,8 @@ { if ((V13 & 0xF) == 2) { - sub_1B5E ((int *)a1, 255, 0); - sub_1560 ( + Memset ((int *)a1, 255, 0); + UnicodeSPrintWrapper ( (__int16 *)a1, 255, L"ME Version:%d.%d.%d.%d", @@ -359,8 +359,8 @@ } else { - sub_1B5E ((int *)a1, 255, 0); - sub_1560 ( + Memset ((int *)a1, 255, 0); + UnicodeSPrintWrapper ( (__int16 *)a1, 255, L"ME Verison:%d.%d.%d.%d", @@ -372,10 +372,10 @@ } // =========================================================================== -// Main SMBIOS Type 11 Installer (sub_954) +// Main SMBIOS Type 11 Installer (SmbiosType11Installer) // =========================================================================== -__int64 sub_954 ( +__int64 SmbiosType11Installer ( __int64 a1 ) { @@ -396,25 +396,25 @@ UINT8 Type; INT16 Handle; - sub_1B50 ((__int64)Buf, 0, 510); + ZeroMemAlignedWriter ((__int64)Buf, 0, 510); V12 = 0; - sub_1B50 ((__int64)SpsString, 0, 255); - sub_1B50 ((__int64)BmcString, 0, 255); - sub_E78 ("INVALID"); + ZeroMemAlignedWriter ((__int64)SpsString, 0, 255); + ZeroMemAlignedWriter ((__int64)BmcString, 0, 255); + AsciiStringLength ("INVALID"); N2 = 0; - sub_F64 (-1, "InstallSmbiosType11Structure entered\n"); + DebugPrint (-1, "InstallSmbiosType11Structure entered\n"); Status = BootServices->LocateProtocol ( &gEfiSmbiosProtocolGuid, NULL, (VOID **)&gSmbios); - sub_F64 (-1, "gBS->LocateProtocol gEfiSmbiosProtocolGuid Status: %r\n", Status); + DebugPrint (-1, "gBS->LocateProtocol gEfiSmbiosProtocolGuid Status: %r\n", Status); if (Status >= 0) { V4 = BootServices->CloseEvent (a1); - sub_F64 (-1, "CloseEvent Status: %r\n", V4); + DebugPrint (-1, "CloseEvent Status: %r\n", V4); // Locate BMC Self Test Log Protocol V5 = BootServices->LocateProtocol ( &gEfiBmcSelfTestLogProtocolGuid, @@ -422,39 +422,39 @@ &V12); if (V5 < 0) { - sub_F64 (0x80000000LL, + DebugPrint (0x80000000LL, "InstallSmbiosType11Structure: Locate gEfiBmcSelfTestLogProtocolGuid status: %r\n", V5); - sub_DD0 (BmcString); + CopyInvalidString (BmcString); } else { - sub_1560 ( + UnicodeSPrintWrapper ( Buf, L"BMC Version:%d.%x.%4x", *(UINT8 *)(V12 + 91) & 0x7F, *(UINT8 *)(V12 + 92), *(UINT32 *)(V12 + 100), V10); - sub_C00 (Buf); - sub_C94 (Buf, BmcString); + UnicodeStringLength (Buf); + UnicodeToAscii (Buf, BmcString); } - // Get SPS version string V6 = sub_7F8 ((__int64)Buf); + // Get SPS version string V6 = SpsMeVersionString ((__int64)Buf); if (V6 < 0) { - sub_F64 (0x80000000LL, + DebugPrint (0x80000000LL, "InstallSmbiosType11Structure: Locate GetSPSString status: %r\n", V6); - sub_DD0 (SpsString); + CopyInvalidString (SpsString); } else { - sub_C00 (Buf); - sub_C94 (Buf, SpsString); + UnicodeStringLength (Buf); + UnicodeToAscii (Buf, SpsString); } - // Log ME status to SEL V7 = sub_640 (); + // Log ME status to SEL V7 = MeStatusIpmiSelLogging (); if (V7 < 0) - sub_F64 (0x80000000LL, + DebugPrint (0x80000000LL, "InstallSmbiosType11Structure: LogMEStatusInfotoSel status: %r\n", V7); // Update SMBIOS Type 11 table Type = 11; // SMBIOS OEM Strings Handle = -2; @@ -473,7 +473,7 @@ N2 = 3; V9 = gSmbios->UpdateString (gSmbios, &Handle, &N2, SpsString); if (V9 < 0) - sub_F64 (0x80000000LL, + DebugPrint (0x80000000LL, "%a: UpdateHiiStringToSmbios - type: %d, status: %r\n", "InstallSmbiosType11Structure", Type, @@ -481,23 +481,23 @@ } else { - sub_F64 (0x80000000LL, + DebugPrint (0x80000000LL, "%a: Get next table - type: %d, status: %r\n", "InstallSmbiosType11Structure", Type, V8); } - return sub_F64 (-1, "UpdateSmbiosType11Structure Exiting......\n"); + return DebugPrint (-1, "UpdateSmbiosType11Structure Exiting......\n"); } return Status; } // =========================================================================== -// Unicode String Length (sub_C00) +// Unicode String Length (UnicodeStringLength) // =========================================================================== -UINTN EFIAPI sub_C00 ( +UINTN EFIAPI UnicodeStringLength ( IN CONST CHAR16 *String ) { @@ -506,13 +506,13 @@ Ptr = String; if (!String) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 172, (__int64)"String != ((void *) 0)"); if (((UINTN)Ptr & 1) != 0) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 173, (__int64)"((UINTN) String & 0x00000001) == 0"); @@ -521,7 +521,7 @@ while (*Ptr) { if (Length >= 0xF4240) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 181, (__int64)"Length < _gPcd_FixedAtBuild_PcdMaximumUnicodeStringLength"); @@ -532,10 +532,10 @@ } // =========================================================================== -// Unicode-to-ASCII Conversion (sub_C94) +// Unicode-to-ASCII Conversion (UnicodeToAscii) // =========================================================================== -CHAR8 *EFIAPI sub_C94 ( +CHAR8 *EFIAPI UnicodeToAscii ( OUT CHAR8 *Destination, IN CONST CHAR16 *Source ) @@ -545,25 +545,25 @@ Dst = Destination; if (!Destination) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 900, (__int64)"Destination != ((void *) 0)"); - if (2 *sub_C00 (Source) == (UINTN)-2) - sub_FEC ( + if (2 *UnicodeStringLength (Source) == (UINTN)-2) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 906, (__int64)"StrSize (Source) != 0"); - // Check for overlap if (Dst - (CHAR8 *)Source < 2 *sub_C00 (Source) + 2) - sub_FEC ( + // Check for overlap if (Dst - (CHAR8 *)Source < 2 *UnicodeStringLength (Source) + 2) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 911, (__int64)"(UINTN) (Destination - (CHAR8 *) Source) >= StrSize (Source)"); - if ((CHAR8 *)Source - Dst <= sub_C00 (Source)) - sub_FEC ( + if ((CHAR8 *)Source - Dst <= UnicodeStringLength (Source)) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 912, (__int64)"(UINTN) ((CHAR8 *) Source - Destination) > StrLen (Source)"); @@ -572,7 +572,7 @@ while (*Source) { if (*Source >= 0x100) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 921, (__int64)"*Source < 0x100"); @@ -581,8 +581,8 @@ } *Dst = '\0'; - if (sub_E78 (Ret) == (UINTN)-1) - sub_FEC ( + if (AsciiStringLength (Ret) == (UINTN)-1) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 931, (__int64)"AsciiStrSize (ReturnValue) != 0"); @@ -591,10 +591,10 @@ } // =========================================================================== -// Copy "INVALID" string (sub_DD0) +// Copy "INVALID" string (CopyInvalidString) // =========================================================================== -CHAR8 *EFIAPI sub_DD0 ( +CHAR8 *EFIAPI CopyInvalidString ( OUT CHAR8 *Destination ) { @@ -606,19 +606,19 @@ Dst = Destination; if (!Destination) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 971, (__int64)"Destination != ((void *) 0)"); - // Check overlap conditions if (Dst - Src <= sub_E78 (Src)) - sub_FEC ( + // Check overlap conditions if (Dst - Src <= AsciiStringLength (Src)) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 976, (__int64)"(UINTN)(Destination - Source) > AsciiStrLen (Source)"); - if (Src - Dst <= sub_E78 (Src)) - sub_FEC ( + if (Src - Dst <= AsciiStringLength (Src)) + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 977, (__int64)"(UINTN)(Source - Destination) > AsciiStrLen (Source)"); @@ -637,10 +637,10 @@ } // =========================================================================== -// ASCII String Length (sub_E78) +// ASCII String Length (AsciiStringLength) // =========================================================================== -UINTN EFIAPI sub_E78 ( +UINTN EFIAPI AsciiStringLength ( IN CONST CHAR8 *String ) { @@ -649,7 +649,7 @@ Ptr = String; if (!String) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1082, (__int64)"String != ((void *) 0)"); @@ -657,7 +657,7 @@ for (Length = 0; *Ptr; Length++) { if (Length >= 0xF4240) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1090, (__int64)"Length < _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength"); @@ -667,10 +667,10 @@ } // =========================================================================== -// Debug Print Protocol (lazy init) (sub_EE4) +// Debug Print Protocol (lazy init) (DebugPrintProtocolLazyInit) // =========================================================================== -__int64 sub_EE4 ( +__int64 DebugPrintProtocolLazyInit ( void ) { @@ -705,10 +705,10 @@ } // =========================================================================== -// Debug Print (sub_F64) +// Debug Print (DebugPrint) // =========================================================================== -char sub_F64 ( +char DebugPrint ( __int64 a1, const char *Format, ... @@ -724,7 +724,7 @@ va_start (Va, Format); - DebugProtocol = sub_EE4 (); + DebugProtocol = DebugPrintProtocolLazyInit (); Mask = 0; PrintFn = (INTN (**)(__int64, const char *, __int64 *))DebugProtocol; @@ -757,10 +757,10 @@ } // =========================================================================== -// Debug Assert Handler (sub_FEC) +// Debug Assert Handler (AssertHandler) // =========================================================================== -__int64 sub_FEC ( +__int64 AssertHandler ( __int64 a1, __int64 a2, __int64 a3 @@ -768,58 +768,58 @@ { __int64 Result; - Result = sub_EE4 (); + Result = DebugPrintProtocolLazyInit (); if (Result) return (*(INTN (**)(__int64, __int64, __int64))(Result + 8))(a1, a2, a3); return Result; } // =========================================================================== -// ZeroMem (sub_102C) +// ZeroMem (ZeroMem) // =========================================================================== -__int64 sub_102C ( +__int64 ZeroMem ( __int64 Buffer, UINTN Size ) { if (!Buffer) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\ZeroMemWrapper.c", 53, (__int64)"Buffer != ((void *) 0)"); if (Size > (UINTN)-Buffer) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseMemoryLibRepStr\\ZeroMemWrapper.c", 54, (__int64)"Length <= (0xFFFFFFFFFFFFFFFFULL - (UINTN)Buffer + 1)"); - sub_2A0 ((char *)Buffer, Size); + SimpleMemset ((char *)Buffer, Size); return 0; } // =========================================================================== -// GUID Compare (sub_1090) +// GUID Compare (CompareGuid) // =========================================================================== -BOOLEAN sub_1090 ( +BOOLEAN CompareGuid ( __int64 a1, __int64 a2 ) { - UINT64 V1 = sub_1AD8 (a1); - UINT64 V2 = sub_1AD8 (a2); - UINT64 V3 = sub_1AD8 (a1 + 8); - UINT64 V4 = sub_1AD8 (a2 + 8); + UINT64 V1 = ReadUnaligned64 (a1); + UINT64 V2 = ReadUnaligned64 (a2); + UINT64 V3 = ReadUnaligned64 (a1 + 8); + UINT64 V4 = ReadUnaligned64 (a2 + 8); return (V1 == V2) && (V3 == V4); } // =========================================================================== -// PCD Protocol Lookup (lazy init) (sub_10F8) +// PCD Protocol Lookup (lazy init) (PcdProtocolLookupLazyInit) // =========================================================================== -PCD_PROTOCOL *sub_10F8 ( +PCD_PROTOCOL *PcdProtocolLookupLazyInit ( void ) { @@ -835,8 +835,8 @@ (VOID **)&mPcd); if (Status < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 78, (__int64)"!EFI_ERROR (Status)"); @@ -844,7 +844,7 @@ Result = mPcd; if (!mPcd) { - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxePcdLib\\DxePcdLib.c", 79, (__int64)"mPcd != ((void *) 0)"); @@ -855,10 +855,10 @@ } // =========================================================================== -// Configuration Table Lookup by GUID (sub_1184) +// Configuration Table Lookup by GUID (GetConfigurationTableByGuid) // =========================================================================== -EFI_STATUS sub_1184 ( +EFI_STATUS GetConfigurationTableByGuid ( IN EFI_GUID *TableGuid, OUT VOID **Table ) @@ -867,13 +867,13 @@ EFI_GUID *EntryGuid; if (!TableGuid) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiLib\\UefiLib.c", 97, (__int64)"TableGuid != ((void *) 0)"); if (!Table) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\UefiLib\\UefiLib.c", 98, (__int64)"Table != ((void *) 0)"); @@ -884,7 +884,7 @@ return EFI_NOT_FOUND; for (Index = 0; - !sub_1090 ( + !CompareGuid ( (__int64)TableGuid, (__int64)&SystemTable->ConfigurationTable[Index].VendorGuid); Index++) @@ -898,10 +898,10 @@ } // =========================================================================== -// MMIO PCI Read (sub_1248) +// MMIO PCI Read (MmioRead32) // =========================================================================== -UINT32 sub_1248 ( +UINT32 MmioRead32 ( void ) { @@ -914,10 +914,10 @@ } // =========================================================================== -// HOB List Initialization (sub_1278) +// HOB List Initialization (InitializeHobList) // =========================================================================== -__int64 sub_1278 ( +__int64 InitializeHobList ( void ) { @@ -927,11 +927,11 @@ Result = (__int64)mHobList; if (!mHobList) { - Status = sub_1184 (&gEfiHobListGuid, &mHobList); + Status = GetConfigurationTableByGuid (&gEfiHobListGuid, &mHobList); if (Status < 0) { - sub_F64 (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); - sub_FEC ( + DebugPrint (0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", Status); + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxeHobLib\\HobLib.c", 54, (__int64)"!EFI_ERROR (Status)"); @@ -939,7 +939,7 @@ Result = (__int64)mHobList; if (!mHobList) { - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxeHobLib\\HobLib.c", 55, (__int64)"mHobList != ((void *) 0)"); @@ -950,10 +950,10 @@ } // =========================================================================== -// Find Resource Descriptor HOB (sub_12FC) +// Find Resource Descriptor HOB (FindResourceDescriptorHob) // =========================================================================== -_WORD *sub_12FC ( +_WORD *FindResourceDescriptorHob ( __int64 a1, _WORD *Hob ) @@ -962,7 +962,7 @@ HobPtr = Hob; if (!Hob) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\DxeHobLib\\HobLib.c", 108, (__int64)"HobStart != ((void *) 0)"); @@ -979,10 +979,10 @@ } // =========================================================================== -// Integer to ASCII (sub_134C) +// Integer to ASCII (IntegerToAscii) // =========================================================================== -_BYTE *sub_134C ( +_BYTE *IntegerToAscii ( __int64 Value, _BYTE *Buffer, int Radix, @@ -1032,10 +1032,10 @@ } // =========================================================================== -// ASCII String to Integer (sub_13C0) +// ASCII String to Integer (AsciiToInteger) // =========================================================================== -__int64 sub_13C0 ( +__int64 AsciiToInteger ( char *String, char **EndPtr ) @@ -1114,10 +1114,10 @@ } // =========================================================================== -// EFI Status Code to String (sub_1498) +// EFI Status Code to String (EfiStatusToString) // =========================================================================== -const char *sub_1498 ( +const char *EfiStatusToString ( __int64 Status ) { @@ -1167,10 +1167,10 @@ } // =========================================================================== -// Unicode SPrint wrapper (sub_1560) +// Unicode SPrint wrapper (UnicodeSPrintWrapper) // =========================================================================== -UINTN sub_1560 ( +UINTN UnicodeSPrintWrapper ( __int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, @@ -1181,16 +1181,16 @@ va_list Va; va_start (Va, Format); - Result = sub_1588 (Buffer, BufferSize, Format, (__int64)Va); + Result = UnicodeVSPrint (Buffer, BufferSize, Format, (__int64)Va); va_end (Va); return Result; } // =========================================================================== -// Core Unicode VSPrint (sub_1588) +// Core Unicode VSPrint (UnicodeVSPrint) // =========================================================================== -INTN sub_1588 ( +INTN UnicodeVSPrint ( __int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, @@ -1297,7 +1297,7 @@ default: { - INTN Parsed = sub_13C0 ((char *)Fmt, (char **)&Fmt); + INTN Parsed = AsciiToInteger ((char *)Fmt, (char **)&Fmt); Width = (UINT32)Parsed; } ArgPtr = (__int64 *)Fmt; @@ -1323,7 +1323,7 @@ ArgPtr++; ArgU32 = (UINT32 *)ArgPtr[1]; - Count = sub_1A00 ( + Count = UnicodeSPrintVaList ( Buf, SavedBufSize, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", @@ -1357,10 +1357,10 @@ if (*Fmt == 'r') { ArgPtr++; - const char *StatusStr = sub_1498 (ArgPtr[1]); + const char *StatusStr = EfiStatusToString (ArgPtr[1]); if (StatusStr) - Count = sub_1A00 (Buf, SavedBufSize, L"%S", StatusStr); - else Count = sub_1A00 (Buf, SavedBufSize, L"%S(%X)", "Status Code", ArgPtr[1] >> 32); + Count = UnicodeSPrintVaList (Buf, SavedBufSize, L"%S", StatusStr); + else Count = UnicodeSPrintVaList (Buf, SavedBufSize, L"%S(%X)", "Status Code", ArgPtr[1] >> 32); Buf += Count; SavedBufSize -= Count; goto ContinueFmt; @@ -1391,11 +1391,11 @@ // 64-bit value _BYTE *DigitP; if (LongArg == 'p') { - // pointer DigitP = sub_134C (ArgPtr[1], DigitBuf2, Radix, 0); + // pointer DigitP = IntegerToAscii (ArgPtr[1], DigitBuf2, Radix, 0); } else { - DigitP = sub_134C (ArgPtr[1], DigitBuf2, Radix, 1); + DigitP = IntegerToAscii (ArgPtr[1], DigitBuf2, Radix, 1); } for (DigitEnd = DigitStr; DigitP >= DigitBuf2; DigitP--) *DigitEnd++ = (CHAR16)*DigitP; @@ -1404,8 +1404,8 @@ { // 32-bit value _BYTE *DigitP; if (LongArg == 'p') - DigitP = sub_134C (*(INT32 *)ArgPtr, DigitBuf, Radix, 0); - else DigitP = sub_134C (*(INT32 *)ArgPtr, DigitBuf, Radix, 0); + DigitP = IntegerToAscii (*(INT32 *)ArgPtr, DigitBuf, Radix, 0); + else DigitP = IntegerToAscii (*(INT32 *)ArgPtr, DigitBuf, Radix, 0); for (DigitEnd = DigitStr; DigitP >= DigitBuf; DigitP--) *DigitEnd++ = (CHAR16)*DigitP; } @@ -1458,10 +1458,10 @@ } // =========================================================================== -// Unicode SPrint (va_list) (sub_1A00) +// Unicode SPrint (va_list) (UnicodeSPrintVaList) // =========================================================================== -UINTN sub_1A00 ( +UINTN UnicodeSPrintVaList ( __int16 *Buffer, __int64 BufferSize, CONST CHAR16 *Format, @@ -1472,16 +1472,16 @@ va_list Va; va_start (Va, Format); - Result = sub_1588 (Buffer, BufferSize, Format, (__int64)Va); + Result = UnicodeVSPrint (Buffer, BufferSize, Format, (__int64)Va); va_end (Va); return Result; } // =========================================================================== -// Get ME Firmware Status from HOB (sub_1A20) +// Get ME Firmware Status from HOB (GetMeFirmwareStatusFromHob) // =========================================================================== -UINT32 sub_1A20 ( +UINT32 GetMeFirmwareStatusFromHob ( UINT32 DefaultFs1 ) { @@ -1491,8 +1491,8 @@ EFI_GUID *Guid; Fs1 = (UINT32)-1; - Hob = (_WORD *)sub_1278 (); - MeHob = sub_12FC (0, Hob); + Hob = (_WORD *)InitializeHobList (); + MeHob = FindResourceDescriptorHob (0, Hob); if (!MeHob) goto NotFound; @@ -1500,9 +1500,9 @@ do { Guid = (EFI_GUID *)(MeHob + 4); - if (sub_1090 ((__int64)&gEfiMeFwHobGuid, (__int64)Guid)) + if (CompareGuid ((__int64)&gEfiMeFwHobGuid, (__int64)Guid)) break; - MeHob = sub_12FC (0, (_WORD *)((UINT8 *)MeHob + MeHob[1])); + MeHob = FindResourceDescriptorHob (0, (_WORD *)((UINT8 *)MeHob + MeHob[1])); } while (MeHob); @@ -1511,7 +1511,7 @@ if (((UINT32 *)MeHob)[7] != 0) { - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\PurleySktPkg\\Me\\Heci\\Library\\MeTypeLib\\MeTypeLib.c", 67, (__int64)"MeFwHob->Group[0].FunNumber == HECI1_DEVICE"); @@ -1524,24 +1524,24 @@ if (Fs1 != (UINT32)-1) { NotFound: - sub_F64 (0x80000000LL, "HECI: GetMeFs1FromHob() Can't read correctly MeFwHob info\n"); + DebugPrint (0x80000000LL, "HECI: GetMeFs1FromHob() Can't read correctly MeFwHob info\n"); Fs1 = DefaultFs1; } - sub_F64 (64, "HECI: GetMeFs1FromHob() returns MEFS1 = %d\n", Fs1); + DebugPrint (64, "HECI: GetMeFs1FromHob() returns MEFS1 = %d\n", Fs1); return Fs1; } // =========================================================================== -// Unaligned Read 8 bytes (sub_1AD8) +// Unaligned Read 8 bytes (ReadUnaligned64) // =========================================================================== -UINT64 sub_1AD8 ( +UINT64 ReadUnaligned64 ( __int64 a1 ) { if (!a1) - sub_FEC ( + AssertHandler ( (__int64)"e:\\hs\\MdePkg\\Library\\BaseLib\\Unaligned.c", 192, (__int64)"Buffer != ((void *) 0)"); @@ -1549,10 +1549,10 @@ } // =========================================================================== -// CPUID Wrapper (sub_1B10) +// CPUID Wrapper (CpuIdWrapper) // =========================================================================== -UINT32 sub_1B10 ( +UINT32 CpuIdWrapper ( UINT32 EaxIn, UINT32 *EaxOut, UINT32 *EbxOut, @@ -1573,23 +1573,23 @@ } // =========================================================================== -// ZeroMem (sub_1B50) - jump to sub_1B5E +// ZeroMem (ZeroMemAlignedWriter) - jump to Memset // =========================================================================== -void sub_1B50 ( +void ZeroMemAlignedWriter ( __int64 Buffer, __int64 Value, int Size ) { - sub_1B5E ((int *)Buffer, (UINTN)Size, (unsigned int)Value); + Memset ((int *)Buffer, (UINTN)Size, (unsigned int)Value); } // =========================================================================== -// memset (sub_1B5E) +// memset (Memset) // =========================================================================== -int *sub_1B5E ( +int *Memset ( int *Buffer, UINTN Size, unsigned int Value @@ -1625,10 +1625,10 @@ } // =========================================================================== -// memcpy (sub_1BB0) +// memcpy (Memcpy) // =========================================================================== -char *sub_1BB0 ( +char *Memcpy ( char *Dst, const char *Src, UINTN Size @@ -1707,10 +1707,10 @@ } // =========================================================================== -// Simple memset (sub_2A0) +// Simple memset (SimpleMemset) // =========================================================================== -char *sub_2A0 ( +char *SimpleMemset ( char *Buf, UINTN Size ) @@ -1718,4 +1718,4 @@ memset (Buf, 0, 8 * (Size >> 3)); memset (&Buf[8 * (Size >> 3)], 0, Size & 7); return Buf; -} \ No newline at end of file +} diff --git a/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.h b/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.h index c601315..ef028d2 100644 --- a/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.h +++ b/LenovoServerPkg/SmbiosType11/SmbiosType11/SmbiosType11.h @@ -75,19 +75,19 @@ EFI_STATUS EFIAPI -Initialization (sub_384)( +DriverInitialization( VOID ); EFI_STATUS EFIAPI -Type 11 Support Install (sub_550)( +SmbiosType11SupportInstall( VOID ); EFI_STATUS EFIAPI -Status IPMI SEL Logging (sub_640)( +MeStatusIpmiSelLogging( VOID ); @@ -123,7 +123,7 @@ EFI_STATUS EFIAPI -SMBIOS Type 11 Installer (sub_954)( +SmbiosType11Installer( VOID ); @@ -165,7 +165,7 @@ EFI_STATUS EFIAPI -String Length (sub_C00)( +UnicodeStringLength( VOID ); @@ -177,7 +177,7 @@ EFI_STATUS EFIAPI -"INVALID" string (sub_DD0)( +"INVALID" string (CopyInvalidString)( VOID ); @@ -189,19 +189,19 @@ EFI_STATUS EFIAPI -String Length (sub_E78)( +AsciiStringLength( VOID ); EFI_STATUS EFIAPI -Print Protocol (lazy init) (sub_EE4)( +DebugPrintProtocolLazyInit( VOID ); EFI_STATUS EFIAPI -Print (sub_F64)( +DebugPrint( VOID ); @@ -213,37 +213,37 @@ EFI_STATUS EFIAPI -Assert Handler (sub_FEC)( +AssertHandler( VOID ); EFI_STATUS EFIAPI -(sub_102C)( +ZeroMem( VOID ); EFI_STATUS EFIAPI -Compare (sub_1090)( +CompareGuid( VOID ); EFI_STATUS EFIAPI -Protocol Lookup (lazy init) (sub_10F8)( +PcdProtocolLookupLazyInit( VOID ); EFI_STATUS EFIAPI -Table Lookup by GUID (sub_1184)( +GetConfigurationTableByGuid( VOID ); EFI_STATUS EFIAPI -PCI Read (sub_1248)( +MmioRead32( VOID ); @@ -261,13 +261,13 @@ EFI_STATUS EFIAPI -List Initialization (sub_1278)( +InitializeHobList( VOID ); EFI_STATUS EFIAPI -Resource Descriptor HOB (sub_12FC)( +FindResourceDescriptorHob( VOID ); @@ -291,13 +291,13 @@ EFI_STATUS EFIAPI -to ASCII (sub_134C)( +IntegerToAscii( VOID ); EFI_STATUS EFIAPI -String to Integer (sub_13C0)( +AsciiToInteger( VOID ); @@ -315,7 +315,7 @@ EFI_STATUS EFIAPI -Status Code to String (sub_1498)( +EfiStatusToString( VOID ); @@ -333,13 +333,13 @@ EFI_STATUS EFIAPI -SPrint wrapper (sub_1560)( +UnicodeSPrintWrapper( VOID ); EFI_STATUS EFIAPI -Unicode VSPrint (sub_1588)( +UnicodeVSPrint( VOID ); @@ -375,7 +375,7 @@ EFI_STATUS EFIAPI -DigitP = sub_134C (ArgPtr[1], DigitBuf2, Radix, 0);( +DigitP = IntegerToAscii (ArgPtr[1], DigitBuf2, Radix, 0);( VOID ); @@ -399,37 +399,37 @@ EFI_STATUS EFIAPI -SPrint (va_list) (sub_1A00)( +UnicodeSPrintVaList( VOID ); EFI_STATUS EFIAPI -ME Firmware Status from HOB (sub_1A20)( +GetMeFirmwareStatusFromHob( VOID ); EFI_STATUS EFIAPI -Read 8 bytes (sub_1AD8)( +ReadUnaligned64( VOID ); EFI_STATUS EFIAPI -Wrapper (sub_1B10)( +CpuIdWrapper( VOID ); EFI_STATUS EFIAPI -(sub_1B50) - jump to sub_1B5E( +ZeroMemAlignedWriter( VOID ); EFI_STATUS EFIAPI -(sub_1B5E)( +Memset( VOID ); @@ -441,7 +441,7 @@ EFI_STATUS EFIAPI -(sub_1BB0)( +Memcpy( VOID ); @@ -471,8 +471,8 @@ EFI_STATUS EFIAPI -memset (sub_2A0)( +SimpleMemset( VOID ); -#endif /* __SMBIOSTYPE11_H__ */ \ No newline at end of file +#endif /* __SMBIOSTYPE11_H__ */ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/AsciiStrCopyS.c b/LenovoServerPkg/SystemInventory/SystemInventory/AsciiStrCopyS.c index 4d9d8ef..9013239 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/AsciiStrCopyS.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/AsciiStrCopyS.c @@ -1,30 +1,30 @@ -_BYTE *__fastcall AsciiStrCopyS(_BYTE *p_n145_1, _BYTE *a2, unsigned __int64 n62) +CHAR8 *__fastcall AsciiStrCpyS(CHAR8 *Destination, CHAR8 *Source, UINTN Length) { - unsigned __int64 n62_1; // rdi - _BYTE *p_n145; // rbx - _BYTE *p_n145_2; // rbp + UINTN Length_1; // rdi + CHAR8 *Destination_1; // rbx + CHAR8 *Destination_2; // rbp - n62_1 = n62; /*0x8ec*/ - p_n145 = p_n145_1; /*0x8f2*/ - if ( !n62 ) /*0x8f8*/ - return p_n145_1; /*0x8fa*/ - if ( !p_n145_1 ) /*0x915*/ + Length_1 = Length; /*0x8ec*/ + Destination_1 = Destination; /*0x8f2*/ + if ( !Length ) /*0x8f8*/ + return Destination; /*0x8fa*/ + if ( !Destination ) /*0x915*/ sub_788("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1033, "Destination != ((void *) 0)"); /*0x926*/ - if ( p_n145 - a2 <= (unsigned __int64)sub_9F0(a2) ) /*0x945*/ + if ( Destination_1 - Source <= (unsigned __int64)sub_9F0(Source) ) /*0x945*/ sub_788("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1038, "(UINTN)(Destination - Source) > AsciiStrLen (Source)"); /*0x956*/ - if ( a2 - p_n145 < n62_1 ) /*0x96d*/ + if ( Source - Destination_1 < Length_1 ) /*0x96d*/ sub_788("e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1039, "(UINTN)(Source - Destination) >= Length"); /*0x97e*/ - if ( n62_1 > 0xF4240 ) /*0x999*/ + if ( Length_1 > 0xF4240 ) /*0x999*/ sub_788( /*0x9aa*/ "e:\\hs\\MdePkg\\Library\\BaseLib\\String.c", 1042, "Length <= _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength"); - p_n145_2 = p_n145; /*0x9af*/ - while ( *a2 && n62_1 ) /*0x9b7*/ + Destination_2 = Destination_1; /*0x9af*/ + while ( *Source && Length_1 ) /*0x9b7*/ { - *p_n145++ = *a2++; /*0x9b9*/ - --n62_1; /*0x9c1*/ + *Destination_1++ = *Source++; /*0x9b9*/ + --Length_1; /*0x9c1*/ } - sub_63C(p_n145, n62_1); /*0x9d0*/ - return p_n145_2; /*0x9e7*/ + ZeroMem(Destination_1, Length_1); /*0x9d0*/ + return Destination_2; /*0x9e7*/ } diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/CheckDeviceVpd.c b/LenovoServerPkg/SystemInventory/SystemInventory/CheckDeviceVpd.c index f167f1e..aad6c5b 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/CheckDeviceVpd.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/CheckDeviceVpd.c @@ -59,10 +59,10 @@ 2); if ( v9 < 0 ) { - if ( (unsigned __int8)sub_7F8(v8, v7, v10, v11) ) + if ( (unsigned __int8)DebugTraceEnabled(v8, v7, v10, v11) ) { - if ( (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: OpenProtocol failed. %r\n", v9); + if ( (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: OpenProtocol failed. %r\n", v9); } return 0x8000000000000003uLL; /*0x2f52*/ } @@ -74,8 +74,8 @@ v17 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD, __int64, _BYTE *))(v46 + 48))(v46, 2, v14, 2, v47); /*0x2f83*/ if ( v17 < 0 ) { - if ( (unsigned __int8)sub_7F8(v16, v15, v18, v19) && (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: Error reading capabilities - CapabilitiesPtr = %x, code=%r\n", v14, v17); + if ( (unsigned __int8)DebugTraceEnabled(v16, v15, v18, v19) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: Error reading capabilities - CapabilitiesPtr = %x, code=%r\n", v14, v17); return v17; /*0x3470*/ } if ( v47[0] == 3 ) /*0x2f94*/ @@ -84,8 +84,8 @@ n0x40 = v13++; /*0x2f9c*/ if ( n0x40 > 0x40 ) { - if ( (unsigned __int8)sub_7F8(v16, v15, v18, v19) && (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: Impossible number of capabilities. CapabilitiesPtr = %x%d\n", v12, v21); + if ( (unsigned __int8)DebugTraceEnabled(v16, v15, v18, v19) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: Impossible number of capabilities. CapabilitiesPtr = %x%d\n", v12, v21); v12 = 0; /*0x2fce*/ } if ( !v12 ) /*0x2fd4*/ @@ -93,8 +93,8 @@ } if ( !v14 ) /*0x2fdf*/ return v45; /*0x2fdf*/ - if ( (unsigned __int8)sub_7F8(v16, v15, v18, v19) && (unsigned __int8)sub_804(64) ) - sub_740( + if ( (unsigned __int8)DebugTraceEnabled(v16, v15, v18, v19) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint( 64, "CheckDeviceVpd: Found capabilities %4.4x %4.4x bus=%d,dev=%d,fun=%d,cl=%d.%d.%d, VpdReg=%x\n", *(unsigned __int16 *)(a1 + 24), @@ -114,7 +114,7 @@ v25 = sub_5A7C((unsigned int)&n145, v22, 4, v46, v14); /*0x308a*/ if ( v25 < 0 ) { - if ( (unsigned __int8)sub_7F8(v24, v23, v26, v27) && (unsigned __int8)sub_804(64) ) + if ( (unsigned __int8)DebugTraceEnabled(v24, v23, v26, v27) && (unsigned __int8)DebugLevelEnabled(64) ) sub_740(64, "CheckDeviceVpd: Error reading PciVpd - code = %r\n", v25); return v45; /*0x343a*/ } @@ -143,7 +143,7 @@ { n2_1 = n4_3; /*0x3378*/ LABEL_72: - sub_740(64, "CheckDeviceVpd: Invalid length of %hd found. Done.\n", n2_1); + DebugPrint(64, "CheckDeviceVpd: Invalid length of %hd found. Done.\n", n2_1); return v45; /*0x338b*/ } return v45; /*0x3372*/ @@ -160,22 +160,22 @@ v36 = (unsigned int)n145 - 144; /*0x3111*/ if ( n145 == 144 ) { - if ( (unsigned __int8)sub_7F8(v36, v23, v26, v27) && (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: Processing R/O region\n"); + if ( (unsigned __int8)DebugTraceEnabled(v36, v23, v26, v27) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: Processing R/O region\n"); } else if ( n145 != 145 ) { - if ( (unsigned __int8)sub_7F8(v36, v23, v26, v27) && (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: type 0x%x resource found\n", n145_1); + if ( (unsigned __int8)DebugTraceEnabled(v36, v23, v26, v27) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: type 0x%x resource found\n", n145_1); goto LABEL_61; /*0x314a*/ } - if ( (unsigned __int8)sub_7F8(v36, v23, v26, v27) && (unsigned __int8)sub_804(64) ) - sub_740(64, "CheckDeviceVpd: Large Resource Tag type %2.2x found, length = %d\n", n145_1, n4_3); + if ( (unsigned __int8)DebugTraceEnabled(v36, v23, v26, v27) && (unsigned __int8)DebugLevelEnabled(64) ) + DebugPrint(64, "CheckDeviceVpd: Large Resource Tag type %2.2x found, length = %d\n", n145_1, n4_3); v35 = 1; /*0x31a5*/ if ( (unsigned __int8)(a2 + 112) <= 1u && n4_1 > 0x10u ) { n4_2 = n4_1; /*0x31be*/ - p_n145 = sub_1D24(n4_1); /*0x31c3*/ + p_n145 = AllocatePool(n4_1); /*0x31c3*/ p_n145_2 = p_n145; /*0x31c8*/ if ( !p_n145 ) { @@ -192,13 +192,13 @@ } LABEL_61: if ( p_n145_2 ) /*0x32f4*/ - sub_1D54(p_n145_2); /*0x32f9*/ + FreePool(p_n145_2); /*0x32f9*/ goto LABEL_63; /*0x32f9*/ } if ( a2 != -126 ) /*0x3256*/ goto LABEL_61; /*0x3256*/ n4_2 = n4_1; /*0x325c*/ - p_n145_1 = sub_1D2C(n4_1 + 1LL); /*0x3263*/ + p_n145_1 = AllocatePool(n4_1 + 1LL); /*0x3263*/ p_n145_2 = p_n145_1; /*0x3268*/ if ( p_n145_1 ) { diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/CheckVpdAndUpdateToBmc.c b/LenovoServerPkg/SystemInventory/SystemInventory/CheckVpdAndUpdateToBmc.c index 452d12e..35e1d79 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/CheckVpdAndUpdateToBmc.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/CheckVpdAndUpdateToBmc.c @@ -60,7 +60,7 @@ v6 = a2; /*0x34b8*/ v7 = a1; /*0x34bb*/ v8 = a4; /*0x34ca*/ - sub_65B0(v58, 0, 0x10000); /*0x34cd*/ + ZeroMem(v58, 0x10000); /*0x34cd*/ v9 = 0; /*0x34ef*/ v10 = (*(__int64 (__fastcall **)(void *, _QWORD, __int64 *))(qword_96A8 + 320))(&unk_9460, 0, &qword_9690); /*0x34f2*/ if ( v10 >= 0 ) @@ -78,7 +78,7 @@ { do { - sub_63C(v50, 140); /*0x35aa*/ + ZeroMem(v50, 140); /*0x35aa*/ v57 = 1; /*0x35c7*/ v13 = (*(__int64 (__fastcall **)(_QWORD, void *, __int64 *, _QWORD, _QWORD, int))(qword_96A8 + 280))( /*0x35e5*/ *(_QWORD *)(v47 + 8 * v9), @@ -126,7 +126,7 @@ } if ( (unsigned __int8)sub_7F8() && (unsigned __int8)sub_804(0x80000000LL) ) /*0x37d3*/ sub_740(0x80000000LL, "\n"); /*0x37e6*/ - v20 = (_BYTE *)sub_1D2C((unsigned __int8)(n0xFF + 5)); /*0x37f7*/ + v20 = (_BYTE *)AllocatePool((unsigned __int8)(n0xFF + 5)); /*0x37f7*/ n0xFF_2 = n0xFF; /*0x37fa*/ *v20 = 11; /*0x3806*/ v20[1] = v8; /*0x3809*/ @@ -192,7 +192,7 @@ i_8 = i_7; /*0x399b*/ v30 = v58[i_7 + 2] + 5; /*0x39a6*/ v31 = (unsigned int)i_7 + 2; /*0x39aa*/ - v32 = sub_1D2C(v30); /*0x39b5*/ + v32 = AllocatePool(v30); /*0x39b5*/ *(_BYTE *)v32 = 11; /*0x39bb*/ *(_BYTE *)(v32 + 1) = a4; /*0x39c4*/ *(_WORD *)(v32 + 2) = 20048; /*0x39cc*/ @@ -245,7 +245,7 @@ { v38 = v58[i + 2] + 5; /*0x3b28*/ v39 = (unsigned int)i + 2; /*0x3b2c*/ - v40 = sub_1D2C(v38); /*0x3b3c*/ + v40 = AllocatePool(v38); /*0x3b3c*/ *(_BYTE *)v40 = 11; /*0x3b43*/ *(_BYTE *)(v40 + 1) = v8; /*0x3b46*/ *(_WORD *)(v40 + 2) = 20051; /*0x3b4a*/ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/InitializeStorageInventory.c b/LenovoServerPkg/SystemInventory/SystemInventory/InitializeStorageInventory.c index 15915d9..863b07b 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/InitializeStorageInventory.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/InitializeStorageInventory.c @@ -230,7 +230,7 @@ if ( n0x40 <= 0x40 ) /*0x46a3*/ sub_814(v28, v27); /*0x46b2*/ else - AsciiStrCopyS(v28, v27, 62); /*0x46ab*/ + AsciiStrCpyS(v28, v27, 62); /*0x46ab*/ sub_2720(v24 + qword_9680 + 2353, 64); /*0x46cf*/ sub_275C(v24 + qword_9680 + 2353, 64); /*0x46e7*/ if ( (unsigned __int8)sub_7F8() && (unsigned __int8)sub_804(64) ) /*0x46f7*/ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/InitializeSystemInventory.c b/LenovoServerPkg/SystemInventory/SystemInventory/InitializeSystemInventory.c index 15a790b..305a6ed 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/InitializeSystemInventory.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/InitializeSystemInventory.c @@ -35,8 +35,8 @@ v4 = sub_4B8(); /*0x2c94*/ if ( (unsigned __int8)sub_7EC() && v4 < 0 ) /*0x2cbd*/ { - if ( (unsigned __int8)sub_7F8(v6, v5, v7, v8) && (unsigned __int8)sub_804(0x80000000LL) ) /*0x2cca*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v4); /*0x2cdb*/ + if ( (unsigned __int8)DebugTraceEnabled(v6, v5, v7, v8) && (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2cca*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v4); /*0x2cdb*/ sub_788( /*0x2ceb*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", 306, @@ -45,8 +45,8 @@ v9 = sub_554(ImageHandle, SystemTable); /*0x2cfb*/ if ( (unsigned __int8)sub_7EC() && v9 < 0 ) /*0x2d0a*/ { - if ( (unsigned __int8)sub_7F8(v11, v10, v12, v13) && (unsigned __int8)sub_804(0x80000000LL) ) /*0x2d18*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v9); /*0x2d2a*/ + if ( (unsigned __int8)DebugTraceEnabled(v11, v10, v12, v13) && (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2d18*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v9); /*0x2d2a*/ sub_788( /*0x2d3a*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", 309, @@ -55,8 +55,8 @@ v14 = sub_1F4C(ImageHandle, SystemTable); /*0x2d4a*/ if ( (unsigned __int8)sub_7EC() && v14 < 0 ) /*0x2d59*/ { - if ( (unsigned __int8)sub_7F8(v16, v15, v17, v18) && (unsigned __int8)sub_804(0x80000000LL) ) /*0x2d67*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); /*0x2d79*/ + if ( (unsigned __int8)DebugTraceEnabled(v16, v15, v17, v18) && (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2d67*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v14); /*0x2d79*/ sub_788( /*0x2d89*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", 312, @@ -65,8 +65,8 @@ v19 = sub_247C(ImageHandle, SystemTable); /*0x2d99*/ if ( (unsigned __int8)sub_7EC() && v19 < 0 ) /*0x2da8*/ { - if ( (unsigned __int8)sub_7F8(v21, v20, v22, v23) && (unsigned __int8)sub_804(0x80000000LL) ) /*0x2db6*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v19); /*0x2dc8*/ + if ( (unsigned __int8)DebugTraceEnabled(v21, v20, v22, v23) && (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2db6*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v19); /*0x2dc8*/ sub_788( /*0x2dd8*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", 315, @@ -75,8 +75,8 @@ v24 = sub_248C(ImageHandle, SystemTable); /*0x2de8*/ if ( (unsigned __int8)sub_7EC() && v24 < 0 ) /*0x2df7*/ { - if ( (unsigned __int8)sub_7F8(v26, v25, v27, v28) && (unsigned __int8)sub_804(0x80000000LL) ) /*0x2e05*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v24); /*0x2e17*/ + if ( (unsigned __int8)DebugTraceEnabled(v26, v25, v27, v28) && (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2e05*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v24); /*0x2e17*/ sub_788( /*0x2e27*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", 318, @@ -86,10 +86,10 @@ result = sub_7EC(); /*0x2e3a*/ if ( (_BYTE)result && v29 < 0 ) /*0x2e46*/ { - if ( (unsigned __int8)sub_7F8(v32, v31, v33, v34) ) /*0x2e48*/ + if ( (unsigned __int8)DebugTraceEnabled(v32, v31, v33, v34) ) /*0x2e48*/ { - if ( (unsigned __int8)sub_804(0x80000000LL) ) /*0x2e54*/ - sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v29); /*0x2e66*/ + if ( (unsigned __int8)DebugLevelEnabled(0x80000000LL) ) /*0x2e54*/ + DebugPrint(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v29); /*0x2e66*/ } return sub_788( /*0x2e76*/ "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\LenovoServerPkg\\SystemInventory\\SystemInventory\\DEBUG\\AutoGen.c", diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/OnBmcUsbProtocolNotify.c b/LenovoServerPkg/SystemInventory/SystemInventory/OnBmcUsbProtocolNotify.c index ab96068..05c988e 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/OnBmcUsbProtocolNotify.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/OnBmcUsbProtocolNotify.c @@ -33,12 +33,12 @@ v6 = (*(__int64 (__fastcall **)(void *, _QWORD, __int64 *))(qword_96A8 + 320))(&unk_9460, 0, &qword_9690); /*0x3cc1*/ if ( v6 < 0 ) /*0x3cc7*/ { - result = sub_7F8(v5, a2, v7, a4); /*0x3cc9*/ + result = DebugTraceEnabled(v5, a2, v7, a4); /*0x3cc9*/ if ( (_BYTE)result ) /*0x3cd0*/ { - result = sub_804(64); /*0x3cdd*/ + result = DebugLevelEnabled(64); /*0x3cdd*/ if ( (_BYTE)result ) /*0x3ce4*/ - return sub_740(64, "[System Inventory] Locate gIpmiTransport Protocol fail. Status - %r\n", v6); /*0x3cf7*/ + return DebugPrint(64, "[System Inventory] Locate gIpmiTransport Protocol fail. Status - %r\n", v6); /*0x3cf7*/ } return result; /*0x3cf7*/ } @@ -58,14 +58,14 @@ v24[0]); if ( v11 < 0 || v25 == 1 ) /*0x3d42*/ { - if ( (unsigned __int8)sub_7F8(v10, v9, v12, v13) && (unsigned __int8)sub_804(64) ) /*0x3dcb*/ - sub_740(64, "[System Inventory] send gIpmiTransport Protocol Status - %r\n", v11); /*0x3de0*/ - result = sub_7F8(v20, v19, v21, v22); /*0x3de5*/ + if ( (unsigned __int8)DebugTraceEnabled(v10, v9, v12, v13) && (unsigned __int8)DebugLevelEnabled(64) ) /*0x3dcb*/ + DebugPrint(64, "[System Inventory] send gIpmiTransport Protocol Status - %r\n", v11); /*0x3de0*/ + result = DebugTraceEnabled(v20, v19, v21, v22); /*0x3de5*/ if ( (_BYTE)result ) /*0x3dec*/ { - result = sub_804(64); /*0x3df1*/ + result = DebugLevelEnabled(64); /*0x3df1*/ if ( (_BYTE)result ) /*0x3df8*/ - return sub_740(64, "[System Inventory] Check Current BMC virtual USB status - %x\n", v25); /*0x3e0a*/ + return DebugPrint(64, "[System Inventory] Check Current BMC virtual USB status - %x\n", v25); /*0x3e0a*/ } } else @@ -84,12 +84,12 @@ &v25, &v26); (*(void (__fastcall **)(__int64))(qword_96A8 + 248))(3000000); /*0x3d90*/ - result = sub_7F8(v16, v15, v17, v18); /*0x3d96*/ + result = DebugTraceEnabled(v16, v15, v17, v18); /*0x3d96*/ if ( (_BYTE)result ) /*0x3d9d*/ { - result = sub_804(64); /*0x3da6*/ + result = DebugLevelEnabled(64); /*0x3da6*/ if ( (_BYTE)result ) /*0x3dad*/ - return sub_740(64, "[System Inventory] Disabling BMC USB Interface Status - %r\n", v14); /*0x3db6*/ + return DebugPrint(64, "[System Inventory] Disabling BMC USB Interface Status - %r\n", v14); /*0x3db6*/ } } return result; /*0x3e14*/ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/OnIpmiDxeProtocolNotify.c b/LenovoServerPkg/SystemInventory/SystemInventory/OnIpmiDxeProtocolNotify.c index 57ca11c..1e1a1b6 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/OnIpmiDxeProtocolNotify.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/OnIpmiDxeProtocolNotify.c @@ -67,7 +67,7 @@ sub_740(0x80000000LL, "\nASSERT_EFI_ERROR (Status = %r)\n", v2); /*0x60a8*/ sub_788("e:\\hs\\LenovoServerPkg\\SystemInventory\\SystemInventory.c", 1972, "!EFI_ERROR (Status)"); /*0x60b8*/ } - sub_63C(p_n145, 3402); /*0x60c7*/ + ZeroMem(p_n145, 3402); /*0x60c7*/ v7 = (*(__int64 (__fastcall **)(void *, _QWORD, __int64 *))(qword_96A8 + 320))(&unk_9460, 0, &qword_9690); /*0x60e9*/ if ( (unsigned __int8)sub_7F8(v9, v8, v10, v11) && (unsigned __int8)sub_804(64) ) /*0x60fe*/ sub_740(64, "[System Inventory] Locating IPMI Dxe Protocol Status - %r\n", v7); /*0x6114*/ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/OnReadyToBoot.c b/LenovoServerPkg/SystemInventory/SystemInventory/OnReadyToBoot.c index 49048e8..ac100ab 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/OnReadyToBoot.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/OnReadyToBoot.c @@ -74,10 +74,10 @@ { LABEL_15: v28 = 1; /*0x58fa*/ - sub_63C(p_n145, 3317); /*0x5908*/ + ZeroMem(p_n145, 3317); /*0x5908*/ v29 = v21 - 1; /*0x5914*/ - sub_590(p_n145, ::p_n145 + 85LL, v29); /*0x5923*/ - sub_590(v29 + p_n145, ::p_n145 + 2351LL, 75LL * *(unsigned __int8 *)(::p_n145 + 2351LL) + 1); /*0x5947*/ + CopyMem(p_n145, ::p_n145 + 85LL, v29); /*0x5923*/ + CopyMem(v29 + p_n145, ::p_n145 + 2351LL, 75LL * *(unsigned __int8 *)(::p_n145 + 2351LL) + 1); /*0x5947*/ p_n145_1 = *(unsigned __int8 *)(::p_n145 + 2351LL); /*0x5953*/ v21 = 75 * p_n145_1 + 1 + v29; /*0x595f*/ goto LABEL_17; /*0x5961*/ @@ -112,7 +112,7 @@ sub_740(64, "[System Inventory] OnReadyToBoot Sending BMC Device Info Command Status - %r\n", v34); /*0x59f0*/ } if ( v28 ) /*0x5a20*/ - sub_1D54(p_n145); /*0x5a26*/ + FreePool(p_n145); /*0x5a26*/ v43 = SaveSmbiosDataToBmc(v40, v39, v41, v42); /*0x5a30*/ if ( (unsigned __int8)sub_7F8(v45, v44, v46, v47) ) /*0x5a33*/ { diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/SaveSmbiosDataToBmc.c b/LenovoServerPkg/SystemInventory/SystemInventory/SaveSmbiosDataToBmc.c index de2ecb8..a52d19e 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/SaveSmbiosDataToBmc.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/SaveSmbiosDataToBmc.c @@ -47,7 +47,7 @@ n24 = 24; /*0x5d3b*/ v13 = *(unsigned int *)(v20 + 12); /*0x5d40*/ LABEL_15: - p_n145 = (_BYTE *)sub_1D2C(v13 + n24 + 1); /*0x5d78*/ + p_n145 = (_BYTE *)AllocatePool(v13 + n24 + 1); /*0x5d78*/ *p_n145 = 1; /*0x5d8e*/ (*(void (__fastcall **)(_BYTE *, __int64, __int64))(qword_96A8 + 352))(p_n145 + 1, v10, n24); /*0x5d9f*/ (*(void (__fastcall **)(_BYTE *, __int64, __int64))(qword_96A8 + 352))(&p_n145[n24 + 1], v11, v13); /*0x5dbc*/ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.c b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.c index 2975086..0526bd5 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.c @@ -17,11 +17,11 @@ EFI_SYSTEM_TABLE *SystemTable ) { - signed __int64 v4; + signed __int64 Status; InitializeSystemInventory(ImageHandle, SystemTable); - v4 = sub_2E9C(ImageHandle, SystemTable); - if ( v4 < 0 ) + Status = sub_2E9C(ImageHandle, SystemTable); + if ( Status < 0 ) nullsub_1(ImageHandle, SystemTable); - return v4; + return Status; } diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.h b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.h index 9fbcd95..8a25788 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.h +++ b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory.h @@ -13,10 +13,25 @@ // Function Prototypes // +CHAR8 * +EFIAPI +AsciiStrCpyS( + CHAR8 *Destination, + CHAR8 *Source, + UINTN Length + ); + +#define DebugTraceEnabled(...) sub_7F8(__VA_ARGS__) +#define DebugLevelEnabled(...) sub_804(__VA_ARGS__) +#define DebugPrint(...) sub_740(__VA_ARGS__) +#define ZeroMemory(...) sub_65B0(__VA_ARGS__) +#define CopyMemory(...) sub_63C(__VA_ARGS__) +#define AsciiStrLen(...) sub_9F0(__VA_ARGS__) + EFI_STATUS EFIAPI ModuleEntryPoint( VOID ); -#endif /* __SYSTEMINVENTORY_H__ */ \ No newline at end of file +#endif /* __SYSTEMINVENTORY_H__ */ diff --git a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory_ModuleEntryPoint.c b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory_ModuleEntryPoint.c index 1db46c5..b0b237b 100644 --- a/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory_ModuleEntryPoint.c +++ b/LenovoServerPkg/SystemInventory/SystemInventory/SystemInventory_ModuleEntryPoint.c @@ -1,10 +1,10 @@ EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { - signed __int64 v4; // rsi + signed __int64 Status; // rsi InitializeSystemInventory(ImageHandle, SystemTable); /*0x3fb*/ - v4 = sub_2E9C(ImageHandle, SystemTable); /*0x48f*/ - if ( v4 < 0 ) /*0x495*/ + Status = sub_2E9C(ImageHandle, SystemTable); /*0x48f*/ + if ( Status < 0 ) /*0x495*/ nullsub_1(ImageHandle, SystemTable); /*0x49d*/ - return v4; /*0x4af*/ + return Status; /*0x4af*/ } diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.c b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.c index 5bc0c49..603d011 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.c @@ -23,25 +23,25 @@ {"addr":"0xffc1543e","code":"EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)\n{\n void *v2; // ecx\n int v3; // ebp\n void *v4; // ecx\n void *v5; // ecx\n int ModuleBase; // eax\n bool v7; // zf\n EFI_STATUS result; // eax\n int v9; // [esp-14h] [ebp-1Ch]\n _DWORD *v10; // [esp-14h] [ebp-1Ch]\n _BYTE v11[6]; // [esp-Ch] [ebp-14h] BYREF\n int v12; // [esp-4h] [ebp-Ch] BYREF\n _BYTE *v13; // [esp+0h] [ebp-8h]\n int v14; // [esp+4h] [ebp-4h]\n\n if ( *(char *)(DxeIplGetModuleBase(v2) + 1024068) >= 0 ) /*0xffc1544f*/\n {\n DxeIplInitGlobalFlags(v4); /*0xffc15451*/\n ModuleBase = DxeIplGetModuleBase(v5); /*0xffc15456*/\n *(_BYTE *)(ModuleBase + 1024068) |= 0x80u; /*0xffc15462*/\n }\n DxeIplInstallPpi((char *)FvDeviceHandle, (int (*)())DxeIplPpiNotifyCallback, (int (*)())DxeIplPeiEndCallback); /*0xffc15473*/\n DxeIplInstallPpi((char *)DxeIplPpi, (int (*)())DxeIplDxeIplPpiNotify, (int (*)())DxeIplEndOfPeiNotify); /*0xffc15489*/\n off_FFC18DF8 = &unk_FFC18B10; /*0xffc15493*/\n n64 = 64; /*0xffc1549d*/\n v14 = v3; /*0xffc154ad*/\n v7 = DxeIplGetPlatformBootMode() == 17; /*0xffc154bb*/\n v13 = v11; /*0xffc154c1*/\n if ( v7 ) /*0xffc154c4*/\n {\n __sidt(v13); /*0xffc15506*/\n (*(void ( **)(_DWORD, void *))(**(_DWORD **)(*(_DWORD *)&v11[2] - 4) + 36))( /*0xffc15517*/\n *(_DWORD *)(*(_DWORD *)&v11[2] - 4),\n &unk_FFC18A64);\n return DxeIplReportStatus(&unk_FFC18A7C); /*0xffc15517*/\n }\n __sidt(v13); /*0xffc154c9*/\n result = (*(int ( **)(EFI_HANDLE))(**(_DWORD **)(*(_DWORD *)&v11[2] - 4) + 116))(ImageHandle); /*0xffc154d5*/\n if ( result ) /*0xffc154db*/\n {\n result = DxeIplLocatePpiByGuid((int)&unk_FFC18D68, 0, v9, (int)&v12); /*0xffc154e9*/\n if ( (result & 0x80000000) == 0 ) /*0xffc154f2*/\n {\n DxeIplDebugPrint(v10); /*0xffc154f9*/\n return DxeIplReportStatus(&unk_FFC18A7C); /*0xffc1551c*/\n }\n }\n return result; /*0xffc1552a*/\n}","refs":[{"addr":"0xffc189f5","name":"DxeIplInitGlobalFlags"},{"addr":"0xffc189e9","name":"DxeIplGetModuleBase"},{"addr":"0xffc1643f","name":"DxeIplInstallPpi"},{"addr":"0xffc18d18","name":"FvDeviceHandle"},{"addr":"0xffc16e63","name":"DxeIplPpiNotifyCallback"},{"addr":"0xffc16ee0","name":"DxeIplPeiEndCallback"},{"addr":"0xffc18d58","name":"DxeIplPpi"},{"addr":"0xffc17152","name":"DxeIplDxeIplPpiNotify"},{"addr":"0xffc171c8","name":"DxeIplEndOfPeiNotify"},{"addr":"0xffc18df8","name":"off_FFC18DF8"},{"addr":"0xffc18b10","name":"unk_FFC18B10"},{"addr":"0xffc18dfc","name":"n64"},{"addr":"0xffc16085","name":"DxeIplGetPlatformBootMode"},{"addr":"0xffc18a64","name":"unk_FFC18A64"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc18a7c","name":"unk_FFC18A7C"},{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc18d68","name":"unk_FFC18D68"},{"addr":"0xffc1552b","name":"DxeIplDebugPrint"}]} -{"addr":"0xffc1552b","code":"int __thiscall DxeIplDebugPrint(_DWORD *this)\n{\n int v1; // esi\n int v2; // ebp\n _DWORD *v3; // edi\n int v4; // ebx\n _DWORD *this_1; // [esp+0h] [ebp-4h] BYREF\n\n this_1 = this; /*0xffc1552b*/\n if ( sub_FFC163A4(&this_1) >= 0 ) /*0xffc15536*/\n {\n v1 = this_1[1]; /*0xffc1553d*/\n v2 = this_1[2]; /*0xffc15540*/\n if ( v1 ) /*0xffc15545*/\n {\n v3 = (_DWORD *)sub_FFC1634F(12 *v1); /*0xffc15553*/\n v4 = v2 + 16 *v1; /*0xffc15558*/\n do /*0xffc1557a*/\n {\n v4 -= 16; /*0xffc1555a*/\n *v3 = -2147483632; /*0xffc1555d*/\n v3[2] = &off_FFC18A4C; /*0xffc15565*/\n v3[1] = v4; /*0xffc1556c*/\n sub_FFC16201(v3); /*0xffc1556f*/\n v3 += 3; /*0xffc15574*/\n --v1; /*0xffc15577*/\n }\n while ( v1 ); /*0xffc1557a*/\n }\n }\n return sub_FFC16201(&unk_FFC18A54);\n}","refs":[{"addr":"0xffc1634f","name":"DxeIplAllocateZeroPages"},{"addr":"0xffc18a4c","name":"off_FFC18A4C"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc18a54","name":"unk_FFC18A54"}]} +{"addr":"0xffc1552b","code":"int __thiscall DxeIplDebugPrint(_DWORD *this)\n{\n int v1; // esi\n int v2; // ebp\n _DWORD *v3; // edi\n int v4; // ebx\n _DWORD *this_1; // [esp+0h] [ebp-4h] BYREF\n\n this_1 = this; /*0xffc1552b*/\n if ( DxeIplFvOpenDevice(&this_1) >= 0 ) /*0xffc15536*/\n {\n v1 = this_1[1]; /*0xffc1553d*/\n v2 = this_1[2]; /*0xffc15540*/\n if ( v1 ) /*0xffc15545*/\n {\n v3 = (_DWORD *)DxeIplAllocateZeroPages(12 *v1); /*0xffc15553*/\n v4 = v2 + 16 *v1; /*0xffc15558*/\n do /*0xffc1557a*/\n {\n v4 -= 16; /*0xffc1555a*/\n *v3 = -2147483632; /*0xffc1555d*/\n v3[2] = &off_FFC18A4C; /*0xffc15565*/\n v3[1] = v4; /*0xffc1556c*/\n DxeIplReportStatus(v3); /*0xffc1556f*/\n v3 += 3; /*0xffc15574*/\n --v1; /*0xffc15577*/\n }\n while ( v1 ); /*0xffc1557a*/\n }\n }\n return DxeIplReportStatus(&unk_FFC18A54);\n}","refs":[{"addr":"0xffc1634f","name":"DxeIplAllocateZeroPages"},{"addr":"0xffc18a4c","name":"off_FFC18A4C"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc18a54","name":"unk_FFC18A54"}]} {"addr":"0xffc1558d","code":"char DxeIplMeasureFv(int a1, unsigned int n128)\n{\n unsigned int n128_1; // eax\n int v4; // eax\n\n if ( !a1 ) /*0xffc15592*/\n return 0; /*0xffc15592*/\n n128_1 = 8 * (n128 >> 3); /*0xffc1559f*/\n if ( n128_1 != n128 || *(_DWORD *)(n128_1 + a1 - 8) != 15 ) /*0xffc155ab*/\n return 0; /*0xffc15597*/\n v4 = 0; /*0xffc155ad*/\n if ( n128 >> 3 != 1 ) /*0xffc155b2*/\n {\n while ( *(_DWORD *)(a1 + 8 *v4) < 0xFu ) /*0xffc155b8*/\n {\n if ( ++v4 >= (n128 >> 3) - 1 ) /*0xffc155bd*/\n return 1; /*0xffc155bd*/\n }\n return 0; /*0xffc155b8*/\n }\n return 1; /*0xffc15596*/\n}"} -{"addr":"0xffc155c3","code":"int DxeIplFvReadSection(int a1, int a2, int *a3, unsigned int *a4, int a5)\n{\n int v5; // edi\n int result; // eax\n unsigned int v7; // esi\n unsigned int v8; // ecx\n int v9; // ecx\n int v10; // eax\n _BYTE v11[4]; // [esp+Ch] [ebp-14h] BYREF\n _DWORD *v12; // [esp+10h] [ebp-10h] BYREF\n unsigned int v13; // [esp+14h] [ebp-Ch] BYREF\n unsigned int v14; // [esp+18h] [ebp-8h]\n unsigned int v15; // [esp+1Ch] [ebp-4h] BYREF\n\n v5 = 0; /*0xffc155d3*/\n result = sub_FFC163A4(&v12); /*0xffc155d5*/\n if ( result >= 0 ) /*0xffc155df*/\n {\n v7 = 0; /*0xffc155ef*/\n v8 = v12[1]; /*0xffc15603*/\n v14 = v8; /*0xffc15606*/\n if ( v8 ) /*0xffc1560c*/\n {\n v8 = v12[2]; /*0xffc1560e*/\n while ( !(unsigned __int8)sub_FFC16309(v8) ) /*0xffc15618*/\n {\n ++v7; /*0xffc1561a*/\n v8 = v9 + 16; /*0xffc1561b*/\n if ( v7 >= v14 ) /*0xffc15622*/\n goto LABEL_6; /*0xffc15622*/\n }\n result = (*(int ( **)(int, unsigned int *, unsigned int *, _BYTE *))(v12[4] + 4 *v7))(a2, &v13, &v15, v11); /*0xffc15675*/\n }\n else\n {\nLABEL_6:\n result = -2147483645; /*0xffc15624*/\n }\n if ( result >= 0 ) /*0xffc1562b*/\n {\n if ( v15 ) /*0xffc15637*/\n {\n v5 = sub_FFC1632D(v8, (v15 >> 12) + ((v15 & 0xFFF) != 0)); /*0xffc15651*/\n if ( !v5 ) /*0xffc15655*/\n return -2147483639; /*0xffc15655*/\n }\n if ( (v11[0] & 1) != 0 && v13 ) /*0xffc1568d*/\n {\n v10 = sub_FFC1632D(v8, (v13 >> 12) + ((v13 & 0xFFF) != 0) + 1); /*0xffc156a0*/\n *a3 = v10; /*0xffc156a5*/\n if ( !v10 ) /*0xffc156a9*/\n return -2147483639; /*0xffc1565c*/\n *a3 = v10 + 4092; /*0xffc156b0*/\n }\n result = sub_FFC164EE(v5, a5); /*0xffc156ba*/\n if ( result >= 0 ) /*0xffc156c3*/\n {\n *a4 = v13; /*0xffc156cc*/\n return 0; /*0xffc156ce*/\n }\n }\n }\n return result; /*0xffc156d0*/\n}","refs":[{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc1632d","name":"DxeIplAllocatePages"},{"addr":"0xffc164ee","name":"DxeIplDecompress"}]} +{"addr":"0xffc155c3","code":"int DxeIplFvReadSection(int a1, int a2, int *a3, unsigned int *a4, int a5)\n{\n int v5; // edi\n int result; // eax\n unsigned int v7; // esi\n unsigned int v8; // ecx\n int v9; // ecx\n int v10; // eax\n _BYTE v11[4]; // [esp+Ch] [ebp-14h] BYREF\n _DWORD *v12; // [esp+10h] [ebp-10h] BYREF\n unsigned int v13; // [esp+14h] [ebp-Ch] BYREF\n unsigned int v14; // [esp+18h] [ebp-8h]\n unsigned int v15; // [esp+1Ch] [ebp-4h] BYREF\n\n v5 = 0; /*0xffc155d3*/\n result = DxeIplFvOpenDevice(&v12); /*0xffc155d5*/\n if ( result >= 0 ) /*0xffc155df*/\n {\n v7 = 0; /*0xffc155ef*/\n v8 = v12[1]; /*0xffc15603*/\n v14 = v8; /*0xffc15606*/\n if ( v8 ) /*0xffc1560c*/\n {\n v8 = v12[2]; /*0xffc1560e*/\n while ( !(unsigned __int8)DxeIplFvIsAddrValid(v8) ) /*0xffc15618*/\n {\n ++v7; /*0xffc1561a*/\n v8 = v9 + 16; /*0xffc1561b*/\n if ( v7 >= v14 ) /*0xffc15622*/\n goto LABEL_6; /*0xffc15622*/\n }\n result = (*(int ( **)(int, unsigned int *, unsigned int *, _BYTE *))(v12[4] + 4 *v7))(a2, &v13, &v15, v11); /*0xffc15675*/\n }\n else\n {\nLABEL_6:\n result = -2147483645; /*0xffc15624*/\n }\n if ( result >= 0 ) /*0xffc1562b*/\n {\n if ( v15 ) /*0xffc15637*/\n {\n v5 = DxeIplAllocatePages(v8, (v15 >> 12) + ((v15 & 0xFFF) != 0)); /*0xffc15651*/\n if ( !v5 ) /*0xffc15655*/\n return -2147483639; /*0xffc15655*/\n }\n if ( (v11[0] & 1) != 0 && v13 ) /*0xffc1568d*/\n {\n v10 = DxeIplAllocatePages(v8, (v13 >> 12) + ((v13 & 0xFFF) != 0) + 1); /*0xffc156a0*/\n *a3 = v10; /*0xffc156a5*/\n if ( !v10 ) /*0xffc156a9*/\n return -2147483639; /*0xffc1565c*/\n *a3 = v10 + 4092; /*0xffc156b0*/\n }\n result = DxeIplDecompress(v5, a5); /*0xffc156ba*/\n if ( result >= 0 ) /*0xffc156c3*/\n {\n *a4 = v13; /*0xffc156cc*/\n return 0; /*0xffc156ce*/\n }\n }\n }\n return result; /*0xffc156d0*/\n}","refs":[{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc1632d","name":"DxeIplAllocatePages"},{"addr":"0xffc164ee","name":"DxeIplDecompress"}]} {"addr":"0xffc156d7","code":"int DxeIplFvExtractSection(int FvHandle, unsigned int SrcSize_, int *DstBuffer, unsigned int *DstSize)\n{\n unsigned int SectionType; // ecx\n unsigned int SectionStart; // eax\n int TypeFlag; // ecx\n unsigned int SectionType_2; // edi\n int HeaderSize; // ecx\n unsigned int CompSize; // edx\n unsigned __int8 *src; // ebx\n int Scratch; // ecx\n unsigned __int8 **Pages; // ebp\n int DstAlloc; // eax\n int DstPtr; // esi\n int BufAlloc; // eax\n int SavedCtx; // [esp-14h] [ebp-18h]\n unsigned int SectionType_1; // [esp+0h] [ebp-4h] BYREF\n\n SectionType_1 = SectionType; /*0xffc156d7*/\n SectionStart = SrcSize_; /*0xffc156d8*/\n if ( *(_BYTE *)(SrcSize_ + 3) != 1 ) /*0xffc156e0*/\n return -2147483646; /*0xffc156e8*/\n TypeFlag = *(_DWORD *)SrcSize_ & 0xFFFFFF; /*0xffc156f0*/\n if ( TypeFlag == 0xFFFFFF ) /*0xffc156f6*/\n {\n SectionType_2 = *(_DWORD *)(SrcSize_ + 8); /*0xffc156fe*/\n HeaderSize = 13; /*0xffc15703*/\n CompSize = *(_DWORD *)(SrcSize_ + 4) - 13; /*0xffc15704*/\n LOBYTE(SrcSize_) = *(_BYTE *)(SrcSize_ + 12); /*0xffc15706*/\n }\n else\n {\n SectionType_2 = *(_DWORD *)(SrcSize_ + 4); /*0xffc1570c*/\n CompSize = TypeFlag - 9; /*0xffc1570f*/\n LOBYTE(SrcSize_) = *(_BYTE *)(SrcSize_ + 8); /*0xffc15717*/\n HeaderSize = 9; /*0xffc1571b*/\n }\n src = (unsigned __int8 *)(HeaderSize + SectionStart); /*0xffc1571c*/\n if ( (_BYTE)SrcSize_ ) /*0xffc15729*/\n {\n if ( (unsigned __int8)SrcSize_ != 1 || DxeIplLzmaGetProp(src, CompSize, &SectionType_1, &SrcSize_) < 0 ) /*0xffc15745*/\n return -2147483634; /*0xffc15745*/\n Pages = (unsigned __int8 **)DxeIplAllocatePages(SavedCtx, (SrcSize_ >> 12) + ((SrcSize_ & 0xFFF) != 0)); /*0xffc15764*/\n if ( Pages ) /*0xffc15768*/\n {\n SectionType_2 = SectionType_1; /*0xffc1576a*/\n DstAlloc = DxeIplAllocatePages(Scratch, (SectionType_1 >> 12) + ((SectionType_1 & 0xFFF) != 0) + 1); /*0xffc1577e*/\n if ( DstAlloc ) /*0xffc15787*/\n {\n DstPtr = DstAlloc + 4092; /*0xffc15789*/\n if ( (DxeIplLzmaDecodeProp(src, (unsigned __int8 *)(DstAlloc + 4092), Pages, 1) & 0x80000000) != 0 ) /*0xffc1579f*/\n return -2147483634; /*0xffc157a6*/\n goto LABEL_16; /*0xffc1579f*/\n }\n }\n return -2147483639; /*0xffc157cc*/\n }\n BufAlloc = DxeIplAllocatePages(HeaderSize, (SectionType_2 >> 12) + ((SectionType_2 & 0xFFF) != 0) + 1); /*0xffc157bc*/\n if ( !BufAlloc ) /*0xffc157c5*/\n return -2147483639; /*0xffc157c5*/\n DstPtr = BufAlloc + 4092; /*0xffc157ce*/\n DxeIplFvFreePages((char *)(BufAlloc + 4092), (char *)src, SectionType_2); /*0xffc157d9*/\nLABEL_16:\n *DstSize = SectionType_2; /*0xffc157df*/\n *DstBuffer = DstPtr; /*0xffc157e9*/\n return 0; /*0xffc156e8*/\n}","refs":[{"addr":"0xffc16d80","name":"DxeIplLzmaGetProp"},{"addr":"0xffc1632d","name":"DxeIplAllocatePages"},{"addr":"0xffc16daf","name":"DxeIplLzmaDecodeProp"},{"addr":"0xffc162d3","name":"DxeIplFvFreePages"}]} -{"addr":"0xffc157f3","code":"int DxeIplFvProcessSections(int a1, int a2)\n{\n int i; // edx\n int result; // eax\n int v4; // esi\n\n for ( i = sub_FFC16008(); ; i = v4 + *(unsigned __int16 *)(v4 + 2) ) /*0xffc157f9*/\n {\n result = sub_FFC16033(2, i); /*0xffc15817*/\n v4 = result; /*0xffc1581c*/\n if ( !result ) /*0xffc15820*/\n break; /*0xffc15820*/\n if ( (unsigned __int8)sub_FFC16309(&unk_FFC18CD8) ) /*0xffc15805*/\n {\n sub_FFC161B3(*(_DWORD *)(v4 + 24), *(_DWORD *)(v4 + 28), *(_DWORD *)(v4 + 32), *(_DWORD *)(v4 + 36)); /*0xffc15830*/\n *(_DWORD *)(v4 + 36) = 0; /*0xffc1583c*/\n *(_DWORD *)(v4 + 24) = a1; /*0xffc15840*/\n *(_DWORD *)(v4 + 28) = a2; /*0xffc15847*/\n *(_DWORD *)(v4 + 32) = 0x100000; /*0xffc1584a*/\n return a2; /*0xffc15843*/\n }\n }\n return result; /*0xffc15822*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc161b3","name":"DxeIplFreePages"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18cd8","name":"unk_FFC18CD8"}]} +{"addr":"0xffc157f3","code":"int DxeIplFvProcessSections(int a1, int a2)\n{\n int i; // edx\n int result; // eax\n int v4; // esi\n\n for ( i = DxeIplGetPeiServices(); ; i = v4 + *(unsigned __int16 *)(v4 + 2) ) /*0xffc157f9*/\n {\n result = DxeIplLocatePpi(2, i); /*0xffc15817*/\n v4 = result; /*0xffc1581c*/\n if ( !result ) /*0xffc15820*/\n break; /*0xffc15820*/\n if ( (unsigned __int8)DxeIplFvIsAddrValid(&unk_FFC18CD8) ) /*0xffc15805*/\n {\n DxeIplFreePages(*(_DWORD *)(v4 + 24), *(_DWORD *)(v4 + 28), *(_DWORD *)(v4 + 32), *(_DWORD *)(v4 + 36)); /*0xffc15830*/\n *(_DWORD *)(v4 + 36) = 0; /*0xffc1583c*/\n *(_DWORD *)(v4 + 24) = a1; /*0xffc15840*/\n *(_DWORD *)(v4 + 28) = a2; /*0xffc15847*/\n *(_DWORD *)(v4 + 32) = 0x100000; /*0xffc1584a*/\n return a2; /*0xffc15843*/\n }\n }\n return result; /*0xffc15822*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc161b3","name":"DxeIplFreePages"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18cd8","name":"unk_FFC18CD8"}]} -{"addr":"0xffc15853","code":"int __thiscall DxeIplCheckBootMode(void *this)\n{\n int v1; // esi\n int v3; // [esp-4h] [ebp-Ch]\n int ( **v4)(_DWORD); // [esp+4h] [ebp-4h] BYREF\n\n v1 = sub_FFC16226(this, &v4); /*0xffc1586b*/\n if ( v1 >= 0 ) /*0xffc15872*/\n {\n sub_FFC17107(v3, \"DxeIpl\"); /*0xffc1588f*/\n return (*v4)(v4); /*0xffc1589b*/\n }\n else\n {\n sub_FFC16F4A(-2147483646, 50532354); /*0xffc1587e*/\n return v1; /*0xffc15886*/\n }\n}","refs":[{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc17107","name":"DxeIplGetBootModeFromHob"},{"addr":"0xffc16f4a","name":"DxeIplReportStatusCode"}]} +{"addr":"0xffc15853","code":"int __thiscall DxeIplCheckBootMode(void *this)\n{\n int v1; // esi\n int v3; // [esp-4h] [ebp-Ch]\n int ( **v4)(_DWORD); // [esp+4h] [ebp-4h] BYREF\n\n v1 = DxeIplLocatePpiByGuid(this, &v4); /*0xffc1586b*/\n if ( v1 >= 0 ) /*0xffc15872*/\n {\n DxeIplGetBootModeFromHob(v3, \"DxeIpl\"); /*0xffc1588f*/\n return (*v4)(v4); /*0xffc1589b*/\n }\n else\n {\n DxeIplReportStatusCode(-2147483646, 50532354); /*0xffc1587e*/\n return v1; /*0xffc15886*/\n }\n}","refs":[{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc17107","name":"DxeIplGetBootModeFromHob"},{"addr":"0xffc16f4a","name":"DxeIplReportStatusCode"}]} -{"addr":"0xffc158a3","code":"int __thiscall DxeIplGetNextFfsFile(void *this)\n{\n int i_1; // esi\n int v2; // edi\n int v3; // eax\n int v4; // eax\n int i; // ecx\n int v6; // ecx\n int v7; // eax\n _BYTE v9[2]; // [esp+10h] [ebp-18h] BYREF\n int v10; // [esp+12h] [ebp-16h]\n int v11; // [esp+18h] [ebp-10h] BYREF\n _BYTE *v12; // [esp+1Ch] [ebp-Ch] BYREF\n _BYTE v13[6]; // [esp+20h] [ebp-8h] BYREF\n\n i_1 = 0; /*0xffc158b8*/\n v2 = sub_FFC16226(this, &v12); /*0xffc158bf*/\n if ( v2 >= 0 ) /*0xffc158ca*/\n {\n *(_DWORD *)v13 = v9; /*0xffc158e3*/\n __sidt(v9); /*0xffc158e9*/\n v2 = (*(int ( **)(_DWORD, _BYTE *))v12)(*(_DWORD *)(v10 - 4), v12); /*0xffc158fa*/\n }\n else\n {\n sub_FFC16F4A(-2147483646, 50532358); /*0xffc158d6*/\n }\n if ( v2 >= 0 /*0xffc1591d*/\n && (v3 = sub_FFC16008(), (v4 = sub_FFC16056(&unk_FFC18CB8, v3)) != 0)\n && !*(_BYTE *)(v4 + 32)\n && *(_QWORD *)(v4 + 24) )\n {\n sub_FFC16085(); /*0xffc15925*/\n for ( i = 0; sub_FFC16254(i, &v11) >= 0; i = i_1 ) /*0xffc1592a*/\n ++i_1; /*0xffc1592e*/\n }\n else\n {\n v12 = v9; /*0xffc15942*/\n __sidt(v9); /*0xffc15948*/\n v6 = *(_DWORD *)(v10 - 4); /*0xffc1594e*/\n v12 = v13; /*0xffc15954*/\n __sidt(v13); /*0xffc1595a*/\n (*(void ( **)(int, int, int, _DWORD, _DWORD, _DWORD))(**(_DWORD **)(*(_DWORD *)&v13[2] - 4) + 88))( /*0xffc1596f*/\n v6,\n -2147483646,\n 50532359,\n 0,\n 0,\n 0);\n v7 = sub_FFC16386(); /*0xffc15972*/\n if ( (*(unsigned __int8 ( **)(int))(v7 + 24))(9) ) /*0xffc15979*/\n {\n v12 = v9; /*0xffc15986*/\n __sidt(v9); /*0xffc1598c*/\n (*(void ( **)(int, _DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 - 4) + 128))(2, 0, 0, 0); /*0xffc1599c*/\n sub_FFC15FB3(); /*0xffc159a5*/\n }\n }\n return i_1; /*0xffc159aa*/\n}","refs":[{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc16f4a","name":"DxeIplReportStatusCode"},{"addr":"0xffc16085","name":"DxeIplGetPlatformBootMode"},{"addr":"0xffc16254","name":"DxeIplOpenFv"},{"addr":"0xffc16386","name":"DxeIplGetPeiBootMode"},{"addr":"0xffc15fb3","name":"DxeIplNullStall"},{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16056","name":"DxeIplGetBootModeGuid"},{"addr":"0xffc18cb8","name":"unk_FFC18CB8"}]} +{"addr":"0xffc158a3","code":"int __thiscall DxeIplGetNextFfsFile(void *this)\n{\n int i_1; // esi\n int v2; // edi\n int v3; // eax\n int v4; // eax\n int i; // ecx\n int v6; // ecx\n int v7; // eax\n _BYTE v9[2]; // [esp+10h] [ebp-18h] BYREF\n int v10; // [esp+12h] [ebp-16h]\n int v11; // [esp+18h] [ebp-10h] BYREF\n _BYTE *v12; // [esp+1Ch] [ebp-Ch] BYREF\n _BYTE v13[6]; // [esp+20h] [ebp-8h] BYREF\n\n i_1 = 0; /*0xffc158b8*/\n v2 = DxeIplLocatePpiByGuid(this, &v12); /*0xffc158bf*/\n if ( v2 >= 0 ) /*0xffc158ca*/\n {\n *(_DWORD *)v13 = v9; /*0xffc158e3*/\n __sidt(v9); /*0xffc158e9*/\n v2 = (*(int ( **)(_DWORD, _BYTE *))v12)(*(_DWORD *)(v10 - 4), v12); /*0xffc158fa*/\n }\n else\n {\n DxeIplReportStatusCode(-2147483646, 50532358); /*0xffc158d6*/\n }\n if ( v2 >= 0 /*0xffc1591d*/\n && (v3 = DxeIplGetPeiServices(), (v4 = DxeIplGetBootModeGuid(&unk_FFC18CB8, v3)) != 0)\n && !*(_BYTE *)(v4 + 32)\n && *(_QWORD *)(v4 + 24) )\n {\n DxeIplGetPlatformBootMode(); /*0xffc15925*/\n for ( i = 0; DxeIplOpenFv(i, &v11) >= 0; i = i_1 ) /*0xffc1592a*/\n ++i_1; /*0xffc1592e*/\n }\n else\n {\n v12 = v9; /*0xffc15942*/\n __sidt(v9); /*0xffc15948*/\n v6 = *(_DWORD *)(v10 - 4); /*0xffc1594e*/\n v12 = v13; /*0xffc15954*/\n __sidt(v13); /*0xffc1595a*/\n (*(void ( **)(int, int, int, _DWORD, _DWORD, _DWORD))(**(_DWORD **)(*(_DWORD *)&v13[2] - 4) + 88))( /*0xffc1596f*/\n v6,\n -2147483646,\n 50532359,\n 0,\n 0,\n 0);\n v7 = DxeIplGetPeiBootMode(); /*0xffc15972*/\n if ( (*(unsigned __int8 ( **)(int))(v7 + 24))(9) ) /*0xffc15979*/\n {\n v12 = v9; /*0xffc15986*/\n __sidt(v9); /*0xffc1598c*/\n (*(void ( **)(int, _DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 - 4) + 128))(2, 0, 0, 0); /*0xffc1599c*/\n DxeIplNullStall(); /*0xffc159a5*/\n }\n }\n return i_1; /*0xffc159aa*/\n}","refs":[{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc16f4a","name":"DxeIplReportStatusCode"},{"addr":"0xffc16085","name":"DxeIplGetPlatformBootMode"},{"addr":"0xffc16254","name":"DxeIplOpenFv"},{"addr":"0xffc16386","name":"DxeIplGetPeiBootMode"},{"addr":"0xffc15fb3","name":"DxeIplNullStall"},{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16056","name":"DxeIplGetBootModeGuid"},{"addr":"0xffc18cb8","name":"unk_FFC18CB8"}]} -{"addr":"0xffc159b3","code":"int __thiscall DxeIplDiscoverDxeCore(void *n32)\n{\n _WORD *i; // eax\n int v3; // ecx\n const __int16 *PreviousMemoryTypeInformation; // edi\n int v5; // esi\n int n64; // edx\n unsigned int n128; // [esp+10h] [ebp-8Ch] BYREF\n int ( **v9)(_DWORD, const __int16 *, void *, _DWORD, unsigned int *, _BYTE *); // [esp+14h] [ebp-88h] BYREF\n _BYTE v10[132]; // [esp+18h] [ebp-84h] BYREF\n\n for ( i = (_WORD *)sub_FFC16008(); ; *i = -2 ) /*0xffc159bf*/\n {\n i = (_WORD *)sub_FFC16056(&unk_FFC18CC8, i); /*0xffc159d7*/\n if ( !i ) /*0xffc159de*/\n break; /*0xffc159de*/\n }\n if ( sub_FFC16226(v3, &v9) < 0 ) /*0xffc159fb*/\n goto LABEL_13; /*0xffc159fb*/\n n128 = 128; /*0xffc159fd*/\n PreviousMemoryTypeInformation = L\"PreviousMemoryTypeInformation\"; /*0xffc15a05*/\n if ( n32 != (void *)5 ) /*0xffc15a0d*/\n PreviousMemoryTypeInformation = L\"MemoryTypeInformation\"; /*0xffc15a0f*/\n v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18DD8, 0, &n128, v10); /*0xffc15a29*/\n if ( v5 == -2147483634 ) /*0xffc15a34*/\n v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18CC8, 0, &n128, v10); /*0xffc15a4e*/\n if ( v5 < 0 ) /*0xffc15a52*/\n goto LABEL_13; /*0xffc15a52*/\n if ( !DxeIplMeasureFv((int)v10, n128) ) /*0xffc15a5c*/\n v5 = -2147483645; /*0xffc15a6f*/\n if ( v5 < 0 ) /*0xffc15a76*/\n {\nLABEL_13:\n n64 = n64; /*0xffc15a78*/\n n128 = n64; /*0xffc15a83*/\n }\n sub_FFC16191(n64); /*0xffc15a8c*/\n return sub_FFC16191(16); /*0xffc15a9e*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16056","name":"DxeIplGetBootModeGuid"},{"addr":"0xffc18cc8","name":"unk_FFC18CC8"},{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc18dd8","name":"unk_FFC18DD8"},{"addr":"0xffc1558d","name":"DxeIplMeasureFv"},{"addr":"0xffc18dfc","name":"n64"},{"addr":"0xffc16191","name":"DxeIplAllocPagesBelow4G"}]} +{"addr":"0xffc159b3","code":"int __thiscall DxeIplDiscoverDxeCore(void *n32)\n{\n _WORD *i; // eax\n int v3; // ecx\n const __int16 *PreviousMemoryTypeInformation; // edi\n int v5; // esi\n int n64; // edx\n unsigned int n128; // [esp+10h] [ebp-8Ch] BYREF\n int ( **v9)(_DWORD, const __int16 *, void *, _DWORD, unsigned int *, _BYTE *); // [esp+14h] [ebp-88h] BYREF\n _BYTE v10[132]; // [esp+18h] [ebp-84h] BYREF\n\n for ( i = (_WORD *)DxeIplGetPeiServices(); ; *i = -2 ) /*0xffc159bf*/\n {\n i = (_WORD *)DxeIplGetBootModeGuid(&unk_FFC18CC8, i); /*0xffc159d7*/\n if ( !i ) /*0xffc159de*/\n break; /*0xffc159de*/\n }\n if ( DxeIplLocatePpiByGuid(v3, &v9) < 0 ) /*0xffc159fb*/\n goto LABEL_13; /*0xffc159fb*/\n n128 = 128; /*0xffc159fd*/\n PreviousMemoryTypeInformation = L\"PreviousMemoryTypeInformation\"; /*0xffc15a05*/\n if ( n32 != (void *)5 ) /*0xffc15a0d*/\n PreviousMemoryTypeInformation = L\"MemoryTypeInformation\"; /*0xffc15a0f*/\n v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18DD8, 0, &n128, v10); /*0xffc15a29*/\n if ( v5 == -2147483634 ) /*0xffc15a34*/\n v5 = (*v9)(v9, PreviousMemoryTypeInformation, &unk_FFC18CC8, 0, &n128, v10); /*0xffc15a4e*/\n if ( v5 < 0 ) /*0xffc15a52*/\n goto LABEL_13; /*0xffc15a52*/\n if ( !DxeIplMeasureFv((int)v10, n128) ) /*0xffc15a5c*/\n v5 = -2147483645; /*0xffc15a6f*/\n if ( v5 < 0 ) /*0xffc15a76*/\n {\nLABEL_13:\n n64 = n64; /*0xffc15a78*/\n n128 = n64; /*0xffc15a83*/\n }\n DxeIplAllocPagesBelow4G(n64); /*0xffc15a8c*/\n return DxeIplAllocPagesBelow4G(16); /*0xffc15a9e*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16056","name":"DxeIplGetBootModeGuid"},{"addr":"0xffc18cc8","name":"unk_FFC18CC8"},{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc18dd8","name":"unk_FFC18DD8"},{"addr":"0xffc1558d","name":"DxeIplMeasureFv"},{"addr":"0xffc18dfc","name":"n64"},{"addr":"0xffc16191","name":"DxeIplAllocPagesBelow4G"}]} {"addr":"0xffc15aa9","code":"int DxeIplEntry(int PeiServicesPtr, int BootServices)\n{\n int Guid; // ecx\n int Vol; // esi\n int NextFfsFile; // edi\n int PlatformBootMode; // eax\n void *Status; // ecx\n void *PlatformBootMode_1; // ebx\n int FvSection; // eax\n int PpiStatus; // ecx\n int FvStatus; // eax\n int DxeHandle; // ecx\n int PpiStatus_1; // [esp-4h] [ebp-64h]\n int DxeHandle_1; // [esp+Ch] [ebp-54h] BYREF\n int v15; // [esp+10h] [ebp-50h] BYREF\n _BYTE *v16; // [esp+14h] [ebp-4Ch]\n int ( **v17)(_DWORD, int, int *, __int64 *, int *, _BYTE *); // [esp+18h] [ebp-48h] BYREF\n _BYTE v18[4]; // [esp+1Ch] [ebp-44h] BYREF\n _BYTE v19[2]; // [esp+20h] [ebp-40h] BYREF\n int v20; // [esp+22h] [ebp-3Eh]\n int v21[2]; // [esp+28h] [ebp-38h] BYREF\n __int64 v22; // [esp+30h] [ebp-30h] BYREF\n int v23[2]; // [esp+38h] [ebp-28h] BYREF\n _BYTE v24[32]; // [esp+40h] [ebp-20h] BYREF\n\n Vol = 0; /*0xffc15abd*/\n NextFfsFile = 0; /*0xffc15abf*/\n DxeIplDebugPrintGuid(Guid, \"DxeIpl\"); /*0xffc15ac1*/\n (*(void ( **)(int, int, int, _DWORD, _DWORD, _DWORD))(*(_DWORD *)BootServices + 88))( /*0xffc15ad9*/\n BootServices,\n 1,\n 50466817,\n 0,\n 0,\n 0);\n PlatformBootMode = DxeIplGetPlatformBootMode(); /*0xffc15adf*/\n PlatformBootMode_1 = (void *)PlatformBootMode; /*0xffc15ae4*/\n if ( PlatformBootMode == 17 ) /*0xffc15ae9*/\n {\n if ( DxeIplCheckBootMode(Status) < 0 ) /*0xffc15af2*/\n {\n DxeIplReportStatusCode(2, 50532357); /*0xffc15b01*/\n v16 = v19; /*0xffc15b0d*/\n __sidt(v19); /*0xffc15b15*/\n (*(void ( **)(_DWORD))(**(_DWORD **)(v20 - 4) + 92))(*(_DWORD *)(v20 - 4)); /*0xffc15b22*/\n }\n }\n else if ( PlatformBootMode == 32 || PlatformBootMode == 18 ) /*0xffc15b30*/\n {\n NextFfsFile = DxeIplGetNextFfsFile(Status); /*0xffc15b37*/\n PlatformBootMode_1 = (void *)DxeIplGetPlatformBootMode(); /*0xffc15b3e*/\n }\n DxeIplReportStatus(&unk_FFC18AC4); /*0xffc15b45*/\n DxeIplDiscoverDxeCore(PlatformBootMode_1); /*0xffc15b4c*/\n do /*0xffc15b68*/\n {\n FvStatus = DxeIplOpenFv(NextFfsFile++, (int)&v15); /*0xffc15b70*/\n if ( FvStatus < 0 ) /*0xffc15b78*/\n {\n DxeIplReportStatusCode(2, 50466816); /*0xffc15b87*/\n DxeIplGetBootModeFromHob(); /*0xffc15b91*/\n return -2147483634; /*0xffc15ba4*/\n }\n DxeHandle_1 = 0; /*0xffc15b5c*/\n FvSection = DxeIplReadFvSection(v15, (int)&DxeHandle_1); /*0xffc15b60*/\n PpiStatus = PpiStatus_1; /*0xffc15b65*/\n }\n while ( FvSection < 0 ); /*0xffc15b68*/\n do /*0xffc15bdc*/\n DxeIplLocatePpiByGuid((int)&unk_FFC18D88, Vol++, PpiStatus, (int)&v17); /*0xffc15bb2*/\n while ( (*v17)(v17, DxeHandle_1, v23, &v22, v21, v18) < 0 ); /*0xffc15bdc*/\n DxeHandle = DxeHandle_1; /*0xffc15bde*/\n v16 = v19; /*0xffc15be6*/\n __sidt(v19); /*0xffc15bee*/\n (*(void ( **)(int, _BYTE *))(**(_DWORD **)(v20 - 4) + 108))(DxeHandle, v24); /*0xffc15c00*/\n DxeIplDecompressPages( /*0xffc15c2f*/\n v23[0],\n v23[1],\n v22 + (-(int)v22 & 0xFFF),\n (v22 + (unsigned __int64)(-(int)v22 & 0xFFF)) >> 32,\n v21[0],\n v21[1]);\n DxeIplTransferToDxeCore(); /*0xffc15c3f*/\n DxeIplNullStall(); /*0xffc15c47*/\n return -2147483639; /*0xffc15b9e*/\n}","refs":[{"addr":"0xffc1708f","name":"DxeIplDebugPrintGuid"},{"addr":"0xffc16085","name":"DxeIplGetPlatformBootMode"},{"addr":"0xffc16f4a","name":"DxeIplReportStatusCode"},{"addr":"0xffc15853","name":"DxeIplCheckBootMode"},{"addr":"0xffc158a3","name":"DxeIplGetNextFfsFile"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc18ac4","name":"unk_FFC18AC4"},{"addr":"0xffc159b3","name":"DxeIplDiscoverDxeCore"},{"addr":"0xffc16254","name":"DxeIplOpenFv"},{"addr":"0xffc17107","name":"DxeIplGetBootModeFromHob"},{"addr":"0xffc1627d","name":"DxeIplReadFvSection"},{"addr":"0xffc16226","name":"DxeIplLocatePpiByGuid"},{"addr":"0xffc18d88","name":"unk_FFC18D88"},{"addr":"0xffc160ea","name":"DxeIplDecompressPages"},{"addr":"0xffc15c56","name":"DxeIplTransferToDxeCore"},{"addr":"0xffc15fb3","name":"DxeIplNullStall"}]} -{"addr":"0xffc15c56","code":"int DxeIplTransferToDxeCore()\n{\n int v0; // ecx\n int v1; // ecx\n int v2; // ecx\n __int64 v4; // [esp+Ch] [ebp-10h] BYREF\n unsigned __int32 v5; // [esp+18h] [ebp-4h]\n\n sub_FFC162A8(&v4); /*0xffc15c68*/\n v5 = (unsigned __int64)(v4 + 1048544) >> 32; /*0xffc15c83*/\n __lgdt(\"G\"); /*0xffc15c90*/\n v5 = sub_FFC15D00(); /*0xffc15c9f*/\n sub_FFC1708F(v0, \"PeiEnd\"); /*0xffc15ca5*/\n sub_FFC16201(&unk_FFC18A70); /*0xffc15cb2*/\n sub_FFC17107(v1, \"PeiEnd\"); /*0xffc15cbc*/\n sub_FFC17107(v2, \"DxeIpl\"); /*0xffc15cc6*/\n __writecr3(v5); /*0xffc15cd1*/\n DxeIplFvProcessSections(v4, SHIDWORD(v4)); /*0xffc15cdc*/\n return DxeIplZeroMem(); /*0xffc15cf9*/\n}","refs":[{"addr":"0xffc162a8","name":"DxeIplFvGetFileSize"},{"addr":"0xffc15d00","name":"DxeIplCreatePageTables"},{"addr":"0xffc1708f","name":"DxeIplDebugPrintGuid"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc18a70","name":"unk_FFC18A70"},{"addr":"0xffc17107","name":"DxeIplGetBootModeFromHob"},{"addr":"0xffc157f3","name":"DxeIplFvProcessSections"},{"addr":"0xffc15298","name":"DxeIplZeroMem"}]} +{"addr":"0xffc15c56","code":"int DxeIplTransferToDxeCore()\n{\n int v0; // ecx\n int v1; // ecx\n int v2; // ecx\n __int64 v4; // [esp+Ch] [ebp-10h] BYREF\n unsigned __int32 v5; // [esp+18h] [ebp-4h]\n\n DxeIplFvGetFileSize(&v4); /*0xffc15c68*/\n v5 = (unsigned __int64)(v4 + 1048544) >> 32; /*0xffc15c83*/\n __lgdt(\"G\"); /*0xffc15c90*/\n v5 = DxeIplCreatePageTables(); /*0xffc15c9f*/\n DxeIplDebugPrintGuid(v0, \"PeiEnd\"); /*0xffc15ca5*/\n DxeIplReportStatus(&unk_FFC18A70); /*0xffc15cb2*/\n DxeIplGetBootModeFromHob(v1, \"PeiEnd\"); /*0xffc15cbc*/\n DxeIplGetBootModeFromHob(v2, \"DxeIpl\"); /*0xffc15cc6*/\n __writecr3(v5); /*0xffc15cd1*/\n DxeIplFvProcessSections(v4, SHIDWORD(v4)); /*0xffc15cdc*/\n return DxeIplZeroMem(); /*0xffc15cf9*/\n}","refs":[{"addr":"0xffc162a8","name":"DxeIplFvGetFileSize"},{"addr":"0xffc15d00","name":"DxeIplCreatePageTables"},{"addr":"0xffc1708f","name":"DxeIplDebugPrintGuid"},{"addr":"0xffc16201","name":"DxeIplReportStatus"},{"addr":"0xffc18a70","name":"unk_FFC18A70"},{"addr":"0xffc17107","name":"DxeIplGetBootModeFromHob"},{"addr":"0xffc157f3","name":"DxeIplFvProcessSections"},{"addr":"0xffc15298","name":"DxeIplZeroMem"}]} {"addr":"0xffc15d00","code":"int __thiscall DxeIplCreatePageTables(void *this)\n{\n unsigned __int8 ( **PeiServices)(int); // eax\n _WORD *i; // eax\n _WORD *Ppi; // eax\n int PhysAddrBits; // ecx\n unsigned __int8 MaxPhysAddr; // bl\n int result; // eax\n int NumPml4Entries; // esi\n __int64 v8; // rax\n __int64 NumPdptEntries; // rax\n int NumPml4Entries_2; // edx\n int Pml4Table; // eax\n unsigned int Index; // edx\n _DWORD *Pml4Table_1; // edi\n int *PdptTable_1; // eax\n int NumPml4Entries_5; // ecx\n int *PdptTable; // esi\n bool v17; // zf\n int v18; // eax\n int PageAttr_1; // edi\n int n512_5; // ecx\n unsigned int Index_2; // kr00_4\n _DWORD *Pml4Table_4; // edi\n unsigned int n512_4; // edx\n _DWORD *PdptTable_4; // edi\n _DWORD *PdptTable_5; // edx\n int v26; // eax\n unsigned int Index_3; // ecx\n int n512_3; // edi\n unsigned __int64 Index_4; // kr08_8\n unsigned int v30; // edi\n int v31; // ebx\n int PhysAddrBits_1; // [esp-4h] [ebp-54h]\n int PhysAddrBits_2; // [esp-4h] [ebp-54h]\n int Pml4Table_2; // [esp+14h] [ebp-3Ch]\n int NumPml4Entries_4; // [esp+18h] [ebp-38h]\n unsigned int n512_2; // [esp+1Ch] [ebp-34h]\n int v37; // [esp+20h] [ebp-30h] BYREF\n unsigned int NumPml4Entries_1; // [esp+24h] [ebp-2Ch]\n int NumPml4Entries_3; // [esp+28h] [ebp-28h]\n unsigned int n512_1; // [esp+2Ch] [ebp-24h]\n int *PdptTable_2; // [esp+30h] [ebp-20h]\n unsigned int n512; // [esp+34h] [ebp-1Ch]\n _DWORD *PdptTable_3; // [esp+38h] [ebp-18h]\n _DWORD *Pml4Table_3; // [esp+3Ch] [ebp-14h]\n int PageAttr; // [esp+40h] [ebp-10h]\n int Enable1GPages; // [esp+44h] [ebp-Ch]\n unsigned int Index_1; // [esp+48h] [ebp-8h]\n unsigned int p_n36; // [esp+4Ch] [ebp-4h] BYREF\n\n LOBYTE(Enable1GPages) = 0; /*0xffc15d0b*/\n PeiServices = (unsigned __int8 ( **)(int))DxeIplGetPeiBootMode(this); /*0xffc15d0e*/\n if ( PeiServices[6](4) ) /*0xffc15d15*/\n {\n DxeIplGetBootMode(0x80000000, &p_n36, PhysAddrBits_1, PhysAddrBits_1, 0); /*0xffc15d2a*/\n if ( p_n36 >= 0x80000001 ) /*0xffc15d38*/\n {\n DxeIplGetBootMode(-2147483647, 0, -2147483647, -2147483647, &v37); /*0xffc15d42*/\n if ( (v37 & 0x4000000) != 0 ) /*0xffc15d51*/\n LOBYTE(Enable1GPages) = 1; /*0xffc15d53*/\n }\n }\n i = (_WORD *)DxeIplGetPeiServices(); /*0xffc15d57*/\n Ppi = DxeIplLocatePpi(6, i); /*0xffc15d61*/\n if ( Ppi ) /*0xffc15d68*/\n {\n MaxPhysAddr = *((_BYTE *)Ppi + 8); /*0xffc15d6a*/\n }\n else\n {\n DxeIplGetBootMode(0x80000000, &p_n36, PhysAddrBits, PhysAddrBits, 0); /*0xffc15d77*/\n PhysAddrBits = -2147483640; /*0xffc15d7c*/\n if ( p_n36 < 0x80000008 ) /*0xffc15d87*/\n {\n MaxPhysAddr = 36; /*0xffc15d9c*/\n }\n else\n {\n DxeIplGetBootMode(-2147483640, &p_n36, -2147483640, -2147483640, 0); /*0xffc15d8f*/\n MaxPhysAddr = p_n36; /*0xffc15d94*/\n }\n }\n LOBYTE(Index_1) = MaxPhysAddr; /*0xffc15d9e*/\n if ( MaxPhysAddr > 0x30u ) /*0xffc15da4*/\n {\n MaxPhysAddr = 48; /*0xffc15da6*/\n LOBYTE(Index_1) = 48; /*0xffc15da8*/\n }\n if ( dword_FFC18E48 ) /*0xffc15db2*/\n {\n result = dword_FFC18E48(Index_1, Enable1GPages); /*0xffc15dba*/\n PhysAddrBits = PhysAddrBits_2; /*0xffc15dbd*/\n if ( result ) /*0xffc15dc0*/\n return result; /*0xffc15dc0*/\n }\n if ( MaxPhysAddr > 0x27u ) /*0xffc15dcc*/\n {\n NumPml4Entries_1 = MaxPhysAddr - 39; /*0xffc15e12*/\n LOBYTE(PhysAddrBits) = MaxPhysAddr - 39; /*0xffc15e15*/\n NumPdptEntries = 0x100000000LL; /*0xffc15e18*/\n if ( ((MaxPhysAddr - 39) & 0x20) == 0 ) /*0xffc15e20*/\n NumPdptEntries = 1; /*0xffc15e22*/\n NumPml4Entries = NumPdptEntries << (PhysAddrBits & 0x1F); /*0xffc15e2c*/\n NumPml4Entries_1 = NumPml4Entries; /*0xffc15e33*/\n LODWORD(NumPdptEntries) = 512; /*0xffc15e36*/\n n512 = 512; /*0xffc15e38*/\n }\n else\n {\n PhysAddrBits = 1; /*0xffc15dd3*/\n NumPml4Entries_3 = MaxPhysAddr - 30; /*0xffc15dd4*/\n NumPml4Entries = 1; /*0xffc15ddb*/\n NumPml4Entries_1 = 1; /*0xffc15ddd*/\n LOBYTE(PhysAddrBits) = MaxPhysAddr - 30; /*0xffc15de3*/\n v8 = 0x100000000LL; /*0xffc15de6*/\n if ( ((MaxPhysAddr - 30) & 0x20) == 0 ) /*0xffc15dee*/\n v8 = 1; /*0xffc15df0*/\n NumPdptEntries = v8 << (PhysAddrBits & 0x1F); /*0xffc15df8*/\n n512 = NumPdptEntries; /*0xffc15dfa*/\n }\n if ( (_BYTE)Enable1GPages ) /*0xffc15e42*/\n NumPml4Entries_2 = NumPml4Entries; /*0xffc15e4c*/\n else\n NumPml4Entries_2 = NumPml4Entries * (NumPdptEntries + 1); /*0xffc15e47*/\n Pml4Table = DxeIplAllocatePages(PhysAddrBits, NumPml4Entries_2 + 1); /*0xffc15e4f*/\n Index = 0; /*0xffc15e56*/\n PageAttr = 0; /*0xffc15e58*/\n Pml4Table_1 = (_DWORD *)Pml4Table; /*0xffc15e5b*/\n Pml4Table_2 = Pml4Table; /*0xffc15e5d*/\n PdptTable_1 = (int *)(Pml4Table + 4096); /*0xffc15e60*/\n NumPml4Entries_5 = 0; /*0xffc15e65*/\n Pml4Table_3 = (_DWORD *)Pml4Table_2; /*0xffc15e67*/\n Index_1 = 0; /*0xffc15e6a*/\n if ( !NumPml4Entries ) /*0xffc15e6f*/\n {\nLABEL_44:\n v31 = 512 - NumPml4Entries_5; /*0xffc15f95*/\n do /*0xffc15fa7*/\n {\n DxeIplSetMem32(Pml4Table_1, 8u); /*0xffc15f9a*/\n Pml4Table_1 += 2; /*0xffc15fa0*/\n --v31; /*0xffc15fa4*/\n }\n while ( v31 ); /*0xffc15fa7*/\n return Pml4Table_2; /*0xffc15fa7*/\n }\n NumPml4Entries_3 = NumPml4Entries; /*0xffc15e75*/\n NumPml4Entries_4 = NumPml4Entries; /*0xffc15e78*/\n do /*0xffc15f87*/\n {\n Pml4Table_1[1] = 0; /*0xffc15e7b*/\n PdptTable = PdptTable_1; /*0xffc15e7f*/\n *Pml4Table_1 = PdptTable_1; /*0xffc15e86*/\n *Pml4Table_1 |= 2u; /*0xffc15e88*/\n *Pml4Table_1 |= 1u; /*0xffc15e8b*/\n v17 = (_BYTE)Enable1GPages == 0; /*0xffc15e8e*/\n PdptTable_3 = PdptTable_1 + 1024; /*0xffc15e92*/\n v18 = Pml4Table_1[1]; /*0xffc15e95*/\n PdptTable_2 = PdptTable; /*0xffc15e98*/\n Pml4Table_1[1] = v18; /*0xffc15e9b*/\n if ( v17 ) /*0xffc15e9e*/\n {\n n512_4 = 0; /*0xffc15edc*/\n if ( n512 ) /*0xffc15ee0*/\n {\n PdptTable_4 = PdptTable_3; /*0xffc15ee2*/\n n512_1 = n512; /*0xffc15ee5*/\n n512_2 = n512; /*0xffc15ee8*/\n do /*0xffc15f4c*/\n {\n PdptTable[1] = 0; /*0xffc15eeb*/\n PdptTable_5 = PdptTable_4; /*0xffc15eef*/\n v26 = PdptTable[1]; /*0xffc15ef1*/\n Index_3 = Index_1; /*0xffc15efa*/\n *PdptTable = (int)PdptTable_4; /*0xffc15efd*/\n *PdptTable |= 2u; /*0xffc15eff*/\n *PdptTable |= 1u; /*0xffc15f02*/\n PdptTable_3 = PdptTable_4 + 1024; /*0xffc15f05*/\n n512_3 = 512; /*0xffc15f08*/\n PdptTable[1] = v26; /*0xffc15f0a*/\n Index_4 = __PAIR64__(PageAttr, Index_3); /*0xffc15f0d*/\n do /*0xffc15f34*/\n {\n *PdptTable_5 = Index_4 | 2; /*0xffc15f15*/\n *PdptTable_5 |= 1u; /*0xffc15f19*/\n *PdptTable_5 |= 0x80u; /*0xffc15f1c*/\n PdptTable_5[1] = HIDWORD(Index_4); /*0xffc15f28*/\n PdptTable_5 += 2; /*0xffc15f2b*/\n Index_4 += 0x200000LL; /*0xffc15f2e*/\n --n512_3; /*0xffc15f31*/\n }\n while ( n512_3 ); /*0xffc15f34*/\n PdptTable_4 = PdptTable_3; /*0xffc15f36*/\n PageAttr = HIDWORD(Index_4); /*0xffc15f39*/\n PdptTable = PdptTable_2 + 2; /*0xffc15f3f*/\n Index_1 = Index_4; /*0xffc15f42*/\n v17 = n512_1-- == 1; /*0xffc15f45*/\n PdptTable_2 += 2; /*0xffc15f49*/\n }\n while ( !v17 ); /*0xffc15f4c*/\n Pml4Table_4 = Pml4Table_3; /*0xffc15f4e*/\n if ( n512 >= 0x200 ) /*0xffc15f54*/\n goto LABEL_40; /*0xffc15f54*/\n n512_4 = n512_2; /*0xffc15f56*/\n }\n v30 = 512 - n512_4; /*0xffc15f60*/\n do /*0xffc15f72*/\n {\n DxeIplSetMem32(PdptTable, 8u); /*0xffc15f65*/\n PdptTable += 2; /*0xffc15f6b*/\n --v30; /*0xffc15f6f*/\n }\n while ( v30 ); /*0xffc15f72*/\n Pml4Table_4 = Pml4Table_3; /*0xffc15f74*/\nLABEL_40:\n Index = Index_1; /*0xffc15f77*/\n goto LABEL_41; /*0xffc15f77*/\n }\n PageAttr_1 = PageAttr; /*0xffc15ea0*/\n n512_5 = 512; /*0xffc15ea3*/\n do /*0xffc15ec9*/\n {\n *PdptTable = Index | 2; /*0xffc15eaa*/\n *PdptTable |= 1u; /*0xffc15eae*/\n *PdptTable |= 0x80u; /*0xffc15eb1*/\n PdptTable[1] = PageAttr_1; /*0xffc15ebd*/\n PdptTable += 2; /*0xffc15ec0*/\n Index_2 = Index + 0x40000000; /*0xffc15ec3*/\n PageAttr_1 = (__PAIR64__(PageAttr_1, Index) + 0x40000000) >> 32; /*0xffc15ec3*/\n Index += 0x40000000; /*0xffc15ec3*/\n --n512_5; /*0xffc15ec6*/\n }\n while ( n512_5 ); /*0xffc15ec9*/\n PageAttr = PageAttr_1; /*0xffc15ecb*/\n Pml4Table_4 = Pml4Table_3; /*0xffc15ece*/\n Index_1 = Index_2; /*0xffc15ed1*/\nLABEL_41:\n PdptTable_1 = PdptTable_3; /*0xffc15f7a*/\n Pml4Table_1 = Pml4Table_4 + 2; /*0xffc15f7d*/\n v17 = NumPml4Entries_3-- == 1; /*0xffc15f80*/\n Pml4Table_3 = Pml4Table_1; /*0xffc15f84*/\n }\n while ( !v17 ); /*0xffc15f87*/\n if ( NumPml4Entries_1 < 0x200 ) /*0xffc15f90*/\n {\n NumPml4Entries_5 = NumPml4Entries_4; /*0xffc15f92*/\n goto LABEL_44; /*0xffc15f92*/\n }\n return Pml4Table_2; /*0xffc15fac*/\n}","refs":[{"addr":"0xffc16386","name":"DxeIplGetPeiBootMode"},{"addr":"0xffc15fc8","name":"DxeIplGetBootMode"},{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc18e48","name":"CreatePageTableHook"},{"addr":"0xffc1632d","name":"DxeIplAllocatePages"},{"addr":"0xffc15328","name":"DxeIplSetMem32"}]} @@ -53,13 +53,13 @@ {"addr":"0xffc16033","code":"_WORD *DxeIplLocatePpi(__int16 n6, _WORD *i)\n{\n while ( 1 ) /*0xffc16046*/\n {\n if ( *i == 0xFFFF ) /*0xffc1604c*/\n return 0; /*0xffc16051*/\n if ( *i == n6 ) /*0xffc1603e*/\n break; /*0xffc1603e*/\n i = (_WORD *)((char *)i + (unsigned __int16)i[1]); /*0xffc16044*/\n }\n return i; /*0xffc16050*/\n}"} -{"addr":"0xffc16056","code":"_WORD *DxeIplGetBootModeGuid(int a1, _WORD *i)\n{\n _WORD *v3; // esi\n\n while ( 1 ) /*0xffc16079*/\n {\n v3 = DxeIplLocatePpi(4, i); /*0xffc16079*/\n if ( !v3 || (unsigned __int8)sub_FFC16309(a1) ) /*0xffc16062*/\n break; /*0xffc16062*/\n i = (_WORD *)((char *)v3 + (unsigned __int16)v3[1]); /*0xffc1606f*/\n }\n return v3; /*0xffc1607f*/\n}","refs":[{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"}]} +{"addr":"0xffc16056","code":"_WORD *DxeIplGetBootModeGuid(int a1, _WORD *i)\n{\n _WORD *v3; // esi\n\n while ( 1 ) /*0xffc16079*/\n {\n v3 = DxeIplLocatePpi(4, i); /*0xffc16079*/\n if ( !v3 || (unsigned __int8)DxeIplFvIsAddrValid(a1) ) /*0xffc16062*/\n break; /*0xffc16062*/\n i = (_WORD *)((char *)v3 + (unsigned __int16)v3[1]); /*0xffc1606f*/\n }\n return v3; /*0xffc1607f*/\n}","refs":[{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"}]} {"addr":"0xffc16085","code":"int DxeIplGetPlatformBootMode()\n{\n _BYTE v1[2]; // [esp+0h] [ebp-10h] BYREF\n int v2; // [esp+2h] [ebp-Eh]\n _DWORD v3[2]; // [esp+8h] [ebp-8h] BYREF\n\n v3[1] = v1; /*0xffc1608e*/\n __sidt(v1); /*0xffc16094*/\n (*(void ( **)(_DWORD, _DWORD *))(**(_DWORD **)(v2 - 4) + 40))(*(_DWORD *)(v2 - 4), v3); /*0xffc160a4*/\n return v3[0]; /*0xffc160ac*/\n}"} {"addr":"0xffc160b0","code":"int DxeIplSetBootMode(int n2, int n72)\n{\n _BYTE v3[2]; // [esp+8h] [ebp-10h] BYREF\n int v4; // [esp+Ah] [ebp-Eh]\n _DWORD v5[2]; // [esp+10h] [ebp-8h] BYREF\n\n v5[1] = v3; /*0xffc160bb*/\n __sidt(v3); /*0xffc160c1*/\n if ( (*(int ( **)(_DWORD, int, int, _DWORD *))(**(_DWORD **)(v4 - 4) + 52))(*(_DWORD *)(v4 - 4), n2, n72, v5) >= 0 ) /*0xffc160dd*/\n return v5[0]; /*0xffc160e3*/\n else\n return 0; /*0xffc160df*/\n}"} -{"addr":"0xffc160ea","code":"_DWORD *DxeIplDecompressPages(int a1, int a2, int a3, int a4, int a5, int a6)\n{\n int v6; // ecx\n int v7; // edi\n _DWORD *result; // eax\n _DWORD *v9; // esi\n\n v7 = v6; /*0xffc160f2*/\n result = (_DWORD *)DxeIplSetBootMode(2, 72); /*0xffc160f7*/\n v9 = result; /*0xffc160fc*/\n if ( result ) /*0xffc16100*/\n {\n result[2] = dword_FFC18D28; /*0xffc16108*/\n result[3] = dword_FFC18D2C; /*0xffc16111*/\n result[4] = dword_FFC18D30; /*0xffc16119*/\n result[5] = dword_FFC18D34; /*0xffc16121*/\n result[6] = a1; /*0xffc16127*/\n result[7] = a2; /*0xffc1612d*/\n result[8] = a3; /*0xffc16133*/\n result[9] = a4; /*0xffc16139*/\n result[10] = 3; /*0xffc16142*/\n DxeIplSetMem32(result + 11, 4u); /*0xffc16149*/\n sub_FFC162F0(v9 + 12, v7); /*0xffc16155*/\n v9[16] = a5; /*0xffc1615d*/\n v9[17] = a6; /*0xffc16163*/\n return (_DWORD *)a6; /*0xffc16160*/\n }\n return result; /*0xffc16166*/\n}","refs":[{"addr":"0xffc160b0","name":"DxeIplSetBootMode"},{"addr":"0xffc18d28","name":"dword_FFC18D28"},{"addr":"0xffc18d2c","name":"dword_FFC18D2C"},{"addr":"0xffc18d30","name":"dword_FFC18D30"},{"addr":"0xffc18d34","name":"dword_FFC18D34"},{"addr":"0xffc15328","name":"DxeIplSetMem32"},{"addr":"0xffc162f0","name":"DxeIplFvSetError"}]} +{"addr":"0xffc160ea","code":"_DWORD *DxeIplDecompressPages(int a1, int a2, int a3, int a4, int a5, int a6)\n{\n int v6; // ecx\n int v7; // edi\n _DWORD *result; // eax\n _DWORD *v9; // esi\n\n v7 = v6; /*0xffc160f2*/\n result = (_DWORD *)DxeIplSetBootMode(2, 72); /*0xffc160f7*/\n v9 = result; /*0xffc160fc*/\n if ( result ) /*0xffc16100*/\n {\n result[2] = dword_FFC18D28; /*0xffc16108*/\n result[3] = dword_FFC18D2C; /*0xffc16111*/\n result[4] = dword_FFC18D30; /*0xffc16119*/\n result[5] = dword_FFC18D34; /*0xffc16121*/\n result[6] = a1; /*0xffc16127*/\n result[7] = a2; /*0xffc1612d*/\n result[8] = a3; /*0xffc16133*/\n result[9] = a4; /*0xffc16139*/\n result[10] = 3; /*0xffc16142*/\n DxeIplSetMem32(result + 11, 4u); /*0xffc16149*/\n DxeIplFvSetError(v9 + 12, v7); /*0xffc16155*/\n v9[16] = a5; /*0xffc1615d*/\n v9[17] = a6; /*0xffc16163*/\n return (_DWORD *)a6; /*0xffc16160*/\n }\n return result; /*0xffc16166*/\n}","refs":[{"addr":"0xffc160b0","name":"DxeIplSetBootMode"},{"addr":"0xffc18d28","name":"dword_FFC18D28"},{"addr":"0xffc18d2c","name":"dword_FFC18D2C"},{"addr":"0xffc18d30","name":"dword_FFC18D30"},{"addr":"0xffc18d34","name":"dword_FFC18D34"},{"addr":"0xffc15328","name":"DxeIplSetMem32"},{"addr":"0xffc162f0","name":"DxeIplFvSetError"}]} {"addr":"0xffc1616a","code":"int DxeIplAllocPages(_DWORD *DxeIplPpi, int BufferSize)\n{\n int Status; // eax\n int FvEntry; // esi\n\n Status = DxeIplSetBootMode(4, BufferSize + 24); /*0xffc16175*/\n FvEntry = Status; /*0xffc1617a*/\n if ( Status ) /*0xffc1617e*/\n {\n DxeIplFvSetError((_DWORD *)(Status + 8), DxeIplPpi); /*0xffc16185*/\n return FvEntry + 24; /*0xffc1618a*/\n }\n return Status; /*0xffc1618d*/\n}","refs":[{"addr":"0xffc160b0","name":"DxeIplSetBootMode"},{"addr":"0xffc162f0","name":"DxeIplFvSetError"}]} @@ -91,7 +91,7 @@ {"addr":"0xffc163a4","code":"int __thiscall DxeIplFvOpenDevice(_DWORD **p_this)\n{\n _WORD *i_1; // eax\n _WORD *i; // eax\n _DWORD *v4; // ecx\n _WORD *i_2; // esi\n int v6; // eax\n int v8; // eax\n int v9; // eax\n\n i_1 = (_WORD *)DxeIplGetPeiServices(); /*0xffc163b0*/\n for ( i = DxeIplLocatePpi(4, i_1); ; i = DxeIplLocatePpi(4, (_WORD *)((char *)i_2 + (unsigned __int16)i_2[1])) ) /*0xffc163ba*/\n {\n i_2 = i; /*0xffc163ee*/\n if ( !i ) /*0xffc163f2*/\n {\n v6 = DxeIplAllocPages((int)dword_FFC18DB8, 404); /*0xffc163fb*/\n v4 = (_DWORD *)v6; /*0xffc16400*/\n if ( !v6 ) /*0xffc16404*/\n {\n *p_this = 0; /*0xffc16406*/\n return -2147483639; /*0xffc1640d*/\n }\n *(_DWORD *)(v6 + 4) = 0; /*0xffc16419*/\n v8 = v6 + 20; /*0xffc1641d*/\n *v4 = 1229473104; /*0xffc16420*/\n goto LABEL_11; /*0xffc16420*/\n }\n if ( DxeIplFvIsAddrValid((_DWORD *)i + 2, dword_FFC18DB8) ) /*0xffc163d0*/\n {\n v4 = i_2 + 12; /*0xffc163d9*/\n if ( *((_DWORD *)i_2 + 6) == 1229473104 ) /*0xffc163de*/\n break; /*0xffc163de*/\n }\n }\n v8 = (int)(i_2 + 22); /*0xffc1640f*/\n if ( *((_WORD **)i_2 + 8) == i_2 + 22 ) /*0xffc16415*/\n goto LABEL_12; /*0xffc16415*/\nLABEL_11:\n v4[2] = v8; /*0xffc16422*/\n v9 = v8 + 256; /*0xffc16425*/\n v4[3] = v9; /*0xffc1642a*/\n v4[4] = v9 + 64; /*0xffc16430*/\nLABEL_12:\n *p_this = v4; /*0xffc16433*/\n return 0; /*0xffc16437*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16033","name":"DxeIplLocatePpi"},{"addr":"0xffc1616a","name":"DxeIplAllocPages"},{"addr":"0xffc18db8","name":"dword_FFC18DB8"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"}]} -{"addr":"0xffc1643f","code":"int DxeIplInstallPpi(char *DxeIplPpi, int (*sub_FFC16E63)(), int (*sub_FFC16EE0)())\n{\n int Status; // eax\n _DWORD *FvDevice; // esi\n unsigned int Index; // edi\n unsigned int NumEntries; // ebx\n _DWORD *FvEntry; // ecx\n char *PpiData; // edx\n int v9; // ecx\n _DWORD *DeviceHandle; // [esp+14h] [ebp-4h] BYREF\n\n Status = DxeIplFvOpenDevice(&DeviceHandle); /*0xffc16457*/\n if ( Status >= 0 ) /*0xffc1645e*/\n {\n FvDevice = DeviceHandle; /*0xffc16464*/\n Index = 0; /*0xffc16468*/\n NumEntries = DeviceHandle[1]; /*0xffc1646a*/\n if ( NumEntries ) /*0xffc1646f*/\n {\n FvEntry = (_DWORD *)DeviceHandle[2]; /*0xffc16471*/\n PpiData = DxeIplPpi; /*0xffc16474*/\n while ( !DxeIplFvIsAddrValid(FvEntry, PpiData) ) /*0xffc1647f*/\n {\n ++Index; /*0xffc16481*/\n FvEntry = (_DWORD *)(v9 + 16); /*0xffc16482*/\n if ( Index >= NumEntries ) /*0xffc16487*/\n goto LABEL_6; /*0xffc16487*/\n }\n *(_DWORD *)(FvDevice[3] + 4 *Index) = sub_FFC16EE0; /*0xffc1649f*/\n *(_DWORD *)(FvDevice[4] + 4 *Index) = sub_FFC16E63; /*0xffc164a5*/\n }\n else\n {\nLABEL_6:\n if ( NumEntries >= 0x10 ) /*0xffc1648c*/\n return -2147483639; /*0xffc16493*/\n DxeIplFvSetError((_DWORD *)(FvDevice[2] + 16 *NumEntries), DxeIplPpi); /*0xffc164b8*/\n *(_DWORD *)(FvDevice[3] + 4 *FvDevice[1]) = sub_FFC16EE0; /*0xffc164c8*/\n *(_DWORD *)(FvDevice[4] + 4 *FvDevice[1]++) = sub_FFC16E63; /*0xffc164d5*/\n DxeIplAllocPagesBelow4G(DxeIplPpi, DxeIplPpi, 16); /*0xffc164df*/\n }\n return 0; /*0xffc164e5*/\n }\n return Status; /*0xffc164e7*/\n}","refs":[{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc162f0","name":"DxeIplFvSetError"},{"addr":"0xffc16191","name":"DxeIplAllocPagesBelow4G"}]} +{"addr":"0xffc1643f","code":"int DxeIplInstallPpi(char *DxeIplPpi, int (*DxeIplPeiEndCallback)(), int (*DxeIplPpiNotifyCallback)())\n{\n int Status; // eax\n _DWORD *FvDevice; // esi\n unsigned int Index; // edi\n unsigned int NumEntries; // ebx\n _DWORD *FvEntry; // ecx\n char *PpiData; // edx\n int v9; // ecx\n _DWORD *DeviceHandle; // [esp+14h] [ebp-4h] BYREF\n\n Status = DxeIplFvOpenDevice(&DeviceHandle); /*0xffc16457*/\n if ( Status >= 0 ) /*0xffc1645e*/\n {\n FvDevice = DeviceHandle; /*0xffc16464*/\n Index = 0; /*0xffc16468*/\n NumEntries = DeviceHandle[1]; /*0xffc1646a*/\n if ( NumEntries ) /*0xffc1646f*/\n {\n FvEntry = (_DWORD *)DeviceHandle[2]; /*0xffc16471*/\n PpiData = DxeIplPpi; /*0xffc16474*/\n while ( !DxeIplFvIsAddrValid(FvEntry, PpiData) ) /*0xffc1647f*/\n {\n ++Index; /*0xffc16481*/\n FvEntry = (_DWORD *)(v9 + 16); /*0xffc16482*/\n if ( Index >= NumEntries ) /*0xffc16487*/\n goto LABEL_6; /*0xffc16487*/\n }\n *(_DWORD *)(FvDevice[3] + 4 *Index) = DxeIplPpiNotifyCallback; /*0xffc1649f*/\n *(_DWORD *)(FvDevice[4] + 4 *Index) = DxeIplPeiEndCallback; /*0xffc164a5*/\n }\n else\n {\nLABEL_6:\n if ( NumEntries >= 0x10 ) /*0xffc1648c*/\n return -2147483639; /*0xffc16493*/\n DxeIplFvSetError((_DWORD *)(FvDevice[2] + 16 *NumEntries), DxeIplPpi); /*0xffc164b8*/\n *(_DWORD *)(FvDevice[3] + 4 *FvDevice[1]) = DxeIplPpiNotifyCallback; /*0xffc164c8*/\n *(_DWORD *)(FvDevice[4] + 4 *FvDevice[1]++) = DxeIplPeiEndCallback; /*0xffc164d5*/\n DxeIplAllocPagesBelow4G(DxeIplPpi, DxeIplPpi, 16); /*0xffc164df*/\n }\n return 0; /*0xffc164e5*/\n }\n return Status; /*0xffc164e7*/\n}","refs":[{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc162f0","name":"DxeIplFvSetError"},{"addr":"0xffc16191","name":"DxeIplAllocPagesBelow4G"}]} {"addr":"0xffc164ee","code":"int DxeIplDecompress(_DWORD *a1, int a2, int a3, int a4)\n{\n int result; // eax\n _DWORD *this_1; // ebx\n unsigned int v7; // esi\n _DWORD *v8; // edx\n _DWORD *v9; // ecx\n int v10; // ecx\n _DWORD *this; // [esp+10h] [ebp-8h] BYREF\n int v12; // [esp+14h] [ebp-4h]\n\n v12 = a2; /*0xffc164fc*/\n result = DxeIplFvOpenDevice(&this); /*0xffc16504*/\n if ( result >= 0 )\n {\n this_1 = this; /*0xffc16512*/\n v7 = 0; /*0xffc16523*/\n v8 = (_DWORD *)((char *)a1 + ((*a1 & 0xFFFFFF) != 0xFFFFFF ? 0xFFFFFFFC : 0) + 8);\n if ( this[1] ) /*0xffc1652b*/\n {\n v9 = (_DWORD *)this[2]; /*0xffc16530*/\n while ( !DxeIplFvIsAddrValid(v9, v8) ) /*0xffc1653a*/\n {\n ++v7; /*0xffc1653c*/\n v9 = (_DWORD *)(v10 + 16); /*0xffc1653d*/\n if ( v7 >= this_1[1] ) /*0xffc16543*/\n return -2147483645; /*0xffc16543*/\n }\n return (*(int ( **)(_DWORD *, int, int, int))(this_1[3] + 4 *v7))(a1, v12, a3, a4); /*0xffc1655f*/\n }\n else\n {\n return -2147483645; /*0xffc16545*/\n }\n }\n return result; /*0xffc1654a*/\n}","refs":[{"addr":"0xffc163a4","name":"DxeIplFvOpenDevice"},{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"}]} @@ -121,15 +121,15 @@ {"addr":"0xffc16fa2","code":"_WORD *DxeIplGetFvFromHob(_DWORD *a1, _DWORD *a2)\n{\n _WORD *i; // eax\n _WORD *v5; // eax\n _WORD *i_1; // eax\n _WORD *result; // eax\n void *buf; // eax\n void *buf_1; // eax\n\n i = (_WORD *)DxeIplGetPeiServices(); /*0xffc16fab*/\n v5 = DxeIplGetBootModeGuid((int)&unk_FFC18DA8, i); /*0xffc16fb9*/\n if ( v5 ) /*0xffc16fc0*/\n {\n *a1 = v5 + 12; /*0xffc16fc5*/\n i_1 = (_WORD *)DxeIplGetPeiServices(); /*0xffc16fc7*/\n result = DxeIplGetBootModeGuid((int)&unk_FFC18CF8, i_1) + 12; /*0xffc16fd8*/\n }\n else\n {\n buf = (void *)DxeIplAllocPages((int)&unk_FFC18DA8, 40008); /*0xffc16fe6*/\n *a1 = buf; /*0xffc16fed*/\n *a1 = DxeIplSetMem32(buf, 0x9C48u); /*0xffc16ff4*/\n buf_1 = (void *)DxeIplAllocPages((int)&unk_FFC18CF8, 4000); /*0xffc17002*/\n *a2 = buf_1; /*0xffc17009*/\n result = DxeIplSetMem32(buf_1, 0xFA0u); /*0xffc1700b*/\n }\n *a2 = result; /*0xffc17014*/\n return result; /*0xffc17013*/\n}","refs":[{"addr":"0xffc16008","name":"DxeIplGetPeiServices"},{"addr":"0xffc16056","name":"DxeIplGetBootModeGuid"},{"addr":"0xffc18da8","name":"unk_FFC18DA8"},{"addr":"0xffc18cf8","name":"unk_FFC18CF8"},{"addr":"0xffc1616a","name":"DxeIplAllocPages"},{"addr":"0xffc15328","name":"DxeIplSetMem32"}]} -{"addr":"0xffc1701b","code":"int __thiscall DxeIplGetPeiProtocol(_DWORD *this)\n{\n int v2; // esi\n int v3; // ebx\n\n v2 = 0; /*0xffc17030*/\n if ( *this ) /*0xffc17032*/\n {\n while ( 1 ) /*0xffc1703c*/\n {\n v3 = *this - v2 - 1; /*0xffc1703c*/\n if ( !*((_QWORD *)this + 5 *v3 + 5) && !*((_QWORD *)this + 5 *v3 + 1) && !sub_FFC188F5(7) && !sub_FFC188F5(7) ) /*0xffc17071*/\n break; /*0xffc17071*/\n if ( (unsigned int)++v2 >= *this ) /*0xffc1707e*/\n return v2; /*0xffc1707e*/\n }\n return v3; /*0xffc17086*/\n }\n return v2; /*0xffc1708a*/\n}","refs":[{"addr":"0xffc188f5","name":"DxeIplLzmaGetBit"}]} +{"addr":"0xffc1701b","code":"int __thiscall DxeIplGetPeiProtocol(_DWORD *this)\n{\n int v2; // esi\n int v3; // ebx\n\n v2 = 0; /*0xffc17030*/\n if ( *this ) /*0xffc17032*/\n {\n while ( 1 ) /*0xffc1703c*/\n {\n v3 = *this - v2 - 1; /*0xffc1703c*/\n if ( !*((_QWORD *)this + 5 *v3 + 5) && !*((_QWORD *)this + 5 *v3 + 1) && !DxeIplLzmaGetBit(7) && !DxeIplLzmaGetBit(7) ) /*0xffc17071*/\n break; /*0xffc17071*/\n if ( (unsigned int)++v2 >= *this ) /*0xffc1707e*/\n return v2; /*0xffc1707e*/\n }\n return v3; /*0xffc17086*/\n }\n return v2; /*0xffc1708a*/\n}","refs":[{"addr":"0xffc188f5","name":"DxeIplLzmaGetBit"}]} {"addr":"0xffc1708f","code":"int DxeIplDebugPrintGuid(int Guid, char *DxeIpl)\n{\n _DWORD *v2; // esi\n int v3; // ebp\n int v4; // edi\n int v5; // ebx\n char *DxeIpl_2; // eax\n int v7; // eax\n _DWORD *v9; // [esp+14h] [ebp-Ch] BYREF\n char *DxeIpl_1; // [esp+18h] [ebp-8h]\n int v11; // [esp+1Ch] [ebp-4h] BYREF\n\n DxeIpl_1 = DxeIpl; /*0xffc17095*/\n DxeIplGetFvFromHob(&v9, &v11); /*0xffc170a2*/\n v2 = v9; /*0xffc170a7*/\n v3 = *v9; /*0xffc170ab*/\n if ( *v9 >= 0x3E8u ) /*0xffc170b3*/\n return -2147483639; /*0xffc170b5*/\n v5 = 10 *v3; /*0xffc170bc*/\n *v9 = v3 + 1; /*0xffc170c2*/\n v4 = 0; /*0xffc170c4*/\n DxeIpl_2 = DxeIpl_1; /*0xffc170c6*/\n v2[v5 + 2] = 0; /*0xffc170ca*/\n v2[v5 + 3] = 0; /*0xffc170ce*/\n if ( DxeIpl_2 ) /*0xffc170d4*/\n DxeIplLzmaDecodeSymbol(DxeIpl_2); /*0xffc170dd*/\n v7 = v11; /*0xffc170e4*/\n v2[v5 + 10] = 0; /*0xffc170e8*/\n v2[v5 + 11] = 0; /*0xffc170ec*/\n *(_DWORD *)(v7 + 4 *v3) = 0; /*0xffc170f0*/\n *(_QWORD *)&v2[v5 + 8] = __rdtsc(); /*0xffc170f5*/\n return v4; /*0xffc170ff*/\n}","refs":[{"addr":"0xffc16fa2","name":"DxeIplGetFvFromHob"},{"addr":"0xffc18962","name":"DxeIplLzmaDecodeSymbol"}]} {"addr":"0xffc17107","code":"int DxeIplGetBootModeFromHob()\n{\n unsigned __int64 v2; // rax\n unsigned int v3; // ebx\n unsigned int v4; // edi\n unsigned int *v5; // esi\n unsigned int v6; // eax\n int v8; // eax\n int v9; // [esp+Ch] [ebp-8h] BYREF\n unsigned int *v10; // [esp+10h] [ebp-4h] BYREF\n\n v2 = __rdtsc(); /*0xffc17111*/\n v3 = HIDWORD(v2); /*0xffc17113*/\n v4 = v2; /*0xffc1711b*/\n DxeIplGetFvFromHob(&v10, &v9); /*0xffc1711d*/\n v5 = v10; /*0xffc17125*/\n v6 = DxeIplGetPeiProtocol(v10); /*0xffc1712b*/\n if ( v6 >= *v5 ) /*0xffc17135*/\n return -2147483634; /*0xffc17137*/\n v8 = 10 * (v6 + 1); /*0xffc1713f*/\n v5[v8] = v4; /*0xffc17142*/\n v5[v8 + 1] = v3; /*0xffc17145*/\n return 0; /*0xffc1714b*/\n}","refs":[{"addr":"0xffc16fa2","name":"DxeIplGetFvFromHob"},{"addr":"0xffc1701b","name":"DxeIplGetPeiProtocol"}]} -{"addr":"0xffc17152","code":"int DxeIplDxeIplPpiNotify(int a1, _DWORD *a2, _DWORD *a3, _WORD *a4)\n{\n int v5; // ecx\n\n if ( (*(_DWORD *)a1 & 0xFFFFFF) == 0xFFFFFF ) /*0xffc1716d*/\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, (_DWORD *)(a1 + 8)) ) /*0xffc17172*/\n return -2147483646; /*0xffc17180*/\n *a4 = *(_WORD *)(a1 + 26); /*0xffc17189*/\n v5 = *(unsigned __int16 *)(a1 + 24); /*0xffc1718c*/\n }\n else\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, (_DWORD *)(a1 + 4)) ) /*0xffc1719c*/\n return -2147483646; /*0xffc1719c*/\n *a4 = *(_WORD *)(a1 + 22); /*0xffc171a5*/\n v5 = *(unsigned __int16 *)(a1 + 20); /*0xffc171a8*/\n }\n *a2 = sub_FFC17261(a1 + v5); /*0xffc171b6*/\n *a3 = 0x10000; /*0xffc171bb*/\n return 0; /*0xffc171c3*/\n}","refs":[{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18d58","name":"DxeIplPpi"},{"addr":"0xffc17261","name":"DxeIplLzmaInitState"}]} +{"addr":"0xffc17152","code":"int DxeIplDxeIplPpiNotify(int a1, _DWORD *a2, _DWORD *a3, _WORD *a4)\n{\n int v5; // ecx\n\n if ( (*(_DWORD *)a1 & 0xFFFFFF) == 0xFFFFFF ) /*0xffc1716d*/\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, (_DWORD *)(a1 + 8)) ) /*0xffc17172*/\n return -2147483646; /*0xffc17180*/\n *a4 = *(_WORD *)(a1 + 26); /*0xffc17189*/\n v5 = *(unsigned __int16 *)(a1 + 24); /*0xffc1718c*/\n }\n else\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, (_DWORD *)(a1 + 4)) ) /*0xffc1719c*/\n return -2147483646; /*0xffc1719c*/\n *a4 = *(_WORD *)(a1 + 22); /*0xffc171a5*/\n v5 = *(unsigned __int16 *)(a1 + 20); /*0xffc171a8*/\n }\n *a2 = DxeIplLzmaInitState(a1 + v5); /*0xffc171b6*/\n *a3 = 0x10000; /*0xffc171bb*/\n return 0; /*0xffc171c3*/\n}","refs":[{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18d58","name":"DxeIplPpi"},{"addr":"0xffc17261","name":"DxeIplLzmaInitState"}]} -{"addr":"0xffc171c8","code":"int DxeIplEndOfPeiNotify(_DWORD *a1, _DWORD *a2, int a3, _DWORD *a4)\n{\n if ( (*a1 & 0xFFFFFF) == 0xFFFFFF ) /*0xffc171e3*/\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, a1 + 2) ) /*0xffc171e8*/\n return -2147483646; /*0xffc171f6*/\n *a4 = 0; /*0xffc171fb*/\n }\n else\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, a1 + 1) ) /*0xffc17211*/\n return -2147483646; /*0xffc17211*/\n *a4 = 0; /*0xffc17216*/\n }\n return sub_FFC172AC(*a2, a3); /*0xffc17234*/\n}","refs":[{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18d58","name":"DxeIplPpi"},{"addr":"0xffc172ac","name":"DxeIplLzmaInitRange"}]} +{"addr":"0xffc171c8","code":"int DxeIplEndOfPeiNotify(_DWORD *a1, _DWORD *a2, int a3, _DWORD *a4)\n{\n if ( (*a1 & 0xFFFFFF) == 0xFFFFFF ) /*0xffc171e3*/\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, a1 + 2) ) /*0xffc171e8*/\n return -2147483646; /*0xffc171f6*/\n *a4 = 0; /*0xffc171fb*/\n }\n else\n {\n if ( !DxeIplFvIsAddrValid(dword_FFC18D58, a1 + 1) ) /*0xffc17211*/\n return -2147483646; /*0xffc17211*/\n *a4 = 0; /*0xffc17216*/\n }\n return DxeIplLzmaInitRange(*a2, a3); /*0xffc17234*/\n}","refs":[{"addr":"0xffc16309","name":"DxeIplFvIsAddrValid"},{"addr":"0xffc18d58","name":"DxeIplPpi"},{"addr":"0xffc172ac","name":"DxeIplLzmaInitRange"}]} {"addr":"0xffc1723a","code":"int DxeIplGetPpiPtr(int a1, unsigned int a2)\n{\n unsigned int v2; // esi\n int result; // eax\n\n v2 = *(_DWORD *)(a1 + 12); /*0xffc17244*/\n if ( v2 < a2 ) /*0xffc17249*/\n return 0; /*0xffc1725b*/\n result = *(_DWORD *)(a1 + 8); /*0xffc1724b*/\n *(_DWORD *)(a1 + 12) = v2 - a2; /*0xffc17250*/\n *(_DWORD *)(a1 + 8) = result + a2; /*0xffc17256*/\n return result; /*0xffc1725d*/\n}"} @@ -137,7 +137,7 @@ {"addr":"0xffc17261","code":"int __thiscall DxeIplLzmaInitState(unsigned __int8 *this)\n{\n int i; // edi\n __int64 v2; // rax\n __int64 v4; // [esp+Ch] [ebp-8h]\n\n v4 = 0; /*0xffc17266*/\n for ( i = 12; i >= 5; --i ) /*0xffc17275*/\n {\n v2 = (v4 << 8) + *(this + i); /*0xffc17295*/\n v4 = v2; /*0xffc1729a*/\n }\n return v2; /*0xffc172a5*/\n}"} -{"addr":"0xffc172ac","code":"unsigned int DxeIplLzmaInitRange(unsigned __int8 *a1, int a2, int a3, int a4)\n{\n int v6; // ecx\n _DWORD v8[4]; // [esp+8h] [ebp-18h] BYREF\n int v9; // [esp+18h] [ebp-8h] BYREF\n int v10; // [esp+1Ch] [ebp-4h] BYREF\n\n v8[0] = DxeIplGetPpiPtr; /*0xffc172b9*/\n v8[1] = nullsub_2; /*0xffc172c2*/\n v8[2] = a4; /*0xffc172c9*/\n v8[3] = 0x10000; /*0xffc172cc*/\n v10 = DxeIplLzmaInitState(a1); /*0xffc172d8*/\n a4 = a2 - 13; /*0xffc172e1*/\n return sub_FFC187D2(a3, (unsigned int *)&v10, a1 + 13, (unsigned int *)&a4, (int)a1, v6, v6, &v9, (int)v8) != 0\n ? 0x80000002\n : 0;\n}","refs":[{"addr":"0xffc1723a","name":"DxeIplGetPpiPtr"},{"addr":"0xffc17260","name":"nullsub_2"},{"addr":"0xffc17261","name":"DxeIplLzmaInitState"},{"addr":"0xffc187d2","name":"DxeIplDecodeData"}]} +{"addr":"0xffc172ac","code":"unsigned int DxeIplLzmaInitRange(unsigned __int8 *a1, int a2, int a3, int a4)\n{\n int v6; // ecx\n _DWORD v8[4]; // [esp+8h] [ebp-18h] BYREF\n int v9; // [esp+18h] [ebp-8h] BYREF\n int v10; // [esp+1Ch] [ebp-4h] BYREF\n\n v8[0] = DxeIplGetPpiPtr; /*0xffc172b9*/\n v8[1] = nullsub_2; /*0xffc172c2*/\n v8[2] = a4; /*0xffc172c9*/\n v8[3] = 0x10000; /*0xffc172cc*/\n v10 = DxeIplLzmaInitState(a1); /*0xffc172d8*/\n a4 = a2 - 13; /*0xffc172e1*/\n return DxeIplDecodeData(a3, (unsigned int *)&v10, a1 + 13, (unsigned int *)&a4, (int)a1, v6, v6, &v9, (int)v8) != 0\n ? 0x80000002\n : 0;\n}","refs":[{"addr":"0xffc1723a","name":"DxeIplGetPpiPtr"},{"addr":"0xffc17260","name":"nullsub_2"},{"addr":"0xffc17261","name":"DxeIplLzmaInitState"},{"addr":"0xffc187d2","name":"DxeIplDecodeData"}]} Output truncated. Run: curl -o .ida-mcp/ca7c2ba0-fc39-45f6-bc9c-fb9dfc0baa92.json http://127.0.0.1:13388/output/ca7c2ba0-fc39-45f6-bc9c-fb9dfc0baa92.json diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPages.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPages.c index 3593044..2a06feb 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPages.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPages.c @@ -8,8 +8,8 @@ v4 = result; /*0xffc1617a*/ if ( result ) /*0xffc1617e*/ { - sub_FFC162F0((_DWORD *)(result + 8), a1); /*0xffc16185*/ + DxeIplFvSetError((_DWORD *)(result + 8), a1); /*0xffc16185*/ return v4 + 24; /*0xffc1618a*/ } return result; /*0xffc1618d*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPagesBelow4G.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPagesBelow4G.c index de61a10..c46b76f 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPagesBelow4G.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplAllocPagesBelow4G.c @@ -6,6 +6,6 @@ result = DxeIplAllocPages(v1, n64); /*0xffc16198*/ if ( result ) /*0xffc1619f*/ - return sub_FFC162D3(n64); /*0xffc161ab*/ + return DxeIplFvFreePages(n64); /*0xffc161ab*/ return result; /*0xffc161a1*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplCheckBootMode.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplCheckBootMode.c index 63544c5..8282042 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplCheckBootMode.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplCheckBootMode.c @@ -5,15 +5,15 @@ int v3; // [esp-4h] [ebp-Ch] int (__cdecl **v4)(_DWORD); // [esp+4h] [ebp-4h] BYREF - v1 = sub_FFC16226(this, &v4); /*0xffc1586b*/ + v1 = DxeIplLocatePpiByGuid(this, &v4); /*0xffc1586b*/ if ( v1 >= 0 ) /*0xffc15872*/ { - sub_FFC17107(v3, "DxeIpl"); /*0xffc1588f*/ + DxeIplGetBootModeFromHob(v3, "DxeIpl"); /*0xffc1588f*/ return (*v4)(v4); /*0xffc1589b*/ } else { - sub_FFC16F4A(-2147483646, 50532354); /*0xffc1587e*/ + DxeIplReportStatusCode(-2147483646, 50532354); /*0xffc1587e*/ return v1; /*0xffc15886*/ } -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplCreatePageTables.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplCreatePageTables.c index 37d105a..2599ce9 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplCreatePageTables.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplCreatePageTables.c @@ -51,26 +51,26 @@ unsigned int n36_1; // [esp+4Ch] [ebp-4h] BYREF LOBYTE(v45) = 0; /*0xffc15d0b*/ - v0 = sub_FFC16386(); /*0xffc15d0e*/ + v0 = DxeIplGetPeiBootMode(); /*0xffc15d0e*/ if ( (*(unsigned __int8 (__cdecl **)(int))(v0 + 24))(4) ) /*0xffc15d15*/ { - sub_FFC15FC8(0x80000000, &n36_1, v31, v31, 0); /*0xffc15d2a*/ + DxeIplGetBootMode(0x80000000, &n36_1, v31, v31, 0); /*0xffc15d2a*/ if ( n36_1 >= 0x80000001 ) /*0xffc15d38*/ { - sub_FFC15FC8(-2147483647, 0, -2147483647, -2147483647, &v36); /*0xffc15d42*/ + DxeIplGetBootMode(-2147483647, 0, -2147483647, -2147483647, &v36); /*0xffc15d42*/ if ( (v36 & 0x4000000) != 0 ) /*0xffc15d51*/ LOBYTE(v45) = 1; /*0xffc15d53*/ } } - v1 = sub_FFC16008(); /*0xffc15d57*/ - v2 = sub_FFC16033(6, v1); /*0xffc15d61*/ + v1 = DxeIplGetPeiServices(); /*0xffc15d57*/ + v2 = DxeIplLocatePpi(6, v1); /*0xffc15d61*/ if ( v2 ) /*0xffc15d68*/ { n36 = *(_BYTE *)(v2 + 8); /*0xffc15d6a*/ } else { - sub_FFC15FC8(0x80000000, &n36_1, v3, v3, 0); /*0xffc15d77*/ + DxeIplGetBootMode(0x80000000, &n36_1, v3, v3, 0); /*0xffc15d77*/ v3 = -2147483640; /*0xffc15d7c*/ if ( n36_1 < 0x80000008 ) /*0xffc15d87*/ { @@ -78,7 +78,7 @@ } else { - sub_FFC15FC8(-2147483640, &n36_1, -2147483640, -2147483640, 0); /*0xffc15d8f*/ + DxeIplGetBootMode(-2147483640, &n36_1, -2147483640, -2147483640, 0); /*0xffc15d8f*/ n36 = n36_1; /*0xffc15d94*/ } } @@ -124,7 +124,7 @@ n0x200_2 = n0x200_1; /*0xffc15e4c*/ else n0x200_2 = n0x200_1 * (n512_1 + 1); /*0xffc15e47*/ - v10 = sub_FFC1632D(v3, n0x200_2 + 1); /*0xffc15e4f*/ + v10 = DxeIplAllocatePages(v3, n0x200_2 + 1); /*0xffc15e4f*/ v11 = 0; /*0xffc15e56*/ v44 = 0; /*0xffc15e58*/ v12 = (_DWORD *)v10; /*0xffc15e5b*/ @@ -249,4 +249,4 @@ goto LABEL_44; /*0xffc15f92*/ } return v33; /*0xffc15fac*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrint.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrint.c index 54c9792..0e26698 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrint.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrint.c @@ -8,13 +8,13 @@ _DWORD *this_1; // [esp+0h] [ebp-4h] BYREF this_1 = this; /*0xffc1552b*/ - if ( sub_FFC163A4(&this_1) >= 0 ) /*0xffc15536*/ + if ( DxeIplFvOpenDevice(&this_1) >= 0 ) /*0xffc15536*/ { v1 = this_1[1]; /*0xffc1553d*/ v2 = this_1[2]; /*0xffc15540*/ if ( v1 ) /*0xffc15545*/ { - v3 = (_DWORD *)sub_FFC1634F(12 * v1); /*0xffc15553*/ + v3 = (_DWORD *)DxeIplAllocateZeroPages(12 * v1); /*0xffc15553*/ v4 = v2 + 16 * v1; /*0xffc15558*/ do /*0xffc1557a*/ { @@ -22,12 +22,12 @@ *v3 = -2147483632; /*0xffc1555d*/ v3[2] = &off_FFC18A4C; /*0xffc15565*/ v3[1] = v4; /*0xffc1556c*/ - sub_FFC16201(v3); /*0xffc1556f*/ + DxeIplReportStatus(v3); /*0xffc1556f*/ v3 += 3; /*0xffc15574*/ --v1; /*0xffc15577*/ } while ( v1 ); /*0xffc1557a*/ } } - return sub_FFC16201(&unk_FFC18A54); -} \ No newline at end of file + return DxeIplReportStatus(&unk_FFC18A54); +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrintGuid.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrintGuid.c index 4c79926..d8ec8c4 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrintGuid.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplDebugPrintGuid.c @@ -24,11 +24,11 @@ v2[v5 + 2] = 0; /*0xffc170ca*/ v2[v5 + 3] = 0; /*0xffc170ce*/ if ( DxeIpl_2 ) /*0xffc170d4*/ - sub_FFC18962(DxeIpl_2); /*0xffc170dd*/ + DxeIplLzmaDecodeSymbol(DxeIpl_2); /*0xffc170dd*/ v7 = v11; /*0xffc170e4*/ v2[v5 + 10] = 0; /*0xffc170e8*/ v2[v5 + 11] = 0; /*0xffc170ec*/ *(_DWORD *)(v7 + 4 * v3) = 0; /*0xffc170f0*/ *(_QWORD *)&v2[v5 + 8] = __rdtsc(); /*0xffc170f5*/ return v4; /*0xffc170ff*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplDecompressPages.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplDecompressPages.c index 032c66b..9d086b8 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplDecompressPages.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplDecompressPages.c @@ -21,10 +21,10 @@ result[9] = a4; /*0xffc16139*/ result[10] = 3; /*0xffc16142*/ DxeIplSetMem32(result + 11, 4u); /*0xffc16149*/ - sub_FFC162F0(v9 + 12, v7); /*0xffc16155*/ + DxeIplFvSetError(v9 + 12, v7); /*0xffc16155*/ v9[16] = a5; /*0xffc1615d*/ v9[17] = a6; /*0xffc16163*/ return (_DWORD *)a6; /*0xffc16160*/ } return result; /*0xffc16166*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplDiscoverDxeCore.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplDiscoverDxeCore.c index f993cb2..5cc476e 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplDiscoverDxeCore.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplDiscoverDxeCore.c @@ -10,13 +10,13 @@ int (__cdecl **v9)(_DWORD, const __int16 *, void *, _DWORD, unsigned int *, _BYTE *); // [esp+14h] [ebp-88h] BYREF _BYTE v10[132]; // [esp+18h] [ebp-84h] BYREF - for ( i = (_WORD *)sub_FFC16008(); ; *i = -2 ) /*0xffc159bf*/ + for ( i = (_WORD *)DxeIplGetPeiServices(); ; *i = -2 ) /*0xffc159bf*/ { - i = (_WORD *)sub_FFC16056(&unk_FFC18CC8, i); /*0xffc159d7*/ + i = (_WORD *)DxeIplGetBootModeGuid(&unk_FFC18CC8, i); /*0xffc159d7*/ if ( !i ) /*0xffc159de*/ break; /*0xffc159de*/ } - if ( sub_FFC16226(v3, &v9) < 0 ) /*0xffc159fb*/ + if ( DxeIplLocatePpiByGuid(v3, &v9) < 0 ) /*0xffc159fb*/ goto LABEL_13; /*0xffc159fb*/ n128 = 128; /*0xffc159fd*/ PreviousMemoryTypeInformation = L"PreviousMemoryTypeInformation"; /*0xffc15a05*/ @@ -35,6 +35,6 @@ n64 = n64; /*0xffc15a78*/ n128 = n64; /*0xffc15a83*/ } - sub_FFC16191(n64); /*0xffc15a8c*/ - return sub_FFC16191(16); /*0xffc15a9e*/ -} \ No newline at end of file + DxeIplAllocPagesBelow4G(n64); /*0xffc15a8c*/ + return DxeIplAllocPagesBelow4G(16); /*0xffc15a9e*/ +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplDxeIplPpiNotify.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplDxeIplPpiNotify.c index d6dba48..164f3dc 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplDxeIplPpiNotify.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplDxeIplPpiNotify.c @@ -17,7 +17,7 @@ *a4 = *(_WORD *)(a1 + 22); /*0xffc171a5*/ v5 = *(unsigned __int16 *)(a1 + 20); /*0xffc171a8*/ } - *a2 = sub_FFC17261(a1 + v5); /*0xffc171b6*/ + *a2 = DxeIplLzmaInitState(a1 + v5); /*0xffc171b6*/ *a3 = 0x10000; /*0xffc171bb*/ return 0; /*0xffc171c3*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplEndOfPeiNotify.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplEndOfPeiNotify.c index ed607a8..cb6442f 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplEndOfPeiNotify.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplEndOfPeiNotify.c @@ -13,5 +13,5 @@ return -2147483646; /*0xffc17211*/ *a4 = 0; /*0xffc17216*/ } - return sub_FFC172AC(*a2, a3); /*0xffc17234*/ + return DxeIplLzmaInitRange(*a2, a3); /*0xffc17234*/ } \ No newline at end of file diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplEntry.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplEntry.c index 0f61464..7d14b31 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplEntry.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplEntry.c @@ -26,15 +26,15 @@ v4 = 0; /*0xffc15abd*/ v5 = 0; /*0xffc15abf*/ - sub_FFC1708F(v3, "DxeIpl"); /*0xffc15ac1*/ + DxeIplDebugPrintGuid(v3, "DxeIpl"); /*0xffc15ac1*/ (*(void (__cdecl **)(int, int, int, _DWORD, _DWORD, _DWORD))(*(_DWORD *)a2 + 88))(a2, 1, 50466817, 0, 0, 0); /*0xffc15ad9*/ - n32 = sub_FFC16085(); /*0xffc15adf*/ + n32 = DxeIplGetPlatformBootMode(); /*0xffc15adf*/ n32_1 = n32; /*0xffc15ae4*/ if ( n32 == 17 ) /*0xffc15ae9*/ { if ( DxeIplCheckBootMode() < 0 ) /*0xffc15af2*/ { - sub_FFC16F4A(-2147483646, 50532357); /*0xffc15b01*/ + DxeIplReportStatusCode(-2147483646, 50532357); /*0xffc15b01*/ v16 = v19; /*0xffc15b0d*/ __sidt(v19); /*0xffc15b15*/ (*(void (__cdecl **)(_DWORD))(**(_DWORD **)(v20 - 4) + 92))(*(_DWORD *)(v20 - 4)); /*0xffc15b22*/ @@ -43,27 +43,27 @@ else if ( n32 == 32 || n32 == 18 ) /*0xffc15b30*/ { v5 = DxeIplGetNextFfsFile(); /*0xffc15b37*/ - n32_1 = sub_FFC16085(); /*0xffc15b3e*/ + n32_1 = DxeIplGetPlatformBootMode(); /*0xffc15b3e*/ } - sub_FFC16201(&unk_FFC18AC4); /*0xffc15b45*/ + DxeIplReportStatus(&unk_FFC18AC4); /*0xffc15b45*/ DxeIplDiscoverDxeCore(n32_1); /*0xffc15b4c*/ do /*0xffc15b68*/ { - v10 = sub_FFC16254(v5++, &v15); /*0xffc15b70*/ + v10 = DxeIplOpenFv(v5++, &v15); /*0xffc15b70*/ if ( v10 < 0 ) /*0xffc15b78*/ { - sub_FFC16F4A(-2147483646, 50466816); /*0xffc15b87*/ - sub_FFC17107(); /*0xffc15b91*/ + DxeIplReportStatusCode(-2147483646, 50466816); /*0xffc15b87*/ + DxeIplGetBootModeFromHob(); /*0xffc15b91*/ return -2147483634; /*0xffc15ba4*/ } v14 = 0; /*0xffc15b5c*/ - v8 = sub_FFC1627D(&v14); /*0xffc15b60*/ + v8 = DxeIplReadFvSection(&v14); /*0xffc15b60*/ v9 = v13; /*0xffc15b65*/ } while ( v8 < 0 ); /*0xffc15b68*/ do /*0xffc15bdc*/ { - sub_FFC16226(v9, &v17); /*0xffc15bb2*/ + DxeIplLocatePpiByGuid(v9, &v17); /*0xffc15bb2*/ ++v4; /*0xffc15bbb*/ } while ( (*v17)(v17, v14, v24, &v23, &v21, v18) < 0 ); /*0xffc15bdc*/ @@ -71,7 +71,7 @@ v16 = v19; /*0xffc15be6*/ __sidt(v19); /*0xffc15bee*/ (*(void (__cdecl **)(int, _BYTE *))(**(_DWORD **)(v20 - 4) + 108))(v12, v25); /*0xffc15c00*/ - sub_FFC160EA( /*0xffc15c2f*/ + DxeIplDecompressPages( /*0xffc15c2f*/ v25, v24[0], v24[1], @@ -79,7 +79,7 @@ (v23 + (unsigned __int64)(-(int)v23 & 0xFFF)) >> 32, v21, v22); - sub_FFC15C56(v21, v22, a3); /*0xffc15c3f*/ - sub_FFC15FB3(); /*0xffc15c47*/ + DxeIplTransferToDxeCore(v21, v22, a3); /*0xffc15c3f*/ + DxeIplNullStall(); /*0xffc15c47*/ return -2147483639; /*0xffc15b9e*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvExtractSection.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvExtractSection.c index 72ca424..2ef5c4b 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvExtractSection.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvExtractSection.c @@ -29,28 +29,28 @@ } if ( (_BYTE)a2 ) /*0xffc15729*/ { - if ( (unsigned __int8)a2 != 1 || (int)sub_FFC16D80(&v14, &a2) < 0 ) /*0xffc15745*/ + if ( (unsigned __int8)a2 != 1 || (int)DxeIplLzmaGetProp(&v14, &a2) < 0 ) /*0xffc15745*/ return -2147483634; /*0xffc15745*/ - v9 = sub_FFC1632D(v13, (a2 >> 12) + ((a2 & 0xFFF) != 0)); /*0xffc15764*/ + v9 = DxeIplAllocatePages(v13, (a2 >> 12) + ((a2 & 0xFFF) != 0)); /*0xffc15764*/ if ( v9 ) /*0xffc15768*/ { v6 = v14; /*0xffc1576a*/ - v10 = sub_FFC1632D(v8, (v14 >> 12) + ((v14 & 0xFFF) != 0) + 1); /*0xffc1577e*/ + v10 = DxeIplAllocatePages(v8, (v14 >> 12) + ((v14 & 0xFFF) != 0) + 1); /*0xffc1577e*/ if ( v10 ) /*0xffc15787*/ { v11 = v10 + 4092; /*0xffc15789*/ - if ( (int)sub_FFC16DAF(v9, 1) < 0 ) /*0xffc1579f*/ + if ( (int)DxeIplLzmaDecodeProp(v9, 1) < 0 ) /*0xffc1579f*/ return -2147483634; /*0xffc157a6*/ goto LABEL_16; /*0xffc1579f*/ } } return -2147483639; /*0xffc157cc*/ } - v12 = sub_FFC1632D(n13, (v6 >> 12) + ((v6 & 0xFFF) != 0) + 1); /*0xffc157bc*/ + v12 = DxeIplAllocatePages(n13, (v6 >> 12) + ((v6 & 0xFFF) != 0) + 1); /*0xffc157bc*/ if ( !v12 ) /*0xffc157c5*/ return -2147483639; /*0xffc157c5*/ v11 = v12 + 4092; /*0xffc157ce*/ - sub_FFC162D3(v6); /*0xffc157d9*/ + DxeIplFvFreePages(v6); /*0xffc157d9*/ LABEL_16: *a4 = v6; /*0xffc157df*/ *a3 = v11; /*0xffc157e9*/ diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvProcessSections.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvProcessSections.c index 686e17e..7acb255 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvProcessSections.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvProcessSections.c @@ -5,15 +5,15 @@ int result; // eax int v4; // esi - for ( i = sub_FFC16008(); ; i = v4 + *(unsigned __int16 *)(v4 + 2) ) /*0xffc157f9*/ + for ( i = DxeIplGetPeiServices(); ; i = v4 + *(unsigned __int16 *)(v4 + 2) ) /*0xffc157f9*/ { - result = sub_FFC16033(2, i); /*0xffc15817*/ + result = DxeIplLocatePpi(2, i); /*0xffc15817*/ v4 = result; /*0xffc1581c*/ if ( !result ) /*0xffc15820*/ break; /*0xffc15820*/ - if ( (unsigned __int8)sub_FFC16309(&unk_FFC18CD8) ) /*0xffc15805*/ + if ( (unsigned __int8)DxeIplFvIsAddrValid(&unk_FFC18CD8) ) /*0xffc15805*/ { - sub_FFC161B3(*(_DWORD *)(v4 + 24), *(_DWORD *)(v4 + 28), *(_DWORD *)(v4 + 32), *(_DWORD *)(v4 + 36)); /*0xffc15830*/ + DxeIplFreePages(*(_DWORD *)(v4 + 24), *(_DWORD *)(v4 + 28), *(_DWORD *)(v4 + 32), *(_DWORD *)(v4 + 36)); /*0xffc15830*/ *(_DWORD *)(v4 + 36) = 0; /*0xffc1583c*/ *(_DWORD *)(v4 + 24) = a1; /*0xffc15840*/ *(_DWORD *)(v4 + 28) = a2; /*0xffc15847*/ @@ -22,4 +22,4 @@ } } return result; /*0xffc15822*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvReadSection.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvReadSection.c index db2ead9..1b4ca14 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplFvReadSection.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplFvReadSection.c @@ -14,7 +14,7 @@ unsigned int v15; // [esp+1Ch] [ebp-4h] BYREF v5 = 0; /*0xffc155d3*/ - result = sub_FFC163A4(&v12); /*0xffc155d5*/ + result = DxeIplFvOpenDevice(&v12); /*0xffc155d5*/ if ( result >= 0 ) /*0xffc155df*/ { v7 = 0; /*0xffc155ef*/ @@ -23,7 +23,7 @@ if ( v8 ) /*0xffc1560c*/ { v8 = v12[2]; /*0xffc1560e*/ - while ( !(unsigned __int8)sub_FFC16309(v8) ) /*0xffc15618*/ + while ( !(unsigned __int8)DxeIplFvIsAddrValid(v8) ) /*0xffc15618*/ { ++v7; /*0xffc1561a*/ v8 = v9 + 16; /*0xffc1561b*/ @@ -41,19 +41,19 @@ { if ( v15 ) /*0xffc15637*/ { - v5 = sub_FFC1632D(v8, (v15 >> 12) + ((v15 & 0xFFF) != 0)); /*0xffc15651*/ + v5 = DxeIplAllocatePages(v8, (v15 >> 12) + ((v15 & 0xFFF) != 0)); /*0xffc15651*/ if ( !v5 ) /*0xffc15655*/ return -2147483639; /*0xffc15655*/ } if ( (v11[0] & 1) != 0 && v13 ) /*0xffc1568d*/ { - v10 = sub_FFC1632D(v8, (v13 >> 12) + ((v13 & 0xFFF) != 0) + 1); /*0xffc156a0*/ + v10 = DxeIplAllocatePages(v8, (v13 >> 12) + ((v13 & 0xFFF) != 0) + 1); /*0xffc156a0*/ *a3 = v10; /*0xffc156a5*/ if ( !v10 ) /*0xffc156a9*/ return -2147483639; /*0xffc1565c*/ *a3 = v10 + 4092; /*0xffc156b0*/ } - result = sub_FFC164EE(v5, a5); /*0xffc156ba*/ + result = DxeIplDecompress(v5, a5); /*0xffc156ba*/ if ( result >= 0 ) /*0xffc156c3*/ { *a4 = v13; /*0xffc156cc*/ @@ -62,4 +62,4 @@ } } return result; /*0xffc156d0*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetBootModeGuid.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetBootModeGuid.c index f1ddb63..9d677b0 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetBootModeGuid.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetBootModeGuid.c @@ -6,7 +6,7 @@ while ( 1 ) /*0xffc16079*/ { v3 = DxeIplLocatePpi(4, i); /*0xffc16079*/ - if ( !v3 || (unsigned __int8)sub_FFC16309(a1) ) /*0xffc16062*/ + if ( !v3 || (unsigned __int8)DxeIplFvIsAddrValid(a1) ) /*0xffc16062*/ break; /*0xffc16062*/ i = (_WORD *)((char *)v3 + (unsigned __int16)v3[1]); /*0xffc1606f*/ } diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetNextFfsFile.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetNextFfsFile.c index b910bc7..23893cc 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetNextFfsFile.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetNextFfsFile.c @@ -15,7 +15,7 @@ _BYTE v13[6]; // [esp+20h] [ebp-8h] BYREF i_1 = 0; /*0xffc158b8*/ - v2 = sub_FFC16226(this, &v12); /*0xffc158bf*/ + v2 = DxeIplLocatePpiByGuid(this, &v12); /*0xffc158bf*/ if ( v2 >= 0 ) /*0xffc158ca*/ { *(_DWORD *)v13 = v9; /*0xffc158e3*/ @@ -24,15 +24,15 @@ } else { - sub_FFC16F4A(-2147483646, 50532358); /*0xffc158d6*/ + DxeIplReportStatusCode(-2147483646, 50532358); /*0xffc158d6*/ } if ( v2 >= 0 /*0xffc1591d*/ - && (v3 = sub_FFC16008(), (v4 = sub_FFC16056(&unk_FFC18CB8, v3)) != 0) + && (v3 = DxeIplGetPeiServices(), (v4 = DxeIplGetBootModeGuid(&unk_FFC18CB8, v3)) != 0) && !*(_BYTE *)(v4 + 32) && *(_QWORD *)(v4 + 24) ) { - sub_FFC16085(); /*0xffc15925*/ - for ( i = 0; sub_FFC16254(i, &v11) >= 0; i = i_1 ) /*0xffc1592a*/ + DxeIplGetPlatformBootMode(); /*0xffc15925*/ + for ( i = 0; DxeIplOpenFv(i, &v11) >= 0; i = i_1 ) /*0xffc1592a*/ ++i_1; /*0xffc1592e*/ } else @@ -49,14 +49,14 @@ 0, 0, 0); - v7 = sub_FFC16386(); /*0xffc15972*/ + v7 = DxeIplGetPeiBootMode(); /*0xffc15972*/ if ( (*(unsigned __int8 (__cdecl **)(int))(v7 + 24))(9) ) /*0xffc15979*/ { v12 = v9; /*0xffc15986*/ __sidt(v9); /*0xffc1598c*/ (*(void (__cdecl **)(int, _DWORD, _DWORD, _DWORD))(**(_DWORD **)(v10 - 4) + 128))(2, 0, 0, 0); /*0xffc1599c*/ - sub_FFC15FB3(); /*0xffc159a5*/ + DxeIplNullStall(); /*0xffc159a5*/ } } return i_1; /*0xffc159aa*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetPeiProtocol.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetPeiProtocol.c index 8af5276..3cd8410 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplGetPeiProtocol.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplGetPeiProtocol.c @@ -10,7 +10,7 @@ while ( 1 ) /*0xffc1703c*/ { v3 = *this - v2 - 1; /*0xffc1703c*/ - if ( !*((_QWORD *)this + 5 * v3 + 5) && !*((_QWORD *)this + 5 * v3 + 1) && !sub_FFC188F5(7) && !sub_FFC188F5(7) ) /*0xffc17071*/ + if ( !*((_QWORD *)this + 5 * v3 + 5) && !*((_QWORD *)this + 5 * v3 + 1) && !DxeIplLzmaGetBit(7) && !DxeIplLzmaGetBit(7) ) /*0xffc17071*/ break; /*0xffc17071*/ if ( (unsigned int)++v2 >= *this ) /*0xffc1707e*/ return v2; /*0xffc1707e*/ @@ -18,4 +18,4 @@ return v3; /*0xffc17086*/ } return v2; /*0xffc1708a*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplInstallPpi.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplInstallPpi.c index 8f92aed..fa9ea00 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplInstallPpi.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplInstallPpi.c @@ -1,5 +1,5 @@ /* DxeIplInstallPpi @ 0xffc1643f size=0xaf */ -int __fastcall DxeIplInstallPpi(_DWORD *a1, int (*sub_FFC16E63)(), int (*sub_FFC16EE0)()) +int __fastcall DxeIplInstallPpi(_DWORD *a1, int (*DxeIplPeiEndCallback)(), int (*DxeIplPpiNotifyCallback)()) { int result; // eax _DWORD *this_1; // esi @@ -27,8 +27,8 @@ if ( n0x10_1 >= n0x10 ) /*0xffc16487*/ goto LABEL_6; /*0xffc16487*/ } - *(_DWORD *)(this_1[3] + 4 * n0x10_1) = sub_FFC16EE0; /*0xffc1649f*/ - *(_DWORD *)(this_1[4] + 4 * n0x10_1) = sub_FFC16E63; /*0xffc164a5*/ + *(_DWORD *)(this_1[3] + 4 * n0x10_1) = DxeIplPpiNotifyCallback; /*0xffc1649f*/ + *(_DWORD *)(this_1[4] + 4 * n0x10_1) = DxeIplPeiEndCallback; /*0xffc164a5*/ } else { @@ -36,11 +36,11 @@ if ( n0x10 >= 0x10 ) /*0xffc1648c*/ return -2147483639; /*0xffc16493*/ DxeIplFvSetError((_DWORD *)(this_1[2] + 16 * n0x10), a1); /*0xffc164b8*/ - *(_DWORD *)(this_1[3] + 4 * this_1[1]) = sub_FFC16EE0; /*0xffc164c8*/ - *(_DWORD *)(this_1[4] + 4 * this_1[1]++) = sub_FFC16E63; /*0xffc164d5*/ + *(_DWORD *)(this_1[3] + 4 * this_1[1]) = DxeIplPpiNotifyCallback; /*0xffc164c8*/ + *(_DWORD *)(this_1[4] + 4 * this_1[1]++) = DxeIplPeiEndCallback; /*0xffc164d5*/ DxeIplAllocPagesBelow4G(16); /*0xffc164df*/ } return 0; /*0xffc164e5*/ } return result; /*0xffc164e7*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplLzmaInitRange.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplLzmaInitRange.c index b66077e..d068c56 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplLzmaInitRange.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplLzmaInitRange.c @@ -12,7 +12,7 @@ v8[3] = 0x10000; /*0xffc172cc*/ v10 = DxeIplLzmaInitState(a1); /*0xffc172d8*/ a4 = a2 - 13; /*0xffc172e1*/ - return sub_FFC187D2(a3, (unsigned int *)&v10, a1 + 13, (unsigned int *)&a4, (int)a1, v6, v6, &v9, (int)v8) != 0 + return DxeIplDecodeData(a3, (unsigned int *)&v10, a1 + 13, (unsigned int *)&a4, (int)a1, v6, v6, &v9, (int)v8) != 0 ? 0x80000002 : 0; -} \ No newline at end of file +} diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplTransferToDxeCore.c b/MdeModulePkg/Core/DxeIplPeim/DxeIplTransferToDxeCore.c index 90a1ebc..70efc38 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplTransferToDxeCore.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplTransferToDxeCore.c @@ -7,15 +7,15 @@ __int64 v4; // [esp+Ch] [ebp-10h] BYREF unsigned __int32 v5; // [esp+18h] [ebp-4h] - sub_FFC162A8(&v4); /*0xffc15c68*/ + DxeIplFvGetFileSize(&v4); /*0xffc15c68*/ v5 = (unsigned __int64)(v4 + 1048544) >> 32; /*0xffc15c83*/ __lgdt("G"); /*0xffc15c90*/ - v5 = sub_FFC15D00(); /*0xffc15c9f*/ - sub_FFC1708F(v0, "PeiEnd"); /*0xffc15ca5*/ - sub_FFC16201(&unk_FFC18A70); /*0xffc15cb2*/ - sub_FFC17107(v1, "PeiEnd"); /*0xffc15cbc*/ - sub_FFC17107(v2, "DxeIpl"); /*0xffc15cc6*/ + v5 = DxeIplCreatePageTables(); /*0xffc15c9f*/ + DxeIplDebugPrintGuid(v0, "PeiEnd"); /*0xffc15ca5*/ + DxeIplReportStatus(&unk_FFC18A70); /*0xffc15cb2*/ + DxeIplGetBootModeFromHob(v1, "PeiEnd"); /*0xffc15cbc*/ + DxeIplGetBootModeFromHob(v2, "DxeIpl"); /*0xffc15cc6*/ __writecr3(v5); /*0xffc15cd1*/ DxeIplFvProcessSections(v4, SHIDWORD(v4)); /*0xffc15cdc*/ return DxeIplZeroMem(); /*0xffc15cf9*/ -} \ No newline at end of file +} diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.c index 8691dd6..4a25a60 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.c @@ -174,7 +174,7 @@ } /** - CapsuleRuntimeDxeDriverEntryPoint (sub_1194) + CapsuleRuntimeDxeDriverEntryPoint Initializes global state: saves ImageHandle, SystemTable, BootServices, RuntimeServices; creates VirtualAddressChange and ExitBootServices events; @@ -293,7 +293,7 @@ } // --------------------------------------------------------------------------- -// CapsuleUpdateCapsule (sub_14FC) +// CapsuleUpdateCapsule // --------------------------------------------------------------------------- /** @@ -410,7 +410,7 @@ } // --------------------------------------------------------------------------- -// CapsuleQueryCapsuleCapabilities (sub_1608) +// CapsuleQueryCapsuleCapabilities // --------------------------------------------------------------------------- /** @@ -490,7 +490,7 @@ } // --------------------------------------------------------------------------- -// IsCapspaceGuidEqual (sub_1710) +// IsCapspaceGuidEqual // --------------------------------------------------------------------------- /** @@ -521,7 +521,7 @@ } // --------------------------------------------------------------------------- -// ReadUnaligned64 (sub_1778) +// ReadUnaligned64 // --------------------------------------------------------------------------- /** @@ -541,7 +541,7 @@ } // --------------------------------------------------------------------------- -// GetCapsuleRuntimeProtocol (sub_17A8) +// GetCapsuleRuntimeProtocol // --------------------------------------------------------------------------- /** @@ -588,7 +588,7 @@ } // --------------------------------------------------------------------------- -// DebugAssert (sub_1830) +// DebugAssert // --------------------------------------------------------------------------- /** @@ -654,7 +654,7 @@ } // --------------------------------------------------------------------------- -// DebugPrint (sub_18B0) +// DebugPrint // --------------------------------------------------------------------------- /** @@ -687,7 +687,7 @@ } // --------------------------------------------------------------------------- -// VirtualAddressChangeEvent (sub_18F0) +// VirtualAddressChangeEvent // --------------------------------------------------------------------------- /** @@ -710,7 +710,7 @@ } // --------------------------------------------------------------------------- -// ExitBootServicesEvent (sub_18FC) +// ExitBootServicesEvent // --------------------------------------------------------------------------- /** @@ -735,7 +735,7 @@ } // --------------------------------------------------------------------------- -// GetHobList (sub_1924) +// GetHobList // --------------------------------------------------------------------------- /** @@ -788,7 +788,7 @@ } // --------------------------------------------------------------------------- -// CheckCapsuleType (sub_1A04) +// CheckCapsuleType // --------------------------------------------------------------------------- /** @@ -838,7 +838,7 @@ } // --------------------------------------------------------------------------- -// RuntimeCapsuleEvent (sub_1A94) +// RuntimeCapsuleEvent // --------------------------------------------------------------------------- /** @@ -861,7 +861,7 @@ } // --------------------------------------------------------------------------- -// CapsuleRuntimeVariableEvent (sub_1A8C) +// CapsuleRuntimeVariableEvent // --------------------------------------------------------------------------- /** @@ -883,7 +883,7 @@ } // --------------------------------------------------------------------------- -// AsmCpuid (sub_1020) +// AsmCpuid // --------------------------------------------------------------------------- /** @@ -930,4 +930,4 @@ } return RetValue; -} \ No newline at end of file +} diff --git a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.c b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.c index 545065b..f6a0c21 100644 --- a/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.c +++ b/MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.c @@ -19,7 +19,7 @@ * Universal/Disk/RamDiskDxe. * * The binary contains 117 functions, of which 116 are compiler-generated - * sub_* helpers and 1 is _ModuleEntryPoint (renamed). Key entry points: + * * helpers and 1 is _ModuleEntryPoint (renamed). Key entry points: * * 0x464 _ModuleEntryPoint - UEFI DXE entry point * 0x4DC EfiDriverEntry - saves ImageHandle/SystemTable/BS/RT, @@ -53,7 +53,7 @@ * These are compiler-generated wrappers found in the UEFI tree. *============================================================================*/ -/* sub_390: ZeroMem - zero a buffer via aligned memset */ +/* 390: ZeroMem - zero a buffer via aligned memset */ VOID * ZeroMem ( VOID *Buffer, @@ -65,7 +65,7 @@ return Buffer; } -/* sub_25AC: GetDebugProtocol - retrieve and cache EFI_DEBUG_MASK_PROTOCOL */ +/* 25AC: GetDebugProtocol - retrieve and cache EFI_DEBUG_MASK_PROTOCOL */ EFI_DEBUG_MASK_PROTOCOL * GetDebugProtocol ( VOID @@ -89,7 +89,7 @@ return gDebugMask; } -/* sub_262C: DebugPrint - DEBUG_ERROR severity print */ +/* 262C: DebugPrint - DEBUG_ERROR severity print */ VOID DebugPrint ( UINT64 ErrorLevel, @@ -106,7 +106,7 @@ VA_END (Marker); } -/* sub_26B4: DebugAssert */ +/* 26B4: DebugAssert */ VOID DebugAssert ( CONST CHAR8 *FileName, @@ -120,7 +120,7 @@ if (Proto != NULL) Proto->DebugAssert (FileName, LineNumber, Description); } -/* sub_27A4: CopyMem */ +/* 27A4: CopyMem */ VOID * CopyMem ( VOID *Dest, @@ -131,7 +131,7 @@ return memmove (Dest, Src, Length); } -/* sub_3BD8: AllocatePool */ +/* 3BD8: AllocatePool */ VOID * AllocatePool ( UINTN Size @@ -144,7 +144,7 @@ return EFI_ERROR (Status) ? NULL : Buf; } -/* sub_3C08: AllocateZeroPool */ +/* 3C08: AllocateZeroPool */ VOID * AllocateZeroPool ( UINTN Size @@ -157,7 +157,7 @@ return Buf; } -/* sub_3C34: AllocateCopyPool */ +/* 3C34: AllocateCopyPool */ VOID * AllocateCopyPool ( UINTN Size, @@ -173,7 +173,7 @@ return New; } -/* sub_3D2C: FreePool */ +/* 3D2C: FreePool */ VOID FreePool ( VOID *Buf @@ -188,7 +188,7 @@ } } -/* sub_660C: ZeroMem wrapper */ +/* 660C: ZeroMem wrapper */ VOID * ZeroMem ( VOID *Buffer, @@ -200,7 +200,7 @@ return ZeroMemAligned (Buffer, Length); } -/* sub_2984: InitializeListHead */ +/* 2984: InitializeListHead */ LIST_ENTRY * InitializeListHead ( LIST_ENTRY *Head @@ -212,7 +212,7 @@ return Head; } -/* sub_2A10: IsListEmpty */ +/* 2A10: IsListEmpty */ BOOLEAN IsListEmpty ( LIST_ENTRY *Head @@ -222,7 +222,7 @@ return Head->ForwardLink == Head; } -/* sub_2A48: RemoveEntryList */ +/* 2A48: RemoveEntryList */ LIST_ENTRY * RemoveEntryList ( LIST_ENTRY *Entry @@ -234,7 +234,7 @@ return Entry; } -/* sub_29BC: InsertTailList */ +/* 29BC: InsertTailList */ VOID InsertTailList ( LIST_ENTRY *Head, @@ -247,7 +247,7 @@ Head->BackLink = Entry; } -/* sub_2918: InternalBaseLibIsListValid */ +/* 2918: InternalBaseLibIsListValid */ BOOLEAN InternalBaseLibIsListValid ( LIST_ENTRY *Head @@ -259,7 +259,7 @@ return TRUE; } -/* sub_2B3C: ReadUnaligned64 */ +/* 2B3C: ReadUnaligned64 */ UINT64 ReadUnaligned64 ( VOID *Buf @@ -269,7 +269,7 @@ return *(UINT64 *)Buf; } -/* sub_2B0C: ReadUnaligned16 */ +/* 2B0C: ReadUnaligned16 */ UINT16 ReadUnaligned16 ( VOID *Buf @@ -279,7 +279,7 @@ return *(UINT16 *)Buf; } -/* sub_2CB4: UnicodeSPrint */ +/* 2CB4: UnicodeSPrint */ UINTN UnicodeSPrint ( CHAR16 *Buf, @@ -295,7 +295,7 @@ return UnicodeVSPrint (Buf, BufSize >> 1, 64, Fmt, Marker); } -/* sub_6B58: StrLen */ +/* 6B58: StrLen */ UINTN StrLen ( CONST CHAR16 *Str @@ -312,7 +312,7 @@ return Ptr - Str; } -/* sub_6CB8: AsciiStrLen */ +/* 6CB8: AsciiStrLen */ UINTN AsciiStrLen ( CONST CHAR8 *Str @@ -327,7 +327,7 @@ return Ptr - Str; } -/* sub_6D24: AsciiStrCmp */ +/* 6D24: AsciiStrCmp */ INTN AsciiStrCmp ( CONST CHAR8 *First, @@ -346,7 +346,7 @@ return *First - *Second; } -/* sub_273C: CompareGuid */ +/* 273C: CompareGuid */ BOOLEAN CompareGuid ( EFI_GUID *G1, @@ -363,7 +363,7 @@ return (BOOLEAN)(Front1 == Front2 && Back1 == Back2); } -/* sub_26F4: CopyGuid */ +/* 26F4: CopyGuid */ VOID * CopyGuid ( VOID *Dst, @@ -461,7 +461,7 @@ return DevPathNodeLength (Next) + (UINTN)Next - (UINTN)Path; } -/* sub_3F5C: GetDevicePathSize wrapper */ +/* 3F5C: GetDevicePathSize wrapper */ UINTN GetDevicePathSize ( VOID *Path @@ -484,7 +484,7 @@ } } -/* sub_3D70: GetDevicePathInstanceSize */ +/* 3D70: GetDevicePathInstanceSize */ UINTN GetDevicePathInstanceSize ( VOID *Path @@ -503,7 +503,7 @@ return DevPathNodeLength (Next) + (UINTN)Next - (UINTN)Path; } -/* sub_3FE4: GetDevPathNodeType */ +/* 3FE4: GetDevPathNodeType */ UINT8 GetDevPathNodeType ( VOID *Node @@ -513,7 +513,7 @@ return *(UINT8 *)Node; } -/* sub_4010: GetDevPathNodeSubType */ +/* 4010: GetDevPathNodeSubType */ UINT8 GetDevPathNodeSubType ( VOID *Node @@ -523,7 +523,7 @@ return *((UINT8 *)Node + 1); } -/* sub_4040: GetDevPathNodeLength */ +/* 4040: GetDevPathNodeLength */ UINTN GetDevPathNodeLength ( VOID *Node @@ -533,7 +533,7 @@ return ReadUnaligned16 ((UINT16 *)((UINT8 *)Node + 2)); } -/* sub_408C: GetNextDevPathNode */ +/* 408C: GetNextDevPathNode */ VOID * GetNextDevPathNode ( VOID *Node @@ -543,7 +543,7 @@ return (VOID *)((UINT8 *)Node + GetDevPathNodeLength (Node)); } -/* sub_40C4: IsDevicePathEndType */ +/* 40C4: IsDevicePathEndType */ BOOLEAN IsDevicePathEndType ( VOID *Node @@ -552,7 +552,7 @@ return (GetDevPathNodeType (Node) == END_DEVICE_PATH_TYPE); } -/* sub_4100: IsDevicePathEnd */ +/* 4100: IsDevicePathEnd */ BOOLEAN IsDevicePathEnd ( VOID *Node @@ -578,7 +578,7 @@ EFI_STATUS Status; UINT64 Registration; - /* sub_4DC: EfiDriverEntry */ + /* 4DC: EfiDriverEntry */ gImageHandle = ImageHandle; ASSERT (ImageHandle != NULL); gST = SystemTable; @@ -588,7 +588,7 @@ gRT = SystemTable->RuntimeServices; ASSERT (gRT != NULL); - /* sub_46B4: Locate HII protocols */ + /* 46B4: Locate HII protocols */ gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, 0, &gHiiString); gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, 0, &gHiiDatabase); gBS->LocateProtocol (&gEfiHiiConfigRoutingGuid, 0, &gHiiConfigRouting); @@ -603,12 +603,12 @@ ); /* Set Stop function in ImageHandle's unload */ - /* *Registration + 88 = DriverBindingStop sub_3C4 */ + /* *Registration + 88 = DriverBindingStop 3C4 */ return RamDiskDxeDriverBindingStart (NULL, NULL); } -/* sub_3C4: DriverBindingStop */ +/* 3C4: DriverBindingStop */ EFI_STATUS RamDiskDxeDriverBindingStop ( EFI_DRIVER_BINDING_PROTOCOL *This, @@ -645,7 +645,7 @@ return EFI_SUCCESS; } -/* sub_6A4: DriverBindingStart */ +/* 6A4: DriverBindingStart */ EFI_STATUS RamDiskDxeDriverBindingStart ( EFI_DRIVER_BINDING_PROTOCOL *This, @@ -693,7 +693,7 @@ return EFI_SUCCESS; } -/* sub_798: RamDiskAcpiCheck */ +/* 798: RamDiskAcpiCheck */ EFI_STATUS RamDiskAcpiCheck ( VOID @@ -737,7 +737,7 @@ * SECTION 3: RAM Disk Registration/Unregistration *============================================================================*/ -/* sub_EF8: RamDiskRegister */ +/* EF8: RamDiskRegister */ EFI_STATUS RamDiskRegister ( EFI_PHYSICAL_ADDRESS BaseAddress, @@ -803,7 +803,7 @@ return EFI_SUCCESS; } -/* sub_11EC: RamDiskUnregister */ +/* 11EC: RamDiskUnregister */ EFI_STATUS RamDiskUnregister ( EFI_HANDLE Handle @@ -867,7 +867,7 @@ return EFI_UNSUPPORTED; } -/* sub_1510: RamDiskUnregisterAll */ +/* 1510: RamDiskUnregisterAll */ VOID RamDiskUnregisterAll ( VOID @@ -906,7 +906,7 @@ } } -/* sub_146C: RamDestroyPrivate */ +/* 146C: RamDestroyPrivate */ VOID RamDestroyPrivate ( RAM_DISK_PRIVATE_DATA *Private @@ -937,7 +937,7 @@ FreePool (Private); } -/* sub_13A4: RamInstallConfigAccess */ +/* 13A4: RamInstallConfigAccess */ EFI_STATUS RamInstallConfigAccess ( RAM_DISK_PRIVATE_DATA *Private @@ -979,7 +979,7 @@ * SECTION 4: Block I/O Protocol Implementation *============================================================================*/ -/* sub_1FBC: RamDiskBlkIoReadBlocks */ +/* 1FBC: RamDiskBlkIoReadBlocks */ EFI_STATUS EFIAPI RamDiskBlkIoReadBlocks ( @@ -1007,7 +1007,7 @@ return EFI_SUCCESS; } -/* sub_20A0: RamDiskBlkIoWriteBlocks */ +/* 20A0: RamDiskBlkIoWriteBlocks */ EFI_STATUS EFIAPI RamDiskBlkIoWriteBlocks ( @@ -1036,7 +1036,7 @@ return EFI_SUCCESS; } -/* sub_22CC: RamDiskBlkIoFlushBlocks */ +/* 22CC: RamDiskBlkIoFlushBlocks */ EFI_STATUS EFIAPI RamDiskBlkIoFlushBlocks ( @@ -1049,7 +1049,7 @@ return Private->Media.ReadOnly ? EFI_WRITE_PROTECTED : EFI_SUCCESS; } -/* sub_2194: RamDiskBlkIo2ReadBlocksEx */ +/* 2194: RamDiskBlkIo2ReadBlocksEx */ EFI_STATUS EFIAPI RamDiskBlkIo2ReadBlocksEx ( @@ -1074,7 +1074,7 @@ return Status; } -/* sub_2230: RamDiskBlkIo2WriteBlocksEx */ +/* 2230: RamDiskBlkIo2WriteBlocksEx */ EFI_STATUS EFIAPI RamDiskBlkIo2WriteBlocksEx ( @@ -1099,7 +1099,7 @@ return Status; } -/* sub_1FB8: RamDiskBlkIoNoop (Reset - always EFI_SUCCESS) */ +/* 1FB8: RamDiskBlkIoNoop (Reset - always EFI_SUCCESS) */ EFI_STATUS EFIAPI RamDiskBlkIoNoop ( @@ -1114,7 +1114,7 @@ * SECTION 5: Component Name Protocol stubs *============================================================================*/ -/* sub_1610: GetDriverName stub */ +/* 1610: GetDriverName stub */ EFI_STATUS EFIAPI RamDiskGetDriverName ( @@ -1128,7 +1128,7 @@ return EFI_UNSUPPORTED; } -/* sub_1634: GetControllerName stub returning EFI_UNSUPPORTED */ +/* 1634: GetControllerName stub returning EFI_UNSUPPORTED */ EFI_STATUS EFIAPI RamDiskGetControllerName ( @@ -1147,7 +1147,7 @@ * SECTION 6: NFIT ACPI Table Publication/Renovation *============================================================================*/ -/* sub_884: RamDiskPublishNfit */ +/* 884: RamDiskPublishNfit */ EFI_STATUS RamDiskPublishNfit ( RAM_DISK_PRIVATE_DATA *Private @@ -1160,14 +1160,14 @@ * 3. Search ACPI tables for existing NFIT (signature 0x5449464E) * 4. If NFIT exists: extend with NVDIMM Region Mapping structure * 5. If NFIT missing: allocate new NFIT header + first region mapping - * 6. Update checksum via sub_2A90 + * 6. Update checksum via 2A90 * 7. Install/update table via ACPI Table Protocol * 8. Set Private->NfitPublished = TRUE */ return EFI_UNSUPPORTED; /* See protocol file for full impl */ } -/* sub_C88: RamDiskDepublishNfit */ +/* C88: RamDiskDepublishNfit */ EFI_STATUS RamDiskDepublishNfit ( RAM_DISK_PRIVATE_DATA *Private @@ -1181,7 +1181,7 @@ * SECTION 7: HII/IFR Support Functions *============================================================================*/ -/* sub_4794: RamCreateHiiPackageList */ +/* 4794: RamCreateHiiPackageList */ EFI_HII_HANDLE RamCreateHiiPackageList ( EFI_GUID *PackageListGuid, @@ -1195,7 +1195,7 @@ return NULL; } -/* sub_48D0: RamCreateOpCodeHandle */ +/* 48D0: RamCreateOpCodeHandle */ VOID * RamCreateOpCodeHandle ( VOID @@ -1218,7 +1218,7 @@ return Handle; } -/* sub_49C4: RamCreateOpCode generic */ +/* 49C4: RamCreateOpCode generic */ VOID RamCreateOpCode ( VOID *OpCodeHandle, @@ -1241,7 +1241,7 @@ /* RamAddOpCodeToHandle then CopyMem */ } -/* sub_4A78: RamCreateEndOpCode */ +/* 4A78: RamCreateEndOpCode */ VOID RamCreateEndOpCode ( VOID *OpCodeHandle @@ -1253,7 +1253,7 @@ /* RamCreateOpCode(Handle, Buf, 0x5F, 18, 3, 0) */ } -/* sub_42BC: RamDisplayPopup */ +/* 42BC: RamDisplayPopup */ VOID RamDisplayPopup ( UINTN Column, @@ -1265,95 +1265,95 @@ } /*============================================================================ - * Function Rename Map (original sub_* names -> meaningful names) + * Function Rename Map (original * names -> meaningful names) *============================================================================ - * sub_390 -> ZeroMem - * sub_3C4 -> RamDiskDxeDriverBindingStop - * sub_464 -> _ModuleEntryPoint - * sub_4DC -> EfiDriverEntry (save globals + locate HII) - * sub_6A4 -> RamDiskDxeDriverBindingStart - * sub_798 -> RamDiskAcpiCheck - * sub_884 -> RamDiskPublishNfit (NFIT ACPI table creation) - * sub_C88 -> RamDiskDepublishNfit (NFIT ACPI table removal) - * sub_EF8 -> RamDiskRegister (create + register new RAM disk) - * sub_11EC -> RamDiskUnregister (find + remove + free) - * sub_13A4 -> RamInstallConfigAccess (HII) - * sub_146C -> RamDestroyPrivate (free + cleanup) - * sub_1510 -> RamDiskUnregisterAll (clean sweep) - * sub_1610 -> RamDiskGetDriverName - * sub_1634 -> RamDiskGetControllerName - * sub_1654 -> RamDiskCreateFromFile - * sub_1890 -> RamDiskImplPopulateHii - * sub_1C2C -> RamDiskConfigAccess (HII Callback) - * sub_1FBC -> RamDiskBlkIoReadBlocks - * sub_1FB8 -> RamDiskBlkIoNoop (Reset) - * sub_20A0 -> RamDiskBlkIoWriteBlocks - * sub_2194 -> RamDiskBlkIo2ReadBlocksEx - * sub_2230 -> RamDiskBlkIo2WriteBlocksEx - * sub_22CC -> RamDiskBlkIoFlushBlocks - * sub_23F4 -> RamDiskExtractConfig - * sub_25AC -> GetDebugProtocol - * sub_262C -> DebugPrint - * sub_26B4 -> DebugAssert - * sub_26F4 -> CopyGuid - * sub_273C -> CompareGuid - * sub_27A4 -> CopyMem - * sub_2840 -> CompareMem - * sub_2918 -> InternalBaseLibIsListValid - * sub_2984 -> InitializeListHead - * sub_29BC -> InsertTailList - * sub_2A10 -> IsListEmpty - * sub_2A48 -> RemoveEntryList - * sub_2A90 -> RamCalculateChecksum - * sub_2B0C -> ReadUnaligned16 - * sub_2B3C -> ReadUnaligned64 - * sub_2B6C -> WriteUnaligned64 - * sub_2C94 -> UNICODE_STRING_TO_BUF? (sprintf) - * sub_2CB4 -> UnicodeSPrint - * sub_2D98 -> UnicodeVSPrint - * sub_3BD8 -> AllocatePool - * sub_3C08 -> AllocateZeroPool - * sub_3C34 -> AllocateCopyPool - * sub_3D2C -> FreePool - * sub_3D70 -> GetDevicePathInstanceSize - * sub_3EA8 -> FileDevicePath? - * sub_3F5C -> IsDevicePathValid / GetDevicePathSize - * sub_3FE4 -> GetDevPathNodeType - * sub_4010 -> GetDevPathNodeSubType - * sub_4040 -> GetDevPathNodeLength - * sub_408C -> GetNextDevPathNode - * sub_40C4 -> IsDevicePathEndType - * sub_4100 -> IsDevicePathEnd - * sub_4154 -> SetDevicePathNodeLength - * sub_4214 -> StrLen (UTF-16) - * sub_42BC -> RamDisplayPopup - * sub_46B4 -> LocateHiiProtocols - * sub_4794 -> RamCreateHiiPackageList - * sub_48D0 -> RamCreateOpCodeHandle - * sub_4920 -> RamAddOpCodeToHandle - * sub_49C4 -> RamCreateOpCode - * sub_4A78 -> RamCreateEndOpCode - * sub_4ACC -> RamOpCodeCompare? - * sub_4D4C -> RamUpdateForm - * sub_4FBC -> RamGetSupportedLanguage - * sub_50AC -> RamCreateStringPackage - * sub_5060 -> RamGetOneofOption? - * sub_5158 -> RamRegisterProtocol (HII) - * sub_5418 -> RamFreePool / cleanup - * sub_5664 -> RamComparator (BaseSortLib) - * sub_57D8 -> RamGetLanguageData? - * sub_59D4 -> RamLanguageIter? - * sub_5B4C -> RamLanguageFree? - * sub_5BB8 -> RamLanguageNext? - * sub_5D98 -> RamProcessLanguageList - * sub_61C0 -> RamGetFirmwareLanguage? - * sub_63E8 -> RamGetFirmwareLanguage2? - * sub_660C -> ZeroMem (wrap) - * sub_6670 -> SetMem16 - * sub_6738 -> StrSize (safe) - * sub_67A0 -> StrCpyS (safe) - * sub_696C -> AsciiStrToUnicodeStrS? - * sub_6B58 -> StrLen - * sub_6CB8 -> AsciiStrLen - * sub_6D24 -> AsciiStrCmp + * 390 -> ZeroMem + * 3C4 -> RamDiskDxeDriverBindingStop + * 464 -> _ModuleEntryPoint + * 4DC -> EfiDriverEntry (save globals + locate HII) + * 6A4 -> RamDiskDxeDriverBindingStart + * 798 -> RamDiskAcpiCheck + * 884 -> RamDiskPublishNfit (NFIT ACPI table creation) + * C88 -> RamDiskDepublishNfit (NFIT ACPI table removal) + * EF8 -> RamDiskRegister (create + register new RAM disk) + * 11EC -> RamDiskUnregister (find + remove + free) + * 13A4 -> RamInstallConfigAccess (HII) + * 146C -> RamDestroyPrivate (free + cleanup) + * 1510 -> RamDiskUnregisterAll (clean sweep) + * 1610 -> RamDiskGetDriverName + * 1634 -> RamDiskGetControllerName + * 1654 -> RamDiskCreateFromFile + * 1890 -> RamDiskImplPopulateHii + * 1C2C -> RamDiskConfigAccess (HII Callback) + * 1FBC -> RamDiskBlkIoReadBlocks + * 1FB8 -> RamDiskBlkIoNoop (Reset) + * 20A0 -> RamDiskBlkIoWriteBlocks + * 2194 -> RamDiskBlkIo2ReadBlocksEx + * 2230 -> RamDiskBlkIo2WriteBlocksEx + * 22CC -> RamDiskBlkIoFlushBlocks + * 23F4 -> RamDiskExtractConfig + * 25AC -> GetDebugProtocol + * 262C -> DebugPrint + * 26B4 -> DebugAssert + * 26F4 -> CopyGuid + * 273C -> CompareGuid + * 27A4 -> CopyMem + * 2840 -> CompareMem + * 2918 -> InternalBaseLibIsListValid + * 2984 -> InitializeListHead + * 29BC -> InsertTailList + * 2A10 -> IsListEmpty + * 2A48 -> RemoveEntryList + * 2A90 -> RamCalculateChecksum + * 2B0C -> ReadUnaligned16 + * 2B3C -> ReadUnaligned64 + * 2B6C -> WriteUnaligned64 + * 2C94 -> UNICODE_STRING_TO_BUF? (sprintf) + * 2CB4 -> UnicodeSPrint + * 2D98 -> UnicodeVSPrint + * 3BD8 -> AllocatePool + * 3C08 -> AllocateZeroPool + * 3C34 -> AllocateCopyPool + * 3D2C -> FreePool + * 3D70 -> GetDevicePathInstanceSize + * 3EA8 -> FileDevicePath? + * 3F5C -> IsDevicePathValid / GetDevicePathSize + * 3FE4 -> GetDevPathNodeType + * 4010 -> GetDevPathNodeSubType + * 4040 -> GetDevPathNodeLength + * 408C -> GetNextDevPathNode + * 40C4 -> IsDevicePathEndType + * 4100 -> IsDevicePathEnd + * 4154 -> SetDevicePathNodeLength + * 4214 -> StrLen (UTF-16) + * 42BC -> RamDisplayPopup + * 46B4 -> LocateHiiProtocols + * 4794 -> RamCreateHiiPackageList + * 48D0 -> RamCreateOpCodeHandle + * 4920 -> RamAddOpCodeToHandle + * 49C4 -> RamCreateOpCode + * 4A78 -> RamCreateEndOpCode + * 4ACC -> RamOpCodeCompare? + * 4D4C -> RamUpdateForm + * 4FBC -> RamGetSupportedLanguage + * 50AC -> RamCreateStringPackage + * 5060 -> RamGetOneofOption? + * 5158 -> RamRegisterProtocol (HII) + * 5418 -> RamFreePool / cleanup + * 5664 -> RamComparator (BaseSortLib) + * 57D8 -> RamGetLanguageData? + * 59D4 -> RamLanguageIter? + * 5B4C -> RamLanguageFree? + * 5BB8 -> RamLanguageNext? + * 5D98 -> RamProcessLanguageList + * 61C0 -> RamGetFirmwareLanguage? + * 63E8 -> RamGetFirmwareLanguage2? + * 660C -> ZeroMem (wrap) + * 6670 -> SetMem16 + * 6738 -> StrSize (safe) + * 67A0 -> StrCpyS (safe) + * 696C -> AsciiStrToUnicodeStrS? + * 6B58 -> StrLen + * 6CB8 -> AsciiStrLen + * 6D24 -> AsciiStrCmp */ \ No newline at end of file diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c/PchResetRuntime/PchResetRuntime.c b/MdeModulePkg/Universal/PCD/Pei/Service.c/PchResetRuntime/PchResetRuntime.c index 80ddb23..94b17c9 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c/PchResetRuntime/PchResetRuntime.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c/PchResetRuntime/PchResetRuntime.c @@ -662,7 +662,7 @@ { __int64 Status; // rax __int64 Status; // rax if ( !a5 ) /*0x17cc*/ sub_1574("e:\\hs\\MdePkg\\Library\\UefiLib\\UefiLib.c", 154, "Registration != ((void *) 0)"); /*0x17e1*/ - Status = (*(__int64 ( **)(__int64, __int64, __int64 ( *)()))(qword_4470 + 80))(512, 8, sub_1FE4); /*0x180a*/ + Status = (*(__int64 ( **)(__int64, __int64, __int64 ( *)()))(qword_4470 + 80))(512, 8, BootScriptNotifyDxeSmmReadyToLock); /*0x180a*/ if ( Status < 0 ) /*0x1815*/ { sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x1823*/ @@ -759,7 +759,7 @@ __int64 result; // rax __int64 Status; // rax result = qword_4490; /*0x19e8*/ if ( !qword_4490 ) /*0x19f2*/ { - Status = sub_16F8(&unk_4310, &qword_4490); /*0x1a02*/ + Status = GetSystemConfigurationTable(&unk_4310, &qword_4490); /*0x1a02*/ if ( Status < 0 ) /*0x1a0a*/ { sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x1a1b*/ @@ -843,11 +843,11 @@ { __int64 v0; // rax if ( qword_44F8 != qword_4500 ) /*0x2042*/ { - sub_1FE4(0, 0); /*0x2048*/ + BootScriptNotifyDxeSmmReadyToLock(0, 0); /*0x2048*/ v0 = qword_4500; /*0x204d*/ if ( !*(_QWORD *)qword_4500 ) /*0x2054*/ { - sub_1368(qword_4500, qword_44F8, 32); /*0x206a*/ + CopyMem(qword_4500, qword_44F8, 32); /*0x206a*/ v0 = qword_4500; /*0x206f*/ *(_BYTE *)(qword_4500 + 14) = 1; /*0x2076*/ } @@ -860,13 +860,13 @@ { __int64 v0; // rdx __int64 Status; // rax __int64 Status; // rax __int64 result; // rax v0 = qword_44F8; /*0x208e*/ *(_BYTE *)(qword_44F8 + 21) = 1; /*0x20a2*/ - Status = sub_2BA8(&unk_4408, v0, 32); /*0x20a6*/ + Status = SaveLockBox(&unk_4408, v0, 32); /*0x20a6*/ if ( Status < 0 ) /*0x20b3*/ { sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x20c1*/ sub_1574("e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", 508, "!EFI_ERROR (Status)"); /*0x20d9*/ } - Status = sub_2CEC(&unk_4408); /*0x20e5*/ + Status = SetLockBoxAttributes(&unk_4408); /*0x20e5*/ if ( Status < 0 ) /*0x20ed*/ { sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x20fc*/ @@ -888,7 +888,7 @@ sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x2167*/ sub_1574("e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", 473, "!EFI_ERROR (Status)"); /*0x217f*/ } - Status = sub_2BA8(&unk_4418, *(_QWORD *)qword_44F8, *(unsigned int *)(qword_44F8 + 16)); /*0x2199*/ + Status = SaveLockBox(&unk_4418, *(_QWORD *)qword_44F8, *(unsigned int *)(qword_44F8 + 16)); /*0x2199*/ if ( Status < 0 ) /*0x21a1*/ { sub_14EC(0x80000000LL, (__int64)"\nASSERT_EFI_ERROR (Status = %r)\n", Status); /*0x21b0*/ @@ -927,7 +927,7 @@ { __int64 Ptr; // rax __int64 v3; // rbx __int64 Status; // rax __int64 v5; // rax __int64 Status; // rax __int64 v7; // rdx __int64 v8; // rcx __int64 v9; // r8 __int64 v10; // r9 __int64 v11; // rax __int64 v12; // rax __int64 Status; // rax __int64 v14; // rbx __int64 v15; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax char v21[16]; // [rsp+30h] [rbp-10h] BYREF __int64 v22; // [rsp+80h] [rbp+40h] BYREF __int64 v23; // [rsp+88h] [rbp+48h] BYREF __int64 v24; // [rsp+90h] [rbp+50h] BYREF __int64 ( **v25)(_QWORD, __int64 *); // [rsp+98h] [rbp+58h] BYREF v23 = a2; /*0x21e8*/ v22 = a1; /*0x21ed*/ - Ptr = sub_27D8(); /*0x2203*/ + Ptr = GetPcdProtocol(); /*0x2203*/ v3 = (*(__int64 ( **)(__int64))(Ptr + 32))(137); /*0x2228*/ if ( !v3 ) /*0x2235*/ { @@ -940,7 +940,7 @@ } v3 = v24; /*0x227d*/ byte_44A0 = 1; /*0x2281*/ - v5 = sub_27D8(); /*0x2288*/ + v5 = GetPcdProtocol(); /*0x2288*/ Status = (*(__int64 ( **)(__int64, __int64))(v5 + 144))(137, v3); /*0x2293*/ if ( Status < 0 ) /*0x229c*/ { @@ -948,7 +948,7 @@ sub_1574("e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", 591, "!EFI_ERROR (Status)"); /*0x22b7*/ } sub_1408(v3, 32); /*0x22c4*/ - qword_44A8 = sub_17BC(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ + qword_44A8 = RegisterProtocolNotify(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ if ( !qword_44A8 ) /*0x22e1*/ sub_1574( /*0x22f2*/ "e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", @@ -964,7 +964,7 @@ && (_BYTE)v23 && v25[1](v25, &qword_44B0) >= 0 ) { - v11 = sub_27D8(); /*0x235b*/ + v11 = GetPcdProtocol(); /*0x235b*/ v12 = (*(__int64 ( **)(__int64))(v11 + 32))(138); /*0x2369*/ v22 = v12; /*0x236c*/ if ( !v12 ) /*0x2373*/ @@ -977,7 +977,7 @@ } v14 = v22; /*0x23b0*/ byte_44C8 = 1; /*0x23b4*/ - v15 = sub_27D8(); /*0x23bb*/ + v15 = GetPcdProtocol(); /*0x23bb*/ Status = (*(__int64 ( **)(__int64, __int64))(v15 + 144))(138, v14); /*0x23c6*/ if ( Status < 0 ) /*0x23cf*/ { @@ -1023,7 +1023,7 @@ { __int64 Ptr; // rax __int64 v3; // rbx __int64 Status; // rax __int64 v5; // rax __int64 Status; // rax __int64 v7; // rdx __int64 v8; // rcx __int64 v9; // r8 __int64 v10; // r9 __int64 v11; // rax __int64 v12; // rax __int64 Status; // rax __int64 v14; // rbx __int64 v15; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax char v21[16]; // [rsp+30h] [rbp-10h] BYREF __int64 v22; // [rsp+80h] [rbp+40h] BYREF __int64 v23; // [rsp+88h] [rbp+48h] BYREF __int64 v24; // [rsp+90h] [rbp+50h] BYREF __int64 ( **v25)(_QWORD, __int64 *); // [rsp+98h] [rbp+58h] BYREF v23 = a2; /*0x21e8*/ v22 = a1; /*0x21ed*/ - Ptr = sub_27D8(); /*0x2203*/ + Ptr = GetPcdProtocol(); /*0x2203*/ v3 = (*(__int64 ( **)(__int64))(Ptr + 32))(137); /*0x2228*/ if ( !v3 ) /*0x2235*/ { @@ -1036,7 +1036,7 @@ } v3 = v24; /*0x227d*/ byte_44A0 = 1; /*0x2281*/ - v5 = sub_27D8(); /*0x2288*/ + v5 = GetPcdProtocol(); /*0x2288*/ Status = (*(__int64 ( **)(__int64, __int64))(v5 + 144))(137, v3); /*0x2293*/ if ( Status < 0 ) /*0x229c*/ { @@ -1044,7 +1044,7 @@ sub_1574("e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", 591, "!EFI_ERROR (Status)"); /*0x22b7*/ } sub_1408(v3, 32); /*0x22c4*/ - qword_44A8 = sub_17BC(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ + qword_44A8 = RegisterProtocolNotify(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ if ( !qword_44A8 ) /*0x22e1*/ sub_1574( /*0x22f2*/ "e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", @@ -1060,7 +1060,7 @@ && (_BYTE)v23 && v25[1](v25, &qword_44B0) >= 0 ) { - v11 = sub_27D8(); /*0x235b*/ + v11 = GetPcdProtocol(); /*0x235b*/ v12 = (*(__int64 ( **)(__int64))(v11 + 32))(138); /*0x2369*/ v22 = v12; /*0x236c*/ if ( !v12 ) /*0x2373*/ @@ -1073,7 +1073,7 @@ } v14 = v22; /*0x23b0*/ byte_44C8 = 1; /*0x23b4*/ - v15 = sub_27D8(); /*0x23bb*/ + v15 = GetPcdProtocol(); /*0x23bb*/ Status = (*(__int64 ( **)(__int64, __int64))(v15 + 144))(138, v14); /*0x23c6*/ if ( Status < 0 ) /*0x23cf*/ { @@ -1119,7 +1119,7 @@ { __int64 Ptr; // rax __int64 v3; // rbx __int64 Status; // rax __int64 v5; // rax __int64 Status; // rax __int64 v7; // rdx __int64 v8; // rcx __int64 v9; // r8 __int64 v10; // r9 __int64 v11; // rax __int64 v12; // rax __int64 Status; // rax __int64 v14; // rbx __int64 v15; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax __int64 Status; // rax char v21[16]; // [rsp+30h] [rbp-10h] BYREF __int64 v22; // [rsp+80h] [rbp+40h] BYREF __int64 v23; // [rsp+88h] [rbp+48h] BYREF __int64 v24; // [rsp+90h] [rbp+50h] BYREF __int64 ( **v25)(_QWORD, __int64 *); // [rsp+98h] [rbp+58h] BYREF v23 = a2; /*0x21e8*/ v22 = a1; /*0x21ed*/ - Ptr = sub_27D8(); /*0x2203*/ + Ptr = GetPcdProtocol(); /*0x2203*/ v3 = (*(__int64 ( **)(__int64))(Ptr + 32))(137); /*0x2228*/ if ( !v3 ) /*0x2235*/ { @@ -1132,7 +1132,7 @@ } v3 = v24; /*0x227d*/ byte_44A0 = 1; /*0x2281*/ - v5 = sub_27D8(); /*0x2288*/ + v5 = GetPcdProtocol(); /*0x2288*/ Status = (*(__int64 ( **)(__int64, __int64))(v5 + 144))(137, v3); /*0x2293*/ if ( Status < 0 ) /*0x229c*/ { @@ -1140,7 +1140,7 @@ sub_1574("e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", 591, "!EFI_ERROR (Status)"); /*0x22b7*/ } sub_1408(v3, 32); /*0x22c4*/ - qword_44A8 = sub_17BC(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ + qword_44A8 = RegisterProtocolNotify(v8, v7, v9, v10, (__int64)v21); /*0x22d7*/ if ( !qword_44A8 ) /*0x22e1*/ sub_1574( /*0x22f2*/ "e:\\hs\\MdeModulePkg\\Library\\PiDxeS3BootScriptLib\\BootScriptSave.c", @@ -1156,7 +1156,7 @@ && (_BYTE)v23 && v25[1](v25, &qword_44B0) >= 0 ) { - v11 = sub_27D8(); /*0x235b*/ + v11 = GetPcdProtocol(); /*0x235b*/ v12 = (*(__int64 ( **)(__int64))(v11 + 32))(138); /*0x2369*/ v22 = v12; /*0x236c*/ if ( !v12 ) /*0x2373*/ @@ -1169,7 +1169,7 @@ } v14 = v22; /*0x23b0*/ byte_44C8 = 1; /*0x23b4*/ - v15 = sub_27D8(); /*0x23bb*/ + v15 = GetPcdProtocol(); /*0x23bb*/ Status = (*(__int64 ( **)(__int64, __int64))(v15 + 144))(138, v14); /*0x23c6*/ if ( Status < 0 ) /*0x23cf*/ { diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiConfigManager/UefiConfigManager.c b/MdePkg/Library/UefiBootServicesTableLib/UefiConfigManager/UefiConfigManager.c index 6a2e70b..c7ac434 100644 --- a/MdePkg/Library/UefiBootServicesTableLib/UefiConfigManager/UefiConfigManager.c +++ b/MdePkg/Library/UefiBootServicesTableLib/UefiConfigManager/UefiConfigManager.c @@ -14,7 +14,7 @@ * - Writes modified variables back via RuntimeServices * *WARNING: This is an auto-generated decompilation using IDA Pro. - *All function names starting with "sub_" are placeholders. Function signatures + *All function names starting with "" are placeholders. Function signatures *and data structure layouts should be verified against the original source. */ @@ -52,7 +52,7 @@ * ======================================================================== */ /* - *sub_2C0: memset implementation + *2C0: memset implementation *Fills 'count' bytes of 'buf' with 'value'. */ VOID *EFIAPI memset(VOID *buf, UINT8 value, UINTN count) @@ -63,7 +63,7 @@ } /* - *sub_300: memcpy with overlap support (CopyMem) + *300: memcpy with overlap support (CopyMem) *Copies 'count' bytes from 'src' to 'dst'. *Uses qmemcpy for aligned 8-byte blocks, then byte-by-byte for remainder. *Handles overlapping regions by copying from end if src < dst and overlapping. @@ -97,7 +97,7 @@ } /* - *sub_350: memcmp implementation (CompareMem) + *350: memcmp implementation (CompareMem) *Compares 'count' bytes of 'a1' and 'a2'. *Returns 0 if equal, or the difference of the first differing bytes. */ @@ -122,7 +122,7 @@ * ======================================================================== */ /* - *sub_2DA4: Unicode string length (StrLen) + *2DA4: Unicode string length (StrLen) *Returns the length of a null-terminated Unicode string. *Maximum length is 0xF4240 (1,000,000) characters. */ @@ -149,7 +149,7 @@ } /* - *sub_3014: ASCII string length (AsciiStrLen) + *3014: ASCII string length (AsciiStrLen) *Returns the length of a null-terminated ASCII string. */ UINTN AsciiStrLen(CONST CHAR8 *String) @@ -170,7 +170,7 @@ } /* - *sub_2ED8: Unicode string to ASCII string (UnicodeStrToAsciiStr) + *2ED8: Unicode string to ASCII string (UnicodeStrToAsciiStr) *Converts a Unicode string to an ASCII string. *Only characters < 0x100 are valid. */ @@ -207,7 +207,7 @@ } /* - *sub_31C4: ASCII string to Unicode string (AsciiStrToUnicodeStr) + *31C4: ASCII string to Unicode string (AsciiStrToUnicodeStr) *Converts an ASCII string to a Unicode string. */ UINT16 *AsciiToUnicode(CONST CHAR8 *Source, UINT16 *Destination) @@ -242,7 +242,7 @@ } /* - *sub_3104: ASCII string compare with length limit (AsciiStrnCmp) + *3104: ASCII string compare with length limit (AsciiStrnCmp) *Compares up to 'Length' characters, returns difference. */ INTN AsciiStrnCmp(CONST CHAR8 *First, CONST CHAR8 *Second, UINTN Length) @@ -269,7 +269,7 @@ } /* - *sub_3080: ASCII string compare (AsciiStrCmp) + *3080: ASCII string compare (AsciiStrCmp) *Compares two ASCII strings, returns difference of first differing character. */ INTN AsciiStrCmp(CONST CHAR8 *First, CONST CHAR8 *Second) @@ -291,7 +291,7 @@ } /* - *sub_43B8: Case-insensitive ASCII string compare + *43B8: Case-insensitive ASCII string compare *Compares two ASCII strings ignoring case. */ INTN AsciiStriCmp(CONST CHAR8 *First, CONST CHAR8 *Second) @@ -334,7 +334,7 @@ } /* - *sub_32E4: Safe Unicode string length limited to MaxSize (StrnLenS) + *32E4: Safe Unicode string length limited to MaxSize (StrnLenS) */ UINTN StrnLenS(CONST UINT16 *String, UINTN MaxSize) { @@ -354,7 +354,7 @@ } /* - *sub_333C: Safe ASCII string length limited to MaxSize (AsciiStrnLenS) + *333C: Safe ASCII string length limited to MaxSize (AsciiStrnLenS) */ UINTN AsciiStrnLenS(CONST CHAR8 *String, UINTN MaxSize) { @@ -372,7 +372,7 @@ * ======================================================================== */ /* - *sub_34B4: Core Unicode formatted print (internal). + *34B4: Core Unicode formatted print (internal). *Writes formatted output to Buffer based on a Unicode format string. *Supports standard format specifiers. * @@ -606,7 +606,7 @@ } /* - *sub_33E0: UnicodeSPrint wrapper + *33E0: UnicodeSPrint wrapper *Calls UnicodeVSPrint with the variable argument list. */ UINTN EFIAPI UnicodeSPrint( @@ -621,7 +621,7 @@ } /* - *sub_3360: ASCII SPrint wrapper for Unicode output + *3360: ASCII SPrint wrapper for Unicode output *Calls UnicodeVSPrint with a Unicode-converted format string. */ UINTN SPrint(CHAR8 *Buffer, UINTN BufferSize, CONST CHAR8 *Format, ...) @@ -647,7 +647,7 @@ * ======================================================================== */ /* - *sub_2C9C: Get HII Database Protocol pointer (cached) + *2C9C: Get HII Database Protocol pointer (cached) *Retrieves the EFI_HII_DATABASE_PROTOCOL via BootServices->LocateProtocol *and caches it in gDebugProtocol (qword_7800). */ @@ -678,7 +678,7 @@ } /* - *sub_2D64: DebugAssert - print assertion failure message + *2D64: DebugAssert - print assertion failure message *Typically called via the ASSERT() macro. */ VOID DebugAssert(CONST CHAR8 *FileName, UINTN LineNumber, CONST CHAR8 *Description) @@ -697,7 +697,7 @@ } /* - *sub_2D1C: DebugLog - conditionally print debug message + *2D1C: DebugLog - conditionally print debug message *Checks ErrorLevel against current debug mask from CMOS, *then delegates to protocol's debug print. */ @@ -719,7 +719,7 @@ } /* - *sub_5038: GetDebugLevel - Query current debug print level + *5038: GetDebugLevel - Query current debug print level *Reads CMOS RTC register 0x74 (index 0x4B) to determine enabled debug levels. *Returns bitmask matching EDKII debug levels or 0x80000006/0x80000004 fallback. */ @@ -754,7 +754,7 @@ * ======================================================================== */ /* - *sub_531C: FreePool wrapper with ASSERT on error + *531C: FreePool wrapper with ASSERT on error *Frees memory allocated via BootServices and asserts on failure. */ EFI_STATUS FreePool(CONST VOID *Buffer) @@ -770,7 +770,7 @@ } /* - *sub_5088: SetMem - fills a buffer with a byte value + *5088: SetMem - fills a buffer with a byte value *Wrapper around memset with bounds checking. */ VOID *SetMem(VOID *Buffer, UINTN Size, UINT8 Value) @@ -783,7 +783,7 @@ } /* - *sub_4480: AllocateCopyPool - allocates and copies a string + *4480: AllocateCopyPool - allocates and copies a string */ CHAR8 *AllocateCopyPool(CONST CHAR8 *String) { @@ -806,7 +806,7 @@ } /* - *sub_5148: CopyMem wrapper with overlap check + *5148: CopyMem wrapper with overlap check */ VOID *CopyMem(VOID *Destination, CONST VOID *Source, UINTN Length) { @@ -829,7 +829,7 @@ } /* - *sub_52BC: ReadUnaligned16 + *52BC: ReadUnaligned16 */ UINT16 ReadUnaligned16(CONST VOID *Buffer) { @@ -840,7 +840,7 @@ } /* - *sub_52EC: ReadUnaligned64 + *52EC: ReadUnaligned64 */ UINT64 ReadUnaligned64(CONST VOID *Buffer) { @@ -851,7 +851,7 @@ } /* - *sub_3408: SetMem16 - fills buffer with 16-bit values + *3408: SetMem16 - fills buffer with 16-bit values */ VOID *SetMem16(VOID *Buffer, UINTN Count, UINT16 Value) { @@ -868,7 +868,7 @@ } /* - *sub_51E4: CompareMem wrapper with safety checks + *51E4: CompareMem wrapper with safety checks */ INTN CompareMem(CONST VOID *DestinationBuffer, CONST VOID *SourceBuffer, UINTN Length) { @@ -897,7 +897,7 @@ * ======================================================================== */ /* - *sub_42E0: GetHobList + *42E0: GetHobList *Returns the HOB (Hand-Off Block) list pointer. *Retrieves from SystemTable->ConfigurationTable by matching GUID * (unk_6C20 / unk_6C28 - two halves of a 16-byte GUID). @@ -934,7 +934,7 @@ * ======================================================================== */ /* - *sub_44F0: ConfigNodeAlloc + *44F0: ConfigNodeAlloc *Allocates a 72-byte CONFIG_NODE, zeroes it out. */ CONFIG_NODE *ConfigNodeAlloc(VOID) @@ -954,7 +954,7 @@ } /* - *sub_453C: ConfigNodeFree - recursively free a config node tree + *453C: ConfigNodeFree - recursively free a config node tree *Walks linked list of siblings, recursively frees each node's children, *frees the Name string, and frees the node itself. */ @@ -992,7 +992,7 @@ * ======================================================================== */ /* - *sub_46CC: HexParse4 - parses 4 hex characters to value + *46CC: HexParse4 - parses 4 hex characters to value *Converts a 4-character hex string to a numeric value. */ UINTN HexParse4(CONST CHAR8 *HexStr) @@ -1021,7 +1021,7 @@ * ======================================================================== */ /* - *sub_4A98: JsonParseValue - parse a JSON value + *4A98: JsonParseValue - parse a JSON value *Dispatches based on first character of Input. *Returns pointer after the parsed value, or NULL on failure. * @@ -1078,7 +1078,7 @@ } /* - *sub_45B4: JsonParseNumber - parse a JSON number + *45B4: JsonParseNumber - parse a JSON number *Handles integers, floats (with decimal point), and exponents (e/E). *Returns pointer after the parsed number. */ @@ -1142,7 +1142,7 @@ } /* - *sub_47DC: JsonParseString - parse a JSON quoted string + *47DC: JsonParseString - parse a JSON quoted string *Handles escape sequences: \", \\, \/, \b, \f, \n, \r, \t, \uXXXX *UTF-8 encodes Unicode escape sequences (including surrogate pairs). *Returns pointer after the closing quote. @@ -1250,7 +1250,7 @@ } /* - *sub_4B88: JsonParseArray - parse a JSON array [...] + *4B88: JsonParseArray - parse a JSON array [...] */ CHAR8 *JsonParseArray(CONFIG_NODE *Node, CHAR8 *Input) { @@ -1302,7 +1302,7 @@ } /* - *sub_4C90: JsonParseObject - parse a JSON object {...} + *4C90: JsonParseObject - parse a JSON object {...} *Parses key:value pairs separated by commas. */ CHAR8 *JsonParseObject(CONFIG_NODE *Node, CHAR8 *Input) @@ -1382,7 +1382,7 @@ } /* - *sub_4A30: JsonParse - parse JSON starting from Input + *4A30: JsonParse - parse JSON starting from Input *Skips leading whitespace, then calls JsonParseValue. */ CONFIG_NODE *JsonParse(CONFIG_NODE *Container, CHAR8 *Input) @@ -1403,7 +1403,7 @@ } /* - *sub_4E5C: JsonFindKey - linear search for key in object + *4E5C: JsonFindKey - linear search for key in object *Searches the linked list children of Parent for a child with matching name. */ CONFIG_NODE *JsonFindKey(CONFIG_NODE *Parent, CONST CHAR8 *Key) @@ -1420,7 +1420,7 @@ } /* - *sub_4E98: JsonObjectAdd - add key-value pair to an object + *4E98: JsonObjectAdd - add key-value pair to an object *Appends the Value node to the end of Parent's child list, *with Key as the Name. */ @@ -1447,7 +1447,7 @@ } /* - *sub_4F38: JsonNewString - create a string config node + *4F38: JsonNewString - create a string config node */ CONFIG_NODE *JsonNewString(CONST CHAR8 *Value) { @@ -1462,7 +1462,7 @@ } /* - *sub_4F04: JsonNewInteger - create a number config node + *4F04: JsonNewInteger - create a number config node */ CONFIG_NODE *JsonNewInteger(UINT64 Value) { @@ -1481,7 +1481,7 @@ * ======================================================================== */ /* - *sub_B88: HiiGetString - retrieve a string from HII database + *B88: HiiGetString - retrieve a string from HII database *Gets the string identified by StringId from the HII handle a1 *via the HII String Protocol. */ @@ -1549,7 +1549,7 @@ * ======================================================================== */ /* - *sub_59C: GetHiiPackageListSize + *59C: GetHiiPackageListSize *Queries HII Database to get the size needed for a package list. *First calls with 0 buffer to get size, allocates, then calls again. *Returns the buffer and optionally sets *OutSize to the size in UINT16 units. @@ -1587,7 +1587,7 @@ * ======================================================================== */ /* - *sub_680: RegisterVarStoreNodeMapping + *680: RegisterVarStoreNodeMapping *Registers a varstore mapping: VarId, DataBuffer, and SetupIndex. *Allocates a linked-list node and appends to gVarStoreMappingList. */ @@ -1628,7 +1628,7 @@ } /* - *sub_7F0: TrimAsciiSpaces - strip leading/trailing ASCII spaces + *7F0: TrimAsciiSpaces - strip leading/trailing ASCII spaces */ CHAR8 *TrimAsciiSpaces(CHAR8 *String) { @@ -1679,7 +1679,7 @@ * ======================================================================== */ /* - *sub_744: GetAsciiStringFromUnicode - helper that returns ASCII string length then converts + *744: GetAsciiStringFromUnicode - helper that returns ASCII string length then converts *Calls AsciiStrLen on the result of UnicodeToAscii. */ CHAR8 *GetAsciiFromUnicode(CONST UINT16 *Source, CHAR8 *DestBuf) @@ -1696,7 +1696,7 @@ } /* - *sub_79c: GetUnicodeFromAscii - helper to allocate Unicode buffer for ASCII string + *79c: GetUnicodeFromAscii - helper to allocate Unicode buffer for ASCII string */ UINT16 *GetUnicodeFromAscii(CONST CHAR8 *Source) { @@ -1713,7 +1713,7 @@ } /* - *sub_D18: RegisterVarStoreNode - creates and links a varstore tracking node + *D18: RegisterVarStoreNode - creates and links a varstore tracking node *Allocates a 24-byte node and appends to the config at offset +26 of n0x80. */ EFI_STATUS RegisterVarStoreNode(UINT64 ConfigAddr, UINT64 NodeData, UINT64 End) @@ -1756,7 +1756,7 @@ } /* - *sub_2E38: StrCmp - Unicode string compare + *2E38: StrCmp - Unicode string compare */ INTN StrCmp(CONST UINT16 *First, CONST UINT16 *Second) { @@ -1775,7 +1775,7 @@ } /* - *sub_50D8: CompareVarStoreGuid - compare two GUIDs (16 bytes each) + *50D8: CompareVarStoreGuid - compare two GUIDs (16 bytes each) *Uses ReadUnaligned64 to compare two 64-bit halves. */ BOOLEAN CompareVarStoreGuid(VOID *Guid1, VOID *Guid2) @@ -1793,7 +1793,7 @@ * ======================================================================== */ /* - *sub_29F8: CleanupVarStore - free all variable store entries + *29F8: CleanupVarStore - free all variable store entries */ VOID CleanupVarStore(VOID) { @@ -1827,7 +1827,7 @@ * ======================================================================== */ /* - *sub_864: ProcessIfrOpcode - process a single IFR opcode + *864: ProcessIfrOpcode - process a single IFR opcode *Handles varstore-related opcodes: *0x24 -> varstore (standard) *0x25 -> varstore (name-based) @@ -1929,7 +1929,7 @@ } /* - *sub_105c: ParseIfrGuidOp - handle GUIDed IFR opcodes + *105c: ParseIfrGuidOp - handle GUIDed IFR opcodes *Processes IFR GUIDed operations (sub-ops within GUID opcodes). */ EFI_STATUS ParseIfrGuidOp( @@ -1943,7 +1943,7 @@ } /* - *sub_15E0: ParseIfrOpcodes - main IFR opcode walker + *15E0: ParseIfrOpcodes - main IFR opcode walker *Walks the IFR bytecode stream, dispatching each opcode. */ EFI_STATUS ParseIfrOpcodes( @@ -1995,7 +1995,7 @@ * ======================================================================== */ /* - *sub_1B80: ProcessVarStore - process a single varstore from HII database + *1B80: ProcessVarStore - process a single varstore from HII database *Reads the package list for the given HII handle, walks IFR opcodes. */ EFI_STATUS ProcessVarStore(EFI_HII_HANDLE HiiHandle, VAR_STORE_ENTRY *Entry) @@ -2063,7 +2063,7 @@ } /* - *sub_1FEC: InitSetupStoreList - enumerate HII package lists and build varstore array + *1FEC: InitSetupStoreList - enumerate HII package lists and build varstore array *Main initialization routine: enumerates all HII handles, processes each. */ EFI_STATUS InitSetupStoreList(VOID) @@ -2117,7 +2117,7 @@ * ======================================================================== */ /* - *sub_4F74: GetVariableByName - find a protocol by name in configuration table + *4F74: GetVariableByName - find a protocol by name in configuration table */ VOID *GetVariableByName(CONST CHAR8 *Name) { @@ -2137,7 +2137,7 @@ } /* - *sub_4FC4: Internal GUID compare helper + *4FC4: Internal GUID compare helper *Compares GUID data starting at two addresses using optimized aligned compares. */ INTN CompareGuidBytes(CONST UINT8 *a1, CONST UINT8 *a2, UINTN Size) @@ -2174,7 +2174,7 @@ } /* - *sub_1D20: FindVarStoreProtocol + *1D20: FindVarStoreProtocol *Walk through variable store protocols to find the setup store. */ EFI_STATUS FindVarStoreProtocol( @@ -2298,7 +2298,7 @@ * ======================================================================== */ /* - *sub_27DC: WriteBackSetupStore + *27DC: WriteBackSetupStore *Iterates all varstore entries, writing modified variables back, *then triggers a system reset. */ @@ -2360,7 +2360,7 @@ * ======================================================================== */ /* - *sub_2ABC: InitAttributesNode - main initialization + *2ABC: InitAttributesNode - main initialization *Initializes HII protocols, enumerates handles, sets up varstore. * *GUIDs: @@ -2441,7 +2441,7 @@ * ======================================================================== */ /* - *sub_45C: UefiConfigManagerEntry - BIOS setup config manager entry point + *45C: UefiConfigManagerEntry - BIOS setup config manager entry point * *Creates the "BIOS Setup Information Store" root node with timestamp, *the "Attributes" child node, then initializes all HII protocols diff --git a/PurleyPlatPkg/Ras/Smm/ErrHandling/AmiErrorHandlerMain/AmiErrorHandlerMain.h b/PurleyPlatPkg/Ras/Smm/ErrHandling/AmiErrorHandlerMain/AmiErrorHandlerMain.h index 2a8ae75..f25da7a 100644 --- a/PurleyPlatPkg/Ras/Smm/ErrHandling/AmiErrorHandlerMain/AmiErrorHandlerMain.h +++ b/PurleyPlatPkg/Ras/Smm/ErrHandling/AmiErrorHandlerMain/AmiErrorHandlerMain.h @@ -14,8 +14,7 @@ // Function Prototypes // // Module split notes: -// - This translation unit implements the public wrapper entrypoint and API shims. -// - `sub_*` symbols preserve original decompilation entrypoints for cross-file linkage. +// - This translation unit implements the public wrapper entrypoint and recovered API shims. /// diff --git a/PurleyPlatPkg/Ras/Smm/ErrHandling/FpgaErrorHandler/FpgaErrorHandler/FpgaErrorHandler.h b/PurleyPlatPkg/Ras/Smm/ErrHandling/FpgaErrorHandler/FpgaErrorHandler/FpgaErrorHandler.h index df5bc39..b52e0d3 100644 --- a/PurleyPlatPkg/Ras/Smm/ErrHandling/FpgaErrorHandler/FpgaErrorHandler/FpgaErrorHandler.h +++ b/PurleyPlatPkg/Ras/Smm/ErrHandling/FpgaErrorHandler/FpgaErrorHandler/FpgaErrorHandler.h @@ -44,10 +44,10 @@ /// FpgaErrorHandlerInitializeContext -- AutoGen init helper (`sub_5C0`). /// `sub_5C0` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerInitializeContext sub_5C0 +#define sub_5C0 FpgaErrorHandlerInitializeContext EFI_STATUS EFIAPI -sub_5C0( +FpgaErrorHandlerInitializeContext( EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); @@ -56,10 +56,10 @@ /// RegisterFpgaErrorCallbacks -- module setup routine (`sub_EAC`). /// `sub_EAC` is the decompilation symbol name for this routine. /// -#define RegisterFpgaErrorCallbacks sub_EAC +#define sub_EAC RegisterFpgaErrorCallbacks EFI_STATUS EFIAPI -sub_EAC( +RegisterFpgaErrorCallbacks( VOID ); @@ -67,10 +67,10 @@ /// FpgaErrorHandlerSetJumpStateSave -- context save (`sub_280`). /// `sub_280` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerSetJumpStateSave sub_280 +#define sub_280 FpgaErrorHandlerSetJumpStateSave EFI_STATUS EFIAPI -sub_280( +FpgaErrorHandlerSetJumpStateSave( VOID * ); @@ -78,10 +78,10 @@ /// FpgaErrorHandlerSetJumpStateCheck -- set-jump context validator (`sub_11E0`). /// `sub_11E0` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerSetJumpStateCheck sub_11E0 +#define sub_11E0 FpgaErrorHandlerSetJumpStateCheck EFI_STATUS EFIAPI -sub_11E0( +FpgaErrorHandlerSetJumpStateCheck( VOID * ); @@ -89,10 +89,10 @@ /// FpgaErrorHandlerSetJumpRecover -- context restore/longjmp (`sub_320`). /// `sub_320` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerSetJumpRecover sub_320 +#define sub_320 FpgaErrorHandlerSetJumpRecover EFI_STATUS EFIAPI -sub_320( +FpgaErrorHandlerSetJumpRecover( VOID *, INTN ); @@ -101,10 +101,10 @@ /// FpgaErrorHandlerAssert -- debug assert logging (`sub_11A0`). /// `sub_11A0` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerAssert sub_11A0 +#define sub_11A0 FpgaErrorHandlerAssert EFI_STATUS EFIAPI -sub_11A0( +FpgaErrorHandlerAssert( CONST CHAR8 *FileName, UINTN LineNumber, CONST CHAR8 *Expression @@ -114,10 +114,10 @@ /// FpgaErrorHandlerCleanup -- SMM pool/free failure path (`sub_13D4`). /// `sub_13D4` is the decompilation symbol name for this helper. /// -#define FpgaErrorHandlerCleanup sub_13D4 +#define sub_13D4 FpgaErrorHandlerCleanup EFI_STATUS EFIAPI -sub_13D4( +FpgaErrorHandlerCleanup( VOID ); diff --git a/PurleyPlatPkg/Ras/Smm/ErrHandling/PlatformErrorHandler/PlatformErrorHandler.h b/PurleyPlatPkg/Ras/Smm/ErrHandling/PlatformErrorHandler/PlatformErrorHandler.h index bbf8cdf..4e9441f 100644 --- a/PurleyPlatPkg/Ras/Smm/ErrHandling/PlatformErrorHandler/PlatformErrorHandler.h +++ b/PurleyPlatPkg/Ras/Smm/ErrHandling/PlatformErrorHandler/PlatformErrorHandler.h @@ -79,16 +79,6 @@ VOID *Context ); -// Sub_XXX compatibility aliases preserved for traceability. -#define sub_30D8 PlatformErrorHandlerConstructors -#define sub_3550 RegisterPlatformErrorHandler -#define sub_34E0 PlatformErrorHandlerFallbackInit -#define sub_594 PlatformErrorHandlerSmmEntry -#define sub_35C8 RegisterErrorSource -#define sub_36B8 RegisterErrorNotificationCallback -#define sub_3810 DispatchNotification -#define sub_3844 DispatchWithEarlyOut - // // Recovered linked-list globals from decompiled analysis. // diff --git a/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.c b/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.c index e2d1506..a633d79 100644 --- a/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.c +++ b/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.c @@ -11,4 +11,4 @@ // Function: ModuleEntryPoint -EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { __int64 v2; // rax EFI_STATUS v3; // rbx sub_69C(ImageHandle, SystemTable); qword_14FD8 = 0x8000000000000001uLL; if ( !sub_300(&unk_14EE0) ) { v2 = sub_34B0(); if ( v2 >= 0 || qword_14FD8 < 0 ) qword_14FD8 = v2; sub_6F88(&unk_14EE0); sub_3E0(&unk_14EE0, -1); sub_6D40( "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\PurleyPlatPkg\\Ras\\Smm\\ErrHandling\\ProcessorErrorHandler\\Processo" "rErrorHandler\\DEBUG\\AutoGen.c", 1297, "((BOOLEAN)(0==1))"); sub_6D40( "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\PurleyPlatPkg\\Ras\\Smm\\ErrHandling\\ProcessorErrorHandler\\Processo" "rErrorHandler\\DEBUG\\AutoGen.c", 1312, "((BOOLEAN)(0==1))"); } v3 = qword_14FD8; if ( qword_14FD8 < 0 ) sub_1168(); return v3; } +EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { __int64 v2; // rax EFI_STATUS v3; // rbx DriverInit(ImageHandle, SystemTable); qword_14FD8 = 0x8000000000000001uLL; if ( !sub_300(&unk_14EE0) ) { v2 = LocateProtocolsAndRegisterHandlers(); if ( v2 >= 0 || qword_14FD8 < 0 ) qword_14FD8 = v2; sub_6F88(&unk_14EE0); sub_3E0(&unk_14EE0, -1); sub_6D40( "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\PurleyPlatPkg\\Ras\\Smm\\ErrHandling\\ProcessorErrorHandler\\Processo" "rErrorHandler\\DEBUG\\AutoGen.c", 1297, "((BOOLEAN)(0==1))"); sub_6D40( "e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\X64\\PurleyPlatPkg\\Ras\\Smm\\ErrHandling\\ProcessorErrorHandler\\Processo" "rErrorHandler\\DEBUG\\AutoGen.c", 1312, "((BOOLEAN)(0==1))"); } v3 = qword_14FD8; if ( qword_14FD8 < 0 ) SmmLockBoxDestructor(); return v3; } diff --git a/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.h b/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.h index 6cab273..579e02c 100644 --- a/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.h +++ b/PurleyPlatPkg/Ras/Smm/ErrHandling/ProcessorErrorHandler/ProcessorErrorHandler/ProcessorErrorHandler.h @@ -26,20 +26,20 @@ ); /// -/// sub_69C +/// DriverInit /// EFI_STATUS EFIAPI -sub_69C( +DriverInit( VOID ); /// -/// sub_34B0 +/// LocateProtocolsAndRegisterHandlers /// EFI_STATUS EFIAPI -sub_34B0( +LocateProtocolsAndRegisterHandlers( VOID ); @@ -80,12 +80,12 @@ ); /// -/// sub_1168 +/// SmmLockBoxDestructor /// EFI_STATUS EFIAPI -sub_1168( +SmmLockBoxDestructor( VOID ); -#endif /* __PROCESSORERRORHANDLER_H__ */ \ No newline at end of file +#endif /* __PROCESSORERRORHANDLER_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB1.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB1.h index a85584a..c47d435 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB1.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB1.h @@ -184,7 +184,7 @@ //============================================================================= /* - * sub_48C - Return EFI_INVALID_PARAMETER status constant. + * GetInvalidParameterStatus - Return EFI_INVALID_PARAMETER status constant. * Called by CheckBoardTypeAndLog (via ASSERT macro expansion). */ EFI_STATUS @@ -193,7 +193,7 @@ ); /* - * sub_498 - Locate UBA SetupConfig Protocol (cache in gUbaProtocol). + * GetUBASetupConfigProtocol - Locate UBA SetupConfig Protocol (cache in gUbaProtocol). * Uses gBS->RaiseTPL(31), RestoreTPL(old), then LocateProtocol(GUID_B40,...). * If oldTPL > 16 after probe, returns NULL without calling LocateProtocol. * Caches result in gUbaProtocol. @@ -204,7 +204,7 @@ ); /* - * sub_518 - Board-type-aware log function. + * CheckBoardTypeAndLog - Board-type-aware log function. * Reads CMOS reg 0x4B to determine board type, sets debug filter mask, * and if (mask & DebugLevel) != 0, calls Protocol[0] with the args. */ @@ -216,7 +216,7 @@ ); /* - * sub_5A0 - Call Protocol[1] (debug print) with three params. + * UBADebugPrint - Call Protocol[1] (debug print) with three params. * Wrapper that asserts file/line/expression via protocol. */ UINTN @@ -227,7 +227,7 @@ ); /* - * sub_728 - Read unaligned UINT64 with NULL-pointer check. + * ReadUnaligned64 - Read unaligned UINT64 with NULL-pointer check. * Used to compare GUIDs as two 64-bit values. */ UINT64 @@ -236,7 +236,7 @@ ); /* - * sub_6B8 - Compare two GUIDs via unaligned 64-bit halves. + * CompareGuidUnaligned - Compare two GUIDs via unaligned 64-bit halves. * Used for ConfigurationTable entry matching (HOB list search). */ BOOLEAN @@ -246,7 +246,7 @@ ); /* - * sub_5E0 - Find HOB List in SystemTable->ConfigurationTable. + * GetHobListFromConfigTable - Find HOB List in SystemTable->ConfigurationTable. * Walks entries matching gEfiHobListGuid, caches interface in gHobList. * Asserts if not found. */ @@ -267,4 +267,4 @@ IN EFI_SYSTEM_TABLE *SystemTable ); -#endif /* __SLOT_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXECB1_H__ */ \ No newline at end of file +#endif /* __SLOT_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXECB1_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.c index bf66d0c..d9a1b9b 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.c @@ -84,7 +84,7 @@ // ============================================================================ // // The descriptor table is constructed as local variable initializers in -// sub_77C (0x77C). Each entry is 10 bytes: +// BuildSmbiosStringRecord (0x77C). Each entry is 10 bytes: // // [0] Type - SMBIOS structure type (8=Type2 Baseboard) // [1] Number - Field number within structure @@ -97,7 +97,7 @@ // [9] Reserved // // 30 entries for SMBIOS Type 2 (Baseboard), indexed 0-29. -// Called from sub_F54 (SmbiosDataUpdateDispatch). +// Called from SmbiosDataUpdateDispatch. /** * @brief Zero memory base -- fast 8-byte aligned memset + trailing bytes @@ -111,7 +111,7 @@ * Address: 0x280 Size: 0x20 (32 bytes) * Xrefs: 3 (called from ZeroMem) * Callees: 0 (leaf) - * Note: Called by ZeroMem (sub_123C) to do actual zero-fill + * Note: Called by ZeroMem to do actual zero-fill */ STATIC VOID * @@ -157,7 +157,7 @@ * @return Pointer to destination * * Address: 0x300 Size: 0x66 (102 bytes) - * Xrefs: 3 (called from CopyMem / sub_20AC) + * Xrefs: 3 (called from CopyMem / CopyMem wrapper) * Callees: 0 (leaf) */ STATIC @@ -214,7 +214,7 @@ /** * @brief UEFI DXE Driver Entry Point * @details Standard UEFI DXE driver entry. Saves globals then calls - * init (sub_38C) followed by main entry (sub_654). + * init (SmbiosDataUpdateInit) followed by main entry (SmbiosDataUpdateEntry). * Note: The decompiler shows double parameters -- in the original * source, the parameters are (ImageHandle, SystemTable). * @@ -277,8 +277,8 @@ * * Address: 0x38C Size: 0x2C7 (711 bytes) * Xrefs: 1 (from _ModuleEntryPoint at 0x379) - * Calls: sub_16E8 (HobLibInit), sub_114C (AssertHandler), sub_10C4 (DebugPrint), - * sub_13E8 (GetConfigTable), multiple gBS->LocateProtocol + * Calls: HobLibInit, AssertHandler, DebugPrint, + * GetConfigTable, multiple gBS->LocateProtocol */ EFI_STATUS EFIAPI @@ -774,7 +774,7 @@ /** * @brief Zero memory (wrapper with assertion checks) * @details Checks for NULL buffer and valid length range, then calls - * the base zero function (sub_280). + * the base zero function (ZeroMemBase). * * @param[out] Buffer Buffer to zero * @param[in] Length Number of bytes to zero @@ -815,7 +815,7 @@ /** * @brief Read UINT32 from potentially unaligned address * @details Direct read of a 32-bit value. In the actual implementation - * (sub_12AC), this is a simple pointer dereference. + * (ReadUnaligned32), this is a simple pointer dereference. * * @param[in] Buffer Pointer to read from * @return The UINT32 value @@ -2410,7 +2410,7 @@ * - Probes PCIe presence via MmPciBase protocol * - Builds the record with slot/bus/function data * - * Uses MmPciWriteConfig (sub_2064) to probe PCIe: + * Uses MmPciWriteConfig to probe PCIe: * - Probes at bus=0, device varying per-slot, function varying * - Uses PCIe config space to detect populated slots * - Config address: ((Func & 7) | (8 * ((Dev & 0x1F) | (32 * Bus)))) << 12 @@ -2421,7 +2421,7 @@ * * Address: 0xA20 Size: 0x376 (886 bytes) * Xrefs: 1 (from SmbiosDataUpdateDispatch at 0xFD1) - * Calls: MmPciWriteConfig (0x2064), GetHiiString (0x176C) -- via sub_176C, + * Calls: MmPciWriteConfig (0x2064), GetHiiString (0x176C), * UpdateSmbiosStringField (0x1AE8), FreePool (0x13A4) */ EFI_STATUS @@ -2533,7 +2533,7 @@ } // - * Probe the PCIe slot via MmPciWriteConfig (sub_2064) + * Probe the PCIe slot via MmPciWriteConfig * The MmPciWriteConfig function takes (Bus, Dev, Func) and returns * a pointer to the PCIe config space register at offset +25 from * the encoded address. @@ -2772,7 +2772,7 @@ /** * @brief Copy memory with overlap-safe handling - * @details Wrapper around CopyMemBase (sub_300) with assertion checks + * @details Wrapper around CopyMemBase with assertion checks * for bounds safety. If dst == src, returns immediately. * * Checks: @@ -3110,4 +3110,4 @@ return EFI_SUCCESS; } -// End of file \ No newline at end of file +// End of file diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.h index 7edd542..db0dd14 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB1.h @@ -134,8 +134,8 @@ * * Each entry describes one SMBIOS string field to update. * The descriptor table is embedded as local variable initialization - * in BuildSmbiosStringRecord (sub_77C), with 30 entries for Type2, - * plus Type9 and Type41 entries from sub_A20 and sub_D98. + * in BuildSmbiosStringRecord, with 30 entries for Type2, + * plus Type9 and Type41 entries from BuildSmbiosType9Record and BuildSmbiosType41Record. */ typedef struct { UINT8 Type; ///< SMBIOS structure type @@ -287,8 +287,8 @@ * * Uses 768-byte working buffer (allocated via AllocateZeroPool). * Phase 1: 30 iterations for SMBIOS Type 2 strings - * Phase 2: 8 iterations for SMBIOS Type 9 strings (sub_A20) - * Phase 3: 4 iterations for SMBIOS Type 41 strings (sub_D98) + * Phase 2: 8 iterations for SMBIOS Type 9 strings (BuildSmbiosType9Record) + * Phase 3: 4 iterations for SMBIOS Type 41 strings (BuildSmbiosType41Record) * * @return EFI_SUCCESS or error code */ @@ -321,7 +321,7 @@ * Build SMBIOS Type 9 (System Slot) record * * Creates a Type 9 record with board-specific slot configuration. - * Uses MmPciBase protocol (sub_2064) to probe for slot presence + * Uses MmPciBase protocol (MmPciWriteConfig) to probe for slot presence * via PCIe config reads. Handles 8 slot positions (index 0-7). * * @param[out] Buffer Output buffer for the SMBIOS record @@ -339,7 +339,7 @@ * Build SMBIOS Type 41 (Onboard Device) record * * Creates a Type 41 record with onboard device information. - * Uses MmPciBase protocol (sub_2064) to probe for device presence. + * Uses MmPciBase protocol (MmPciWriteConfig) to probe for device presence. * Handles 4 device positions (index 0-3). * * @param[out] Buffer Output buffer for the SMBIOS record @@ -760,7 +760,7 @@ /** * Copy memory with overlap-safe handling * - * Wrapper around CopyMemBase (sub_300) with assertion checks. + * Wrapper around CopyMemBase with assertion checks. * If destination and source overlap in a forward direction, uses * reverse copy. * @@ -853,4 +853,4 @@ IN UINTN DestMax ); -#endif // SMBIOS_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXECB1_H \ No newline at end of file +#endif // SMBIOS_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXECB1_H diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXECB1.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXECB1.c index cf79e12..448dacd 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXECB1.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXECB1.c @@ -46,38 +46,38 @@ // // gImageHandle -- EFI_HANDLE for this driver image, set by -// ModuleEntryPoint (sub_390). Used primarily for assertions. +// StaticSkuDataDxeEntryPoint. Used primarily for assertions. // EFI_HANDLE gImageHandle = NULL; // // gST -- Pointer to the UEFI System Table. -// Set by ModuleEntryPoint (sub_390) at 0x396. +// Set by StaticSkuDataDxeEntryPoint at 0x396. // EFI_SYSTEM_TABLE *gST = NULL; // // gBS -- Pointer to BootServices from the System Table. -// Set by ModuleEntryPoint at 0x3E1. +// Set by StaticSkuDataDxeEntryPoint at 0x3E1. // Used for AllocatePool (offset 24) and LocateProtocol (offset 320). // EFI_BOOT_SERVICES *gBS = NULL; // // gRT -- Pointer to RuntimeServices from the System Table. -// Set by ModuleEntryPoint at 0x407. +// Set by StaticSkuDataDxeEntryPoint at 0x407. // EFI_RUNTIME_SERVICES *gRT = NULL; // // gUbaProtocol -- Cached pointer to the UBA protocol interface. -// Initialized by GetUbaProtocol() (sub_4C0). +// Initialized by GetUbaProtocol(). // UBA_PROTOCOL *gUbaProtocol = NULL; // // gHobList -- Cached pointer to the start of the UEFI HOB list. -// Initialized by GetHobList() (sub_608). +// Initialized by GetHobList(). // VOID *gHobList = NULL; @@ -153,7 +153,7 @@ // -// ModuleEntryPoint (sub_390) +// StaticSkuDataDxeEntryPoint // /** @@ -182,7 +182,7 @@ **/ EFI_STATUS EFIAPI -ModuleEntryPoint ( +StaticSkuDataDxeEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) @@ -308,7 +308,7 @@ // -// GetUbaProtocol (sub_4C0 at 0x4C0) +// GetUbaProtocol (0x4C0) // /** @@ -387,7 +387,7 @@ // -// UbaAssert (sub_5C8 at 0x5C8) +// UbaAssert (0x5C8) // /** @@ -434,7 +434,7 @@ // -// UbaCheckCmosSku (sub_540 at 0x540) +// UbaCheckCmosSku (0x540) // /** @@ -583,7 +583,7 @@ // -// GetHobList (sub_608 at 0x608) +// GetHobList (0x608) // /** @@ -702,7 +702,7 @@ // -// CompareGuidQwords (sub_6E0 at 0x6E0) +// CompareGuidQwords (0x6E0) // /** @@ -763,7 +763,7 @@ // -// ReadUnaligned64 (sub_750 at 0x750) +// ReadUnaligned64 (0x750) // /** @@ -914,4 +914,4 @@ 0x03 = Board revision C (flags = 0x80000006) >3 = Fall back to MMIO detection 0x00 = (invalid for production, MMIO fallback) -++*/ \ No newline at end of file +++*/ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB1.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB1.c index c75f7b5..2acf727 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB1.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB1/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB1.c @@ -256,7 +256,7 @@ // // Locate the HOB list from the system configuration table. // This is required for subsequent HOB-based drivers. - // @note 0x429: call sub_5F8 (GetHobList) + // @note 0x429: call GetHobList // GetHobList (ImageHandle); @@ -264,7 +264,7 @@ // Print debug banner indicating this driver is executing. // @note 0x434: lea rdx, "UBA:UsbOcUpdate-TypeLightningRidgeEXECB1\n" // @note 0x43b: mov ecx, 0x80000000 (DEBUG_INFO error level) - // @note 0x440: call sub_530 (DebugPrint) + // @note 0x440: call DebugPrint // Interface = NULL; DebugPrint (DEBUG_INFO, "UBA:UsbOcUpdate-TypeLightningRidgeEXECB1\n"); @@ -518,10 +518,10 @@ * * @note This function implements an optimized GUID comparison that avoids * calling the full CompareGuid() function from BaseLib. - * @note 0x6f6: First call to sub_740(&unk_B90) = ReadUnaligned64(first half) - * @note 0x705: Second call to sub_740(a2) = ReadUnaligned64(candidate first half) - * @note 0x711: Third call to sub_740(&unk_B98) = ReadUnaligned64(second half) - * @note 0x714: Fourth call to sub_740(a2 + 8) = ReadUnaligned64(candidate second half) + * @note 0x6f6: First call to ReadUnaligned64(&mUsbOcHobListFirstHalf) + * @note 0x705: Second call to ReadUnaligned64(a2) + * @note 0x711: Third call to ReadUnaligned64(&mUsbOcHobListSecondHalf) + * @note 0x714: Fourth call to ReadUnaligned64(a2 + 8) * @note 0x738: cmp rdi, rbx (compare first halves), cmovnz, then cmp rbp, rax * (compare second halves), yielding boolean result. */ @@ -538,8 +538,8 @@ // Byte: 4C F2 39 77 D7 93 D4 11 // As UINT64: 0x11D493D77739F24C // - // @note 0x6f6: call sub_740(&unk_B90) -- reads mUsbOcHobListFirstHalf - // @note 0x705: call sub_740(a2) -- reads first half of candidate GUID + // @note 0x6f6: call ReadUnaligned64(&mUsbOcHobListFirstHalf) + // @note 0x705: call ReadUnaligned64(a2) -- reads first half of candidate GUID // @note 0x738: cmp rdi, rbx -- compare first halves // if (ReadUnaligned64 (&mUsbOcHobListFirstHalf) != ReadUnaligned64 (GuidPtr)) { @@ -559,8 +559,8 @@ // So GuidPtr + 8 is the second half of the GUID, and GuidPtr + 16 // would be the VendorTable pointer. // - // @note 0x711: call sub_740(&unk_B98) -- reads mUsbOcHobListSecondHalf - // @note 0x714: call sub_740(a2 + 8) -- reads second half of candidate GUID + // @note 0x711: call ReadUnaligned64(&mUsbOcHobListSecondHalf) + // @note 0x714: call ReadUnaligned64(a2 + 8) -- reads second half of candidate GUID // @note 0x738: cmp rbp, rax -- compare second halves // return ReadUnaligned64 (&mUsbOcHobListSecondHalf) == ReadUnaligned64 ((UINT8 *)GuidPtr + 8); @@ -624,7 +624,7 @@ // // Get the DebugLib protocol interface (lazily resolved and cached). - // @note 0x547: call sub_4B0 (GetDebugProtocol) + // @note 0x547: call GetDebugProtocol // DebugProtocol = GetDebugProtocol (); ReturnValue = 0; @@ -978,4 +978,4 @@ // @note 0x769: return *Buffer // return *(volatile UINT64 *)Buffer; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB2.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB2.c index c55721a..0adfe0e 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB2.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB2.c @@ -97,7 +97,7 @@ /// - Version: 1 /// - TotalSize: 0x0D60 (size of entire PIIO data region) /// - ConfigTableOffset: 0x3C (60 bytes from struct base to cfg table) -/// - CallbackFunction: (VOID *)ReturnNotFound (sub_50C, no-op) +/// - CallbackFunction: (VOID *)ReturnNotFound (no-op) /// - ResourceTableOffset: 0x0C60 (offset to resource table) /// - ResourceTableSize: 0xFC (252 bytes) /// @@ -106,7 +106,7 @@ 1, // Version 0x0D60, // TotalSize 0x3C, // ConfigTableOffset - (UINT64)(UINTN)ReturnNotFound, // sub_50C = ReturnNotFound + (UINT64)(UINTN)ReturnNotFound, // ReturnNotFound 0x0C60, // ResourceTableOffset 0xFC // ResourceTableSize }; @@ -195,7 +195,7 @@ }; // ============================================================================ -// Function: ReturnNotFound (sub_50C) - [0x50C-0x50E, 3 bytes, leaf] +// Function: ReturnNotFound (0x50C) - [0x50C-0x50E, 3 bytes, leaf] // ============================================================================ /** @@ -231,7 +231,7 @@ } // ============================================================================ -// Function: GetDebugProtocol (sub_510) - [0x510-0x58E, 127 bytes, wrapper] +// Function: GetDebugProtocol (0x510) - [0x510-0x58E, 127 bytes, wrapper] // ============================================================================ /** @@ -239,7 +239,7 @@ * * ADDRESS: 0x510 * SIZE: 0x7F (127 bytes), 5 basic blocks, 32 instructions - * CALLERS: 2 (sub_590/DebugPrint, sub_618/DebugAssert) + * CALLERS: 2 (DebugPrint, DebugAssert) * CALLS: 1 (gBS->RaiseTPL + gBS->RestoreTPL pair is one "logical" call) * * This function implements the pattern used in other UBA DXE modules: @@ -363,7 +363,7 @@ } // ============================================================================ -// Function: DebugPrint (sub_590) - [0x590-0x617, 136 bytes, complex] +// Function: DebugPrint (0x590) - [0x590-0x617, 136 bytes, complex] // ============================================================================ /** @@ -371,8 +371,8 @@ * * ADDRESS: 0x590 * SIZE: 0x88 (136 bytes), 9 basic blocks, 46 instructions - * CALLERS: 2 (sub_43C/RegisterIioConfig, sub_658/GetHobList) - * CALLS: 1 (sub_510/GetDebugProtocol) + * CALLERS: 2 (RegisterIioConfig, GetHobList) + * CALLS: 1 (GetDebugProtocol) * HW IO: YES - reads CMOS ports 0x70/0x71 * * This function: @@ -496,7 +496,7 @@ } // ============================================================================ -// Function: DebugAssert (sub_618) - [0x618-0x655, 61 bytes, wrapper] +// Function: DebugAssert (0x618) - [0x618-0x655, 61 bytes, wrapper] // ============================================================================ /** @@ -504,8 +504,8 @@ * * ADDRESS: 0x618 * SIZE: 0x3E (62 bytes), 3 basic blocks, 19 instructions - * CALLERS: 3 (_ModuleEntryPoint x4, sub_658/GetHobList x2, sub_7A0/ReadUnaligned64 x1) - * CALLS: 1 (sub_510/GetDebugProtocol) + * CALLERS: 3 (_ModuleEntryPoint x4, GetHobList x2, ReadUnaligned64 x1) + * CALLS: 1 (GetDebugProtocol) * * Called when a runtime assertion fails (e.g., a NULL pointer check * in a library function). Resolves the DebugLib protocol via @@ -553,7 +553,7 @@ } // ============================================================================ -// Function: GetHobList (sub_658) - [0x658-0x72D, 214 bytes, complex] +// Function: GetHobList (0x658) - [0x658-0x72D, 214 bytes, complex] // ============================================================================ /** @@ -563,7 +563,7 @@ * ADDRESS: 0x658 * SIZE: 0xD6 (214 bytes), 10 basic blocks, 48 instructions * CALLERS: 1 (_ModuleEntryPoint) - * CALLS: 4 (sub_730/IsHobListGuid, sub_590/DebugPrint, sub_618/DebugAssert) + * CALLS: 4 (IsHobListGuid, DebugPrint, DebugAssert) * * This function: * 1. Check if gHobList is already cached -> return immediately @@ -666,7 +666,7 @@ } // ============================================================================ -// Function: IsHobListGuid (sub_730) - [0x730-0x79D, 110 bytes, complex] +// Function: IsHobListGuid (0x730) - [0x730-0x79D, 110 bytes, complex] // ============================================================================ /** @@ -675,8 +675,8 @@ * * ADDRESS: 0x730 * SIZE: 0x6E (110 bytes), 5 basic blocks, 30 instructions - * CALLERS: 1 (sub_658/GetHobList) - * CALLS: 4 (sub_7A0/ReadUnaligned64 x4) + * CALLERS: 1 (GetHobList) + * CALLS: 4 (ReadUnaligned64 x4) * * This function reads the EFI_HOB_LIST_GUID from the binary's static * data (at 0xC10) and compares it against a target GUID by splitting @@ -693,7 +693,7 @@ * Data3_LE: 0x11D4 * Data4[]: {0x9A, 0x3A, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} * - * The comparison function at sub_7A0 (ReadUnaligned64) reads the + * The comparison function at ReadUnaligned64 reads the * addressed bytes safely from potentially unaligned addresses, * which is important because configuration table entries may * not be 8-byte aligned. @@ -740,7 +740,7 @@ } // ============================================================================ -// Function: ReadUnaligned64 (sub_7A0) - [0x7A0-0x7CE, 47 bytes, wrapper] +// Function: ReadUnaligned64 (0x7A0) - [0x7A0-0x7CE, 47 bytes, wrapper] // ============================================================================ /** @@ -748,7 +748,7 @@ * * ADDRESS: 0x7A0 * SIZE: 0x2F (47 bytes), 3 basic blocks, 13 instructions - * CALLERS: 4 (sub_730/IsHobListGuid x4) + * CALLERS: 4 (IsHobListGuid x4) * CALLS: 1 (DebugAssert if Buffer is NULL) * * Wraps the BaseLib ReadUnaligned64() function with a NULL pointer check. @@ -787,7 +787,7 @@ } // ============================================================================ -// Function: AllocatePool (inline wrapper, part of sub_510) +// Function: AllocatePool (inline wrapper, part of GetDebugProtocol) // ============================================================================ /** @@ -807,7 +807,7 @@ } // ============================================================================ -// Function: FreePool (inline wrapper, part of sub_510) +// Function: FreePool (inline wrapper, part of GetDebugProtocol) // ============================================================================ /** @@ -825,7 +825,7 @@ } // ============================================================================ -// Function: RegisterIioConfig (sub_43C) - [0x43C-0x509, 207 bytes, complex] +// Function: RegisterIioConfig (0x43C) - [0x43C-0x509, 207 bytes, complex] // ============================================================================ /** @@ -834,7 +834,7 @@ * ADDRESS: 0x43C * SIZE: 0xCF (207 bytes), 6 basic blocks, 48 instructions * CALLERS: 1 (_ModuleEntryPoint) - * CALLS: 2 (sub_590/DebugPrint, gBS->LocateProtocol + protocol->RegisterConfig x4) + * CALLS: 2 (DebugPrint, gBS->LocateProtocol + protocol->RegisterConfig x4) * * This function implements the core purpose of this driver: * 1. Print a debug banner identifying the module: @@ -922,7 +922,7 @@ } // ============================================================================ -// Function: _ModuleEntryPoint (sub_390) - [0x390-0x438, 169 bytes, complex] +// Function: _ModuleEntryPoint (0x390) - [0x390-0x438, 169 bytes, complex] // ============================================================================ /** @@ -931,7 +931,7 @@ * ADDRESS: 0x390 * SIZE: 0xA9 (169 bytes), 9 basic blocks, 38 instructions * CALLERS: 0 (this is the entry point, called by DXE dispatcher) - * CALLS: 4 (sub_618/DebugAssert x4, sub_658/GetHobList, sub_43C/RegisterIioConfig) + * CALLS: 4 (DebugAssert x4, GetHobList, RegisterIioConfig) * * Called by the DXE Dispatcher when this driver is loaded. Performs: * 1. Caches UEFI global variables from the provided SystemTable: @@ -1030,4 +1030,4 @@ Status = RegisterIioConfig (); return Status; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB2.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB2.h index 45e9334..346fd5a 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB2.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SetupConfigUpdateDxe/SetupConfigUpdateDxeLightningRidgeEXECB2.h @@ -29,7 +29,7 @@ * GUIDs specific to this module *============================================================================*/ -/** GUID used in sub_498() to locate the protocol via gBS->LocateProtocol(). +/** GUID used in GetDebugProtocol() to locate the protocol via gBS->LocateProtocol(). * This is a debug/output protocol GUID (not the standard UEFI one). * Address in binary: 0xB40 * Value: {36232936-0E76-31C8-A13A-3AF2FC1C3932} */ @@ -132,7 +132,7 @@ } UBA_BOARD_TYPE_PROTOCOL; /*============================================================================= - * UEFI Debug Library Protocol (lazily resolved by sub_498()) + * UEFI Debug Library Protocol (lazily resolved by GetDebugProtocol()) *============================================================================*/ /** @@ -464,7 +464,7 @@ /** * UBA protocol callback to submit a config update entry. * - * This is called by the loop in sub_1FB4 to submit individual entries + * This is called by the loop in WriteSetupConfig to submit individual entries * from the setup configuration table. * * @param a1 Protocol context. @@ -480,4 +480,4 @@ IN UINT64 a3 ); -#endif /* SETUP_CONFIG_UPDATE_DXE_LIGHTNING_RIDGE_EXECB2_H */ \ No newline at end of file +#endif /* SETUP_CONFIG_UPDATE_DXE_LIGHTNING_RIDGE_EXECB2_H */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SlotDataUpdateDxe/SlotDataUpdateDxeLightningRidgeEXECB2.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SlotDataUpdateDxe/SlotDataUpdateDxeLightningRidgeEXECB2.h index 86a40ae..895d075 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SlotDataUpdateDxe/SlotDataUpdateDxeLightningRidgeEXECB2.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/SlotDataUpdateDxe/SlotDataUpdateDxeLightningRidgeEXECB2.h @@ -109,8 +109,8 @@ gSlotDataBuffer2 (0xBE0, 40 bytes): Secondary PSLT entry (with extended config) The PSLT format embeds function pointers: - - SlotCount offset refers to GetSlotCount (sub_4B0 at 0x4B0, returns 2) - - SlotDataOffset refers to GetSlotData (sub_4B4 at 0x4B4, identity passthrough) + - SlotCount offset refers to GetSlotCount (0x4B0, returns 2) + - SlotDataOffset refers to GetSlotData (0x4B4, identity passthrough) **/ #pragma pack(push, 1) typedef struct { @@ -132,7 +132,7 @@ **/ typedef struct { PSLT_HEADER Header; ///< PSLT header (32 bytes) - UINT64 ExtraConfig; ///< Extended platform config data (RVA to sub_4B4 at 0x4B4) + UINT64 ExtraConfig; ///< Extended platform config data (RVA to GetSlotData at 0x4B4) } SLOT_CONFIG; #pragma pack(pop) @@ -463,4 +463,4 @@ IN CONST UINT64 *Buffer ); -#endif // SLOT_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B2_H \ No newline at end of file +#endif // SLOT_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B2_H diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/StaticSkuDataDxeLightningRidgeEXECB2.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/StaticSkuDataDxeLightningRidgeEXECB2.c index 75f8cd8..ea956b1 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/StaticSkuDataDxeLightningRidgeEXECB2.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/StaticSkuDataDxeLightningRidgeEXECB2.c @@ -104,7 +104,7 @@ extern ACPF_PROTOCOL mAcpfProtocolIf; // -// Function: PlatformAssert / sub_5C8 +// Function: PlatformAssert // /** @@ -142,7 +142,7 @@ } // -// Function: GetPlatformProtocol / sub_4C0 +// Function: GetPlatformProtocol // /** @@ -206,7 +206,7 @@ } // -// Function: PlatformDebugPrint / sub_540 +// Function: PlatformDebugPrint // /** @@ -279,7 +279,7 @@ } // - // Call protocol's DebugPrint only if the status mask matches. + // Call protocol's DebugAssert only if the status mask matches. // if ((RouteMask & Status) != 0) { Protocol->DebugAssert (Status, FormatString, NULL); @@ -287,7 +287,7 @@ } // -// Function: ReadUnaligned64 / sub_750 +// Function: ReadUnaligned64 // /** @@ -317,7 +317,7 @@ } // -// Function: IsSkuConfigTableGuid / sub_6E0 +// Function: IsSkuConfigTableGuid // /** @@ -357,7 +357,7 @@ } // -// Function: GetSkuConfigTable / sub_608 +// Function: GetSkuConfigTable // /** @@ -445,7 +445,7 @@ } // -// Function: ModuleEntryPoint / sub_390 +// Function: ModuleEntryPoint // /** @@ -599,4 +599,4 @@ // [Enable/Disable, MMIO Addr Low, MMIO Addr High, IRQ source, ...] // // The ACPF interface is self-contained (board type field). -// \ No newline at end of file +// diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.c index 028f391..c2143a0 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.c @@ -115,7 +115,7 @@ }; // --------------------------------------------------------------------------- -// ReadUnaligned64 (sub_740) +// ReadUnaligned64 // --------------------------------------------------------------------------- /// @@ -155,7 +155,7 @@ } // --------------------------------------------------------------------------- -// CompareGuid (sub_6D0) +// CompareGuid // --------------------------------------------------------------------------- /// @@ -191,7 +191,7 @@ } // --------------------------------------------------------------------------- -// GetDebugPrintProtocol (sub_4B0) +// GetDebugPrintProtocol // --------------------------------------------------------------------------- /// @@ -268,7 +268,7 @@ } // --------------------------------------------------------------------------- -// DebugPrint (sub_530) +// DebugPrint // --------------------------------------------------------------------------- /// @@ -376,7 +376,7 @@ } // --------------------------------------------------------------------------- -// AssertPrint (sub_5B8) +// AssertPrint // --------------------------------------------------------------------------- /// @@ -424,7 +424,7 @@ } // --------------------------------------------------------------------------- -// GetHobList (sub_5F8) +// GetHobList // --------------------------------------------------------------------------- /// @@ -531,7 +531,7 @@ } // --------------------------------------------------------------------------- -// UsbOcGetConfigTables (sub_48C) +// UsbOcGetConfigTables // --------------------------------------------------------------------------- /// @@ -751,4 +751,4 @@ // Return the status from either LocateProtocol or SetData. // return Status; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.h index 4d16ac6..aedf454 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB2/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXECB2.h @@ -186,13 +186,13 @@ /// /// Cached pointer to the UBA Debug Print Protocol interface. -/// Initialized lazily by GetDebugPrintProtocol() (sub_4B0). +/// Initialized lazily by GetDebugPrintProtocol(). /// Located at 0xC70. /// extern UBA_DEBUG_PRINT_PROTOCOL *gDebugPrintProtocol; /// -/// Cached HOB list pointer, initialized by GetHobList() (sub_5F8). +/// Cached HOB list pointer, initialized by GetHobList(). /// Located at 0xC78. /// extern VOID *gHobList; @@ -348,4 +348,4 @@ IN CONST VOID *Buffer ); -#endif // USB_OC_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B2_H_ \ No newline at end of file +#endif // USB_OC_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B2_H_ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.c index 47c3848..691646b 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.c @@ -78,7 +78,7 @@ /// /// UBA Debug Library Protocol GUID /// Image offset: 0xBD0 (duplicate of IIO Table 1 GUID -- the decompiler -/// references 0xBD0 as the debug lib protocol GUID in sub_510). +/// references 0xBD0 as the debug lib protocol GUID in LocateUbaDebugProtocol). /// STATIC CONST EFI_GUID mUbaDebugLibProtocolGuid = UBA_DEBUG_LIB_PROTOCOL_GUID; @@ -689,4 +689,4 @@ // Dereference directly. // return *(CONST UINT64 *)Buffer; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.h index 6583aff..263bdf9 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/IioCfgUpdateDxe/IioCfgUpdateDxeLightningRidgeEXECB3.h @@ -1,7 +1,8 @@ /** @file - IioCfgUpdateDxeLightningRidgeEXECB3.h -- Header for IioCfgUpdateDxeLightningRidgeEXECB3 + IioCfgUpdateDxeLightningRidgeEXECB3.h -- Header for + IioCfgUpdateDxeLightningRidgeEXECB3 -Copyright (c) HR650X BIOS Decompilation Project + Copyright (c) HR650X BIOS Decompilation Project **/ #ifndef __IIOCFGUPDATEDXELIGHTNINGRIDGEEXECB3_H__ @@ -15,675 +16,60 @@ EFI_STATUS EFIAPI -ModuleEntryPoint( - VOID -); +ModuleEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ); EFI_STATUS EFIAPI -IioCfgUpdateEntryPoint( +IioCfgUpdateEntryPoint ( VOID -); + ); -EFI_STATUS +UINTN EFIAPI -UbaDebugPrint( - VOID -); +UbaDebugPrint ( + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + ... + ); -EFI_STATUS +VOID EFIAPI -UbaDebugAssert( - VOID -); +UbaDebugAssert ( + IN CONST CHAR8 *FileName, + IN UINTN LineNumber, + IN CONST CHAR8 *Description + ); -EFI_STATUS +VOID * EFIAPI -IsHobListGuid( +LocateUbaDebugProtocol ( VOID -); + ); -EFI_STATUS +VOID * EFIAPI -ReadUnaligned64( +GetHobList ( VOID -); + ); -EFI_STATUS +BOOLEAN EFIAPI -IIO Configuration Protocol GUID( - VOID -); +IsHobListGuid ( + IN EFI_GUID *Guid + ); -EFI_STATUS +UINT64 EFIAPI -offset: 0xBC0 (16 bytes)( - VOID -); +ReadUnaligned64 ( + IN CONST VOID *Buffer + ); -EFI_STATUS -EFIAPI -CONST EFI_GUID mUbaIioCfgProtocolGuid = UBA_IIO_CFG_PROTOCOL_GUID;( - VOID -); +extern EFI_HANDLE gImageHandle; +extern EFI_SYSTEM_TABLE *gST; +extern EFI_BOOT_SERVICES *gBS; +extern EFI_RUNTIME_SERVICES *gRT; -EFI_STATUS -EFIAPI -Table 1 GUID( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xBD0 (16 bytes)( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mIioCfgTable1Guid = IIO_CFG_TABLE_1_GUID;( - VOID -); - -EFI_STATUS -EFIAPI -Table 2 GUID( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xBE0 (16 bytes)( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mIioCfgTable2Guid = IIO_CFG_TABLE_2_GUID;( - VOID -); - -EFI_STATUS -EFIAPI -Table 3 GUID( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xBF0 (16 bytes)( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mIioCfgTable3Guid = IIO_CFG_TABLE_3_GUID;( - VOID -); - -EFI_STATUS -EFIAPI -Table 4 GUID( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xC00 (16 bytes)( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mIioCfgTable4Guid = IIO_CFG_TABLE_4_GUID;( - VOID -); - -EFI_STATUS -EFIAPI -HOB List GUID( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xC10 (16 bytes)( - VOID -); - -EFI_STATUS -EFIAPI -by IsHobListGuid() to identify the HOB list in ConfigurationTable[].( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mEfiHobListGuid = EFI_HOB_LIST_GUID;( - VOID -); - -EFI_STATUS -EFIAPI -Debug Library Protocol GUID( - VOID -); - -/// the decompiler -EFI_STATUS -EFIAPI -offset: 0xBD0 (duplicate of IIO Table 1 GUID( - VOID -); - -EFI_STATUS -EFIAPI -0xBD0 as the debug lib protocol GUID in sub_510).( - VOID -); - -EFI_STATUS -EFIAPI -CONST EFI_GUID mUbaDebugLibProtocolGuid = UBA_DEBUG_LIB_PROTOCOL_GUID;( - VOID -); - -EFI_STATUS -EFIAPI --- UEFI image handle for this driver.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDB0( - VOID -); - -EFI_STATUS -EFIAPI -gImageHandle = NULL;( - VOID -); - -EFI_STATUS -EFIAPI --- UEFI System Table pointer.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDA0( - VOID -); - -EFI_STATUS -EFIAPI -*gST = NULL;( - VOID -); - -EFI_STATUS -EFIAPI --- UEFI Boot Services pointer.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDA8( - VOID -); - -EFI_STATUS -EFIAPI -*gBS = NULL;( - VOID -); - -EFI_STATUS -EFIAPI --- UEFI Runtime Services pointer.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDB8( - VOID -); - -EFI_STATUS -EFIAPI -*gRT = NULL;( - VOID -); - -EFI_STATUS -EFIAPI --- Cached UBA debug protocol pointer.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDC0( - VOID -); - -EFI_STATUS -EFIAPI -lazily by LocateUbaDebugProtocol().( - VOID -); - -EFI_STATUS -EFIAPI -*mUbaDebugProtocol = NULL;( - VOID -); - -EFI_STATUS -EFIAPI --- Cached HOB list pointer.( - VOID -); - -EFI_STATUS -EFIAPI -offset: 0xDC8( - VOID -); - -EFI_STATUS -EFIAPI -lazily by GetHobList().( - VOID -); - -EFI_STATUS -EFIAPI -*mHobList = NULL;( - VOID -); - -EFI_STATUS -EFIAPI -1: Cache UEFI standard pointers globally.( - VOID -); - -EFI_STATUS -EFIAPI -= ImageHandle;( - VOID -); - -EFI_STATUS -EFIAPI -2: Validate non-NULL and cache boot/runtime services.( - VOID -); - -EFI_STATUS -EFIAPI -(ImageHandle == NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -3: Resolve the HOB list (cached in mHobList).( - VOID -); - -EFI_STATUS -EFIAPI -();( - VOID -); - -EFI_STATUS -EFIAPI -4: Dispatch the IIO configuration update.( - VOID -); - -EFI_STATUS -EFIAPI -= IioCfgUpdateEntryPoint ();( - VOID -); - -EFI_STATUS -EFIAPI -1: Initialize output variable and emit platform banner.( - VOID -); - -EFI_STATUS -EFIAPI -= NULL;( - VOID -); - -EFI_STATUS -EFIAPI -2: Locate the UBA IIO configuration protocol.( - VOID -); - -EFI_STATUS -EFIAPI -= gBS->LocateProtocol (( - VOID -); - -EFI_STATUS -EFIAPI -3: Register the four IIO PCIe topology configuration tables.( - VOID -); - -EFI_STATUS -EFIAPI -call passes the same PIIO header structure (48 bytes) but keyed( - VOID -); - -EFI_STATUS -EFIAPI -a different table GUID.( - VOID -); - -EFI_STATUS -EFIAPI -AddConfig function is at vtable index 2 (offset 0x10):( - VOID -); - -EFI_STATUS -EFIAPI -(*AddConfig)(( - VOID -); - -EFI_STATUS -EFIAPI -*This( - VOID -); - -EFI_STATUS -EFIAPI -EFI_GUID *ConfigGuid( - VOID -); - -EFI_STATUS -EFIAPI -VOID *ConfigData( - VOID -); - -EFI_STATUS -EFIAPI -ConfigDataSize( - VOID -); - -EFI_STATUS -EFIAPI -1: Primary IIO topology( - VOID -); - -EFI_STATUS -EFIAPI -= ((EFI_STATUS (*)(VOID *, CONST EFI_GUID *, CONST VOID *, UINTN))( - VOID -); - -EFI_STATUS -EFIAPI -2: Secondary IIO topology( - VOID -); - -EFI_STATUS -EFIAPI -3: Tertiary IIO topology( - VOID -); - -EFI_STATUS -EFIAPI -4: Quaternary IIO topology( - VOID -); - -EFI_STATUS -EFIAPI -cached pointer if already resolved.( - VOID -); - -EFI_STATUS -EFIAPI -(mUbaDebugProtocol != NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -pool size sanity check.( - VOID -); - -EFI_STATUS -EFIAPI -and immediately free a 31-byte buffer. If the returned pool( - VOID -); - -EFI_STATUS -EFIAPI -is <= 0x10, the system is in a state where protocol resolution( - VOID -); - -EFI_STATUS -EFIAPI -also fail, so bail out early.( - VOID -); - -EFI_STATUS -EFIAPI -the UBA debug protocol.( - VOID -); - -EFI_STATUS -EFIAPI -the UBA debug protocol (lazy init).( - VOID -); - -EFI_STATUS -EFIAPI -= LocateUbaDebugProtocol ();( - VOID -); - -EFI_STATUS -EFIAPI -CMOS register 0x4B to determine the board platform type.( - VOID -); - -EFI_STATUS -EFIAPI -sequence:( - VOID -); - -EFI_STATUS -EFIAPI -= IoRead8 (0x70);( - VOID -); - -EFI_STATUS -EFIAPI -platform type from CMOS value.( - VOID -); - -EFI_STATUS -EFIAPI -value is > 3 and equals 0, fall back to MMIO strapping register.( - VOID -); - -EFI_STATUS -EFIAPI -(PlatformType > 3) {( - VOID -); - -EFI_STATUS -EFIAPI -debug mask based on platform type.( - VOID -); - -EFI_STATUS -EFIAPI -1 = LightningRidge, others use a broader mask.( - VOID -); - -EFI_STATUS -EFIAPI -(PlatformType == 1) {( - VOID -); - -EFI_STATUS -EFIAPI -if the error level matches the platform debug mask.( - VOID -); - -EFI_STATUS -EFIAPI -((DebugMask & ErrorLevel) == 0) {( - VOID -); - -EFI_STATUS -EFIAPI -the protocol's DebugPrint function (vtable offset 0x00).( - VOID -); - -EFI_STATUS -EFIAPI -(VaList, Format);( - VOID -); - -EFI_STATUS -EFIAPI -the protocol's assertion handler (vtable offset 0x08).( - VOID -); - -EFI_STATUS -EFIAPI -(mHobList != NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -cache to NULL before scanning.( - VOID -); - -EFI_STATUS -EFIAPI -the configuration table array for the HOB list GUID.( - VOID -); - -EFI_STATUS -EFIAPI -(ConfigTable != NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -the GUID was not found, trigger a debug assert.( - VOID -); - -EFI_STATUS -EFIAPI -(mHobList == NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -);( - VOID -); - -EFI_STATUS -EFIAPI -the resolved pointer itself is NULL, trigger another assert.( - VOID -); - -EFI_STATUS -EFIAPI -GUID as two 64-bit halves.( - VOID -); - -EFI_STATUS -EFIAPI -(ReadUnaligned64 (&mEfiHobListGuid) == ReadUnaligned64 (Guid))( - VOID -); - -EFI_STATUS -EFIAPI -buffer pointer is not NULL.( - VOID -); - -EFI_STATUS -EFIAPI -(Buffer == NULL) {( - VOID -); - -EFI_STATUS -EFIAPI -directly.( - VOID -); - -EFI_STATUS -EFIAPI -*(CONST UINT64 *)Buffer;( - VOID -); - -#endif /* __IIOCFGUPDATEDXELIGHTNINGRIDGEEXECB3_H__ */ \ No newline at end of file +#endif diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.c index 830fdf8..88604f6 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.c @@ -1056,7 +1056,7 @@ // // Extract device type and PCI address from the configuration data. - // The configuration table at sub_77C uses board-specific values + // The UBA configuration table uses board-specific values // derived from string table entries. // // For each entry (0..29): @@ -1616,4 +1616,4 @@ ) { return SmbiosDataUpdateEntry (ImageHandle, SystemTable); -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.h index 27ad596..2a5c03a 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB3/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXECB3.h @@ -729,7 +729,7 @@ EFI_STATUS EFIAPI -configuration table at sub_77C uses board-specific values( +configuration table uses board-specific values( VOID ); @@ -1105,4 +1105,4 @@ VOID ); -#endif /* __SMBIOSDATAUPDATEDXELIGHTNINGRIDGEEXECB3_H__ */ \ No newline at end of file +#endif /* __SMBIOSDATAUPDATEDXELIGHTNINGRIDGEEXECB3_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.c index 5e8fcab..6b2cb54 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.c @@ -108,8 +108,8 @@ static CONST UINT8 OpromUpdateProtocolData[OPROM_UPDATE_PROTOCOL_DATA_SIZE] = { 0x50, 0x53, 0x45, 0x54, // "PSET" signature 0x01, 0x00, 0x00, 0x00, // Version = 1 - 0x8C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Callback -> sub_48C (0x48C) - 0x8C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Reserved / second copy -> sub_48C + 0x8C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Callback -> OpromOperationUnsupported (0x48C) + 0x8C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Reserved / second copy -> OpromOperationUnsupported }; // ============================================================================ @@ -680,4 +680,4 @@ } return Status; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.h index ad40b54..7377f42 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXECB4/OpromUpdateDxeLightningRidgeEXECB4.h @@ -14,7 +14,7 @@ * the Lightning Ridge EXEC B4 platform. Compared to the EXEC B1/B2/B3 * variants, this module is significantly smaller -- it registers a stub * OpROM update callback interface with a single "not supported" callback - * (sub_48C returns 0x800000000000000E = EFI_UNSUPPORTED), indicating that + * (OpromOperationUnsupported returns 0x800000000000000E = EFI_UNSUPPORTED), indicating that * the EXEC B4 platform does not perform any OpROM updates. * * The driver performs the following at entry: @@ -24,7 +24,7 @@ * OpROM update protocol interface (identified by GUID * CD1F9574-DD03-4196-96AD-4965146F9665). * 3. The registered interface contains the signature "PSET", version 1, - * and a single callback pointer to sub_48C which returns EFI_UNSUPPORTED. + * and a single callback pointer to OpromOperationUnsupported which returns EFI_UNSUPPORTED. * * DEPENDENCIES (Protocols consumed): * - UBA LightningRidgeEXECB4 Board-Type Protocol @@ -175,7 +175,7 @@ /// stub interface. It contains: /// - "PSET" signature (4 bytes) /// - Version field (4 bytes) -/// - Single callback pointer to sub_48C (8 bytes) +/// - Single callback pointer to OpromOperationUnsupported (8 bytes) /// - Second copy of the same pointer or reserved (8 bytes) /// /// The single callback returns EFI_UNSUPPORTED (0x800000000000000E), @@ -428,4 +428,4 @@ IN CONST VOID *Buffer ); -#endif /* _OPROM_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B4_H_ */ \ No newline at end of file +#endif /* _OPROM_UPDATE_DXE_LIGHTNING_RIDGE_EXEC_B4_H_ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.c index a618105..67f3b29 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.c @@ -192,7 +192,8 @@ // Entries 2-29 follow the same pattern with different field numbers, // string IDs, encodings, offsets, max lengths, and flags. // - // Full descriptor table details available in the disassembly at sub_77C. + // Full descriptor table details are captured in the local descriptor table + // definition above. // The table is a 300-byte (30 * 10) embedded constant array. // Key field numbers: 5 (Manufacturer), 6 (ProductName), 7 (Version), // 8 (SerialNumber), 9 (AssetTag), 10-29 (additional board strings). @@ -2553,7 +2554,7 @@ Constructs a formatted SMBIOS string record in the output buffer based on the string descriptor table entry at the given index. The descriptor - table (embedded in the code at sub_77C, address 0x77C) maps each index + table embedded above maps each index (0-29) to an SMBIOS Type 2 field with an associated HII string token. Each descriptor table entry is 10 bytes: @@ -2630,7 +2631,7 @@ // // Copy the descriptor field metadata into the record header at offsets 4-7. - // From the original binary (sub_77C, 0x77C): + // From the local descriptor table definition: // OutBuf[4] = FieldNumber // OutBuf[5] = Encoding // OutBuf[6] = MaxLength @@ -3053,7 +3054,7 @@ ) { // - // The initialization logic from the original sub_38C (address 0x38C) + // The initialization logic from the original entry-point sequence // has been inlined into ModuleEntryPoint() below. // // This function is kept as a stub for documentation purposes since the @@ -3275,4 +3276,4 @@ // Status = SmbiosDataUpdateEntry (ImageHandle); return Status; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.h index fea34ad..dc50271 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeLightningRidgeEXRP.h @@ -609,7 +609,7 @@ ); /** - Zeros a memory buffer. Wrapper around sub_280 fast zero. + Zeros a memory buffer. Wrapper around ZeroMemBase fast zero. @param[in] Buffer Pointer to the buffer to zero. @param[in] Length Number of bytes to zero. @@ -768,7 +768,7 @@ /** Copies memory with support for overlapping regions. - Wrapper around sub_300 which implements an optimized copy with + Wrapper around CopyMemBase which implements an optimized copy with overlap-safe reverse copy when source and destination overlap. @param[out] Destination Pointer to the destination buffer. @@ -881,4 +881,4 @@ IN UINT32 Value ); -#endif // SMBIOS_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXRP_H_ \ No newline at end of file +#endif // SMBIOS_DATA_UPDATE_DXE_LIGHTNING_RIDGE_EXRP_H_ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.c index 9e79900..7879641 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.c @@ -20,29 +20,29 @@ ::ImageHandle = (__int64)ImageHandle; if ( !ImageHandle ) - sub_5C8( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); ::SystemTable = (__int64)SystemTable; if ( !SystemTable ) - sub_5C8( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); BootServices = (__int64)SystemTable->BootServices; if ( !BootServices ) - sub_5C8( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); RuntimeServices = (__int64)SystemTable->RuntimeServices; if ( !RuntimeServices ) - sub_5C8( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); - sub_608(); + RegisterStaticSkuData(); v4 = 0; result = (*(__int64 (**)(void *, _QWORD, __int64 *))(BootServices + 320))(&unk_4090, 0, &v4); if ( (result & 0x8000000000000000uLL) == 0LL ) diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.h index 64ab088..e1fe03d 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/StaticSkuDataDxe/StaticSkuDataDxeLightningRidgeEXRP.h @@ -24,21 +24,21 @@ ); /// -/// sub_5C8 +/// DebugAssert /// EFI_STATUS EFIAPI -sub_5C8( +DebugAssert( VOID ); /// -/// sub_608 +/// RegisterStaticSkuData /// EFI_STATUS EFIAPI -sub_608( +RegisterStaticSkuData( VOID ); -#endif /* __STATICSKUDATADXELIGHTNINGRIDGEEXRP_H__ */ \ No newline at end of file +#endif /* __STATICSKUDATADXELIGHTNINGRIDGEEXRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXRP.c index 7257f44..2d84e9f 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeLightningRidgeEXRP/UsbOcUpdateDxe/UsbOcUpdateDxeLightningRidgeEXRP.c @@ -225,7 +225,7 @@ // // Locate the HOB list from the system configuration table. // This is required for HOB-based drivers that follow. - // @note 0x429: call sub_5F8 (GetHobList) + // @note 0x429: call GetHobList // GetHobList (ImageHandle); @@ -233,7 +233,7 @@ // Print debug banner indicating this driver is executing. // @note 0x434: lea rdx, "UBA:UsbOcUpdate-TypeLightningRidgeEXRP\n" // @note 0x43b: mov ecx, 0x80000000 (DEBUG_INFO error level) - // @note 0x440: call sub_530 (DebugPrint) + // @note 0x440: call DebugPrint // Interface = NULL; DebugPrint (DEBUG_INFO, "UBA:UsbOcUpdate-TypeLightningRidgeEXRP\n"); @@ -385,7 +385,7 @@ // - First 8 bytes at unk_B90: 4C F2 39 77 D7 93 D4 11 // - Second 8 bytes at unk_B98: 9A 3A 00 90 27 3F C1 4D // - // @note 0x63d: call sub_6D0(ImageHandle, &ConfigTable[Index].VendorGuid) + // @note 0x63d: call IsHobListGuid(ImageHandle, &ConfigTable[Index].VendorGuid) // if (IsHobListGuid (ImageHandle, &ConfigTable[Index].VendorGuid)) { // @@ -466,8 +466,8 @@ // Compare first 8 bytes of the GUID. // These are at unk_B90 in the .data section (offset 0xB90). // - // @note 0x6f6: call sub_740(&unk_B90) -- read first half of stored GUID - // @note 0x705: call sub_740(a2) -- read first half of candidate GUID + // @note 0x6f6: call ReadUnaligned64(&unk_B90) -- read first half of stored GUID + // @note 0x705: call ReadUnaligned64(a2) -- read first half of candidate GUID // @note 0x738: cmp rdi, rbx -- compare first halves // if (ReadUnaligned64 (&mUsbOcHobListFirstHalf) != ReadUnaligned64 (GuidPtr)) { @@ -482,8 +482,8 @@ // In the context of the SystemTable configuration table array, each entry // is 24 bytes: 16 for GUID + 8 for pointer. // - // @note 0x711: call sub_740(&unk_B98) -- read second half of stored GUID - // @note 0x714: call sub_740(a2 + 8) -- read second half of candidate GUID + // @note 0x711: call ReadUnaligned64(&unk_B98) -- read second half of stored GUID + // @note 0x714: call ReadUnaligned64(a2 + 8) -- read second half of candidate GUID // @note 0x738: cmp rbp, rax -- compare second halves // return ReadUnaligned64 (&mUsbOcHobListSecondHalf) == ReadUnaligned64 ((UINT8 *)GuidPtr + 8); @@ -820,4 +820,4 @@ } return *(volatile UINT64 *)Buffer; -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.c index 4cc3e65..dbb0243 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.c @@ -364,7 +364,7 @@ // // Dispatch function 0: UsbOcGetSteppingMapping // Returns the appropriate USB OC config table for the detected PCH stepping. - // Based on sub_5C8's logic. + // Based on UsbOcGetSteppingMapping's logic. // (UINT64)UsbOcGetSteppingMapping, // @@ -1129,4 +1129,4 @@ &mUsbOcUpdateDispatch, 16 ); -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.h index 668ae90..5e1af10 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPECB/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPECB.h @@ -502,7 +502,7 @@ EFI_STATUS EFIAPI -on sub_5C8's logic.( +on UsbOcGetSteppingMapping's logic.( VOID ); @@ -998,4 +998,4 @@ VOID ); -#endif /* __USBOCUPDATEDXENEONCITYEPECB_H__ */ \ No newline at end of file +#endif /* __USBOCUPDATEDXENEONCITYEPECB_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.c index 11b5e4f..3c1a387 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.c @@ -15,7 +15,7 @@ { ::ImageHandle = (__int64)ImageHandle; if (!ImageHandle) { - sub_604( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); @@ -23,7 +23,7 @@ ::SystemTable = (__int64)SystemTable; if (!SystemTable) { - sub_604( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); @@ -31,7 +31,7 @@ BootServices = (__int64)SystemTable->BootServices; if (!BootServices) { - sub_604( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); @@ -39,12 +39,12 @@ RuntimeServices = (__int64)SystemTable->RuntimeServices; if (!RuntimeServices) { - sub_604( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); } - sub_644(); - return sub_43C(); + GetHobList(); + return RegisterIioConfig(); } diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.h index 477e41c..e64770b 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/IioCfgUpdateDxe/IioCfgUpdateDxeNeonCityEPRP.h @@ -24,30 +24,30 @@ ); /// -/// sub_604 +/// DebugAssert /// EFI_STATUS EFIAPI -sub_604( +DebugAssert( VOID ); /// -/// sub_644 +/// GetHobList /// EFI_STATUS EFIAPI -sub_644( +GetHobList( VOID ); /// -/// sub_43C +/// RegisterIioConfig /// EFI_STATUS EFIAPI -sub_43C( +RegisterIioConfig( VOID ); -#endif /* __IIOCFGUPDATEDXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __IIOCFGUPDATEDXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.c index 16a100e..e569beb 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.c @@ -20,31 +20,31 @@ ::ImageHandle = (__int64)ImageHandle; if ( !ImageHandle ) - sub_720( + UbaAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); ::SystemTable = (__int64)SystemTable; if ( !SystemTable ) - sub_720( + UbaAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); BootServices = (__int64)SystemTable->BootServices; if ( !BootServices ) - sub_720( + UbaAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); RuntimeServices = (__int64)SystemTable->RuntimeServices; if ( !RuntimeServices ) - sub_720( + UbaAssert( "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); - sub_760(); + GetUbaProtocol(); v4 = 0; - sub_698(0x80000000LL, "UBA:OpromUpdate-TypeNeonCityEPRP\n"); + UbaDebugPrint(0x80000000LL, "UBA:OpromUpdate-TypeNeonCityEPRP\n"); result = (*(__int64 (**)(void *, _QWORD, __int64 *))(BootServices + 320))(&unk_CE0, 0, &v4); if ( (result & 0x8000000000000000uLL) == 0LL ) return (*(EFI_STATUS (**)(__int64, void *, void *, __int64))(v4 + 16))(v4, &unk_EA8, &unk_EB8, 48); diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.h index 504e395..8a67681 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/OpromUpdateDxeNeonCityEPRP.h @@ -24,30 +24,34 @@ ); /// -/// sub_720 +/// UbaAssert /// EFI_STATUS EFIAPI -sub_720( - VOID -); +UbaAssert( + IN CONST CHAR8 *FileName, + IN UINTN LineNumber, + IN CONST CHAR8 *Description + ); /// -/// sub_760 +/// GetUbaProtocol +/// +VOID * +EFIAPI +GetUbaProtocol( + VOID + ); + +/// +/// UbaDebugPrint /// EFI_STATUS EFIAPI -sub_760( - VOID -); +UbaDebugPrint( + IN UINTN ErrorLevel, + IN CHAR8 *Format, + ... + ); -/// -/// sub_698 -/// -EFI_STATUS -EFIAPI -sub_698( - VOID -); - -#endif /* __OPROMUPDATEDXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __OPROMUPDATEDXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.c index 8e05f25..c1d4cdd 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.c @@ -18,7 +18,7 @@ ::ImageHandle = (__int64)ImageHandle; if (!ImageHandle) { - sub_5C0( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); @@ -26,7 +26,7 @@ ::SystemTable = (__int64)SystemTable; if (!SystemTable) { - sub_5C0( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); @@ -34,7 +34,7 @@ BootServices = (__int64)SystemTable->BootServices; if (!BootServices) { - sub_5C0( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); @@ -42,15 +42,15 @@ RuntimeServices = (__int64)SystemTable->RuntimeServices; if (!RuntimeServices) { - sub_5C0( + DebugAssert( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 47, "gRT != ((void *) 0)"); } - sub_600(); + UefiDriverEntryPoint(); v4 = 0; - sub_538(0x80000000LL, "UBA:SlotDataUpdate-TypeNeonCityEPRP\n"); + DebugPrint(0x80000000LL, "UBA:SlotDataUpdate-TypeNeonCityEPRP\n"); result = (*(__int64 ( **)(void *, _QWORD, __int64 *))(BootServices + 320))(&unk_B50, 0, &v4); if ((result & 0x8000000000000000uLL) == 0LL) { return (*(EFI_STATUS ( **)(__int64, void *, void *, __int64))(v4 + 16))(v4, &unk_B60, &unk_B80, 32); diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.h index 18a6730..fba927c 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SlotDataUpdateDxe/SlotDataUpdateDxeNeonCityEPRP.h @@ -24,30 +24,30 @@ ); /// -/// sub_5C0 +/// DebugAssert /// EFI_STATUS EFIAPI -sub_5C0( +DebugAssert( VOID ); /// -/// sub_600 +/// UefiDriverEntryPoint /// EFI_STATUS EFIAPI -sub_600( +UefiDriverEntryPoint( VOID ); /// -/// sub_538 +/// DebugPrint /// EFI_STATUS EFIAPI -sub_538( +DebugPrint( VOID ); -#endif /* __SLOTDATAUPDATEDXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __SLOTDATAUPDATEDXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.c index f769917..5da8f3c 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.c @@ -832,7 +832,7 @@ if ( n3_1 <= n3 ) /*0x166d*/ { LABEL_36: - if ( !sub_21B4(SupportedLanguages_1, v4, n3_1) ) /*0x1678*/ + if ( !AsciiStrnCmp(SupportedLanguages_1, v4, n3_1) ) /*0x1678*/ break; /*0x1678*/ } SupportedLanguages_1 += n3; /*0x1682*/ @@ -1374,7 +1374,7 @@ return i; /*0x21ad*/ } -__int64 sub_21B4(const CHAR8 *SupportedLanguages, const CHAR8 *a2, unsigned __int64 n3) +__int64 AsciiStrnCmp(const CHAR8 *SupportedLanguages, const CHAR8 *a2, unsigned __int64 n3) { unsigned __int64 n3_1; // rdi const CHAR8 *SupportedLanguages_1; // rbx n3_1 = n3; /*0x21c3*/ SupportedLanguages_1 = SupportedLanguages; /*0x21c9*/ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.h index 557559d..c0c35c6 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityEPRP.h @@ -277,7 +277,7 @@ __int64 EFIAPI -sub_21B4( +AsciiStrnCmp( const CHAR8 *SupportedLanguages, const CHAR8 *a2, unsigned __int64 n3 @@ -304,4 +304,4 @@ UINTN n0xF4240 ); -#endif /* __SMBIOSDATAUPDATEDXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __SMBIOSDATAUPDATEDXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxe_decompiled.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxe_decompiled.c index 56e9df8..73fe167 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxe_decompiled.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/SmbiosDataUpdateDxe/SmbiosDataUpdateDxe_decompiled.c @@ -1195,7 +1195,7 @@ if ( n3_1 <= n3 ) /*0x166d*/ { LABEL_36: - if ( !sub_21B4(SupportedLanguages_1, v4, n3_1) ) /*0x1678*/ + if ( !AsciiStrnCmp(SupportedLanguages_1, v4, n3_1) ) /*0x1678*/ break; /*0x1678*/ } SupportedLanguages_1 += n3; /*0x1682*/ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.c index fdf6d6c..28d3b19 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.c @@ -18,7 +18,7 @@ ::ImageHandle = (__int64)ImageHandle; if (!ImageHandle) { - sub_5C8( + AssertReport( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 51, "gImageHandle != ((void *) 0)"); @@ -26,7 +26,7 @@ ::SystemTable = (__int64)SystemTable; if (!SystemTable) { - sub_5C8( + AssertReport( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 57, "gST != ((void *) 0)"); @@ -34,7 +34,7 @@ BootServices = (__int64)SystemTable->BootServices; if (!BootServices) { - sub_5C8( + AssertReport( "e:\\hs\\MdePkg\\Library\\UefiBootServicesTableLib\\UefiBootServicesTableLib.c", 63, "gBS != ((void *) 0)"); @@ -42,13 +42,13 @@ RuntimeServices = (__int64)SystemTable->RuntimeServices; if (!RuntimeServices) { - sub_5C8( + AssertReport( "e:\\hs\\MdePkg\\Library\\UefiRuntimeServicesTableLib\\UefiRuntimeServicesTableLib.c", 47, "gRT != ((void *) 0)"); } - sub_608(); + LoadAndRegisterStaticSkuData(); v4 = 0; result = (*(__int64 ( **)(void *, _QWORD, __int64 *))(BootServices + 320))(&unk_4070, 0, &v4); if ((result & 0x8000000000000000uLL) == 0LL) { diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.h index 5e5a00b..6c7bb7d 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/StaticSkuDataDxe/StaticSkuDataDxeNeonCityEPRP.h @@ -24,21 +24,21 @@ ); /// -/// sub_5C8 +/// AssertReport /// EFI_STATUS EFIAPI -sub_5C8( +AssertReport( VOID ); /// -/// sub_608 +/// LoadAndRegisterStaticSkuData /// EFI_STATUS EFIAPI -sub_608( +LoadAndRegisterStaticSkuData( VOID ); -#endif /* __STATICSKUDATADXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __STATICSKUDATADXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.c index e68f6f2..461c862 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.c @@ -16,9 +16,9 @@ EFI_STATUS result; // rax __int64 v3; // [rsp+40h] [rbp+18h] BYREF - sub_3F4(ImageHandle, SystemTable); + UefiDriverEntryPoint(ImageHandle, SystemTable); v3 = 0; - sub_870(0x80000000LL, "UBA:UsbOcUpdate-TypeNeonCityEPRP\n"); + DebugPrint(0x80000000LL, "UBA:UsbOcUpdate-TypeNeonCityEPRP\n"); result = (*(__int64 ( **)(void *, _QWORD, __int64 *))(qword_14A8 + 320))(&unk_1370, 0, &v3); if ((result & 0x8000000000000000uLL) == 0LL) { return (*(EFI_STATUS ( **)(__int64, void *, void *, __int64))(v3 + 16))(v3, &unk_1380, &unk_1428, 16); diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.h index 43a8bf7..ffe4230 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityEPRP/UsbOcUpdateDxe/UsbOcUpdateDxeNeonCityEPRP.h @@ -24,21 +24,23 @@ ); /// -/// sub_3F4 +/// UefiDriverEntryPoint /// EFI_STATUS EFIAPI -sub_3F4( - VOID +UefiDriverEntryPoint( + EFI_HANDLE ImageHandle, + EFI_SYSTEM_TABLE *SystemTable ); +/// DebugPrint /// -/// sub_870 -/// -EFI_STATUS +VOID EFIAPI -sub_870( - VOID +DebugPrint( + UINTN ErrorLevel, + CONST CHAR8 *Format, + ... ); -#endif /* __USBOCUPDATEDXENEONCITYEPRP_H__ */ \ No newline at end of file +#endif /* __USBOCUPDATEDXENEONCITYEPRP_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.c index 56dadb2..4578345 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.c @@ -74,7 +74,7 @@ FPGA_CONFIG_DATA mFpgaConfigData = { 0 }; // =========================================================================== -// Helper: Zero Memory (sub_370, 0x370-0x38F) +// Helper: ZeroMem (0x370-0x38F) // =========================================================================== /** @@ -105,7 +105,7 @@ } // =========================================================================== -// Assert Handler (sub_830, 0x830-0x86D) +// Assert Handler (DebugAssert, 0x830-0x86D) // =========================================================================== /** @@ -142,7 +142,7 @@ } // =========================================================================== -// CMOS Debug Level Reader (sub_7A8 inner logic, inline) +// CMOS Debug Level Reader (GetCmosDebugLevel inner logic, inline) // =========================================================================== /** @@ -181,7 +181,7 @@ } // =========================================================================== -// Debug Print (sub_7A8, 0x7A8-0x82F) +// Debug Print (DebugPrint, 0x7A8-0x82F) // =========================================================================== /** @@ -260,7 +260,7 @@ } // =========================================================================== -// GetDebugProtocol (sub_728, 0x728-0x7A6) +// GetDebugProtocol (0x728-0x7A6) // =========================================================================== /** @@ -315,7 +315,7 @@ } // =========================================================================== -// GUID Comparison (sub_BA4, 0xBA4-0xC0A) +// GUID Comparison (CompareGuid, 0xBA4-0xC0A) // =========================================================================== /** @@ -345,7 +345,7 @@ } // =========================================================================== -// ReadUnaligned64 (sub_C0C, 0xC0C-0xC3A) +// ReadUnaligned64 (0xC0C-0xC3A) // =========================================================================== /** @@ -375,7 +375,7 @@ } // =========================================================================== -// Allocate Pool (sub_C3C, 0xC3C-0xC6A) +// Allocate Pool (AllocatePool, 0xC3C-0xC6A) // =========================================================================== /** @@ -403,7 +403,7 @@ } // =========================================================================== -// Free Pool (sub_C6C, 0xC6C-0xCAE) +// Free Pool (FreePool, 0xC6C-0xCAE) // =========================================================================== /** @@ -431,7 +431,7 @@ } // =========================================================================== -// HOB List Locator (sub_870, 0x870-0x94C) +// HOB List Locator (GetHobList, 0x870-0x94C) // =========================================================================== /** @@ -498,7 +498,7 @@ } // =========================================================================== -// HOB Walk Sub-function (sub_950, 0x950-0x99C) +// HOB Walk Helper (FindGuidHob, 0x950-0x99C) // =========================================================================== /** @@ -557,7 +557,7 @@ } // =========================================================================== -// Get FPGA Config HOB (sub_9A0, 0x9A0-0xBA2) +// Get FPGA Config HOB (GetFpgaConfigHob, 0x9A0-0xBA2) // =========================================================================== /** @@ -768,7 +768,7 @@ } // =========================================================================== -// FPGA Configuration Data Entry (sub_51C, 0x51C-0x725) +// FPGA Configuration Data Entry (FpgaConfigDataEntry, 0x51C-0x725) // =========================================================================== /** @@ -945,7 +945,7 @@ } // =========================================================================== -// GetFpgaConfigData Protocol Callback (sub_448, 0x448-0x51B) +// GetFpgaConfigData Protocol Callback (GetFpgaConfigData, 0x448-0x51B) // =========================================================================== /** @@ -1118,4 +1118,4 @@ // GetHobList(); return FpgaConfigDataEntry(ImageHandle, NULL); -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.h index 52e0e29..56ae4e0 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/FpgaConfigDataDxe/FpgaConfigDataDxeNeonCityFPGA.h @@ -295,8 +295,7 @@ VOID *PxbConfig; /// - /// +0x10: Pointer to the GetFpgaConfigData callback function (sub_51C - /// wrapper or actual config access function at offset 0x448). + /// +0x10: Pointer to the GetFpgaConfigData callback function. /// VOID *ConfigDataPtr; } HSSI_CARD_CONFIG_ENTRY; @@ -377,13 +376,14 @@ UEFI module entry point. Called by the DXE dispatcher. Initializes gImageHandle, gST, gBS, gRT with standard UefiBootServicesTableLib - assertions. Then calls sub_870 to locate the HOB list, and sub_51C to perform + assertions. Then calls GetHobList to locate the HOB list, and + FpgaConfigDataEntry to perform the FPGA configuration data setup. @param[in] ImageHandle Handle for this driver image. @param[in] SystemTable Pointer to the UEFI system table. - @return EFI_STATUS from sub_51C. + @return EFI_STATUS from FpgaConfigDataEntry. **/ EFI_STATUS EFIAPI @@ -420,11 +420,13 @@ /** Main FPGA configuration data entry function. - Extracts configuration from the FPGA_CONFIG_DATA HOB (located by sub_9A0), + Extracts configuration from the FPGA_CONFIG_DATA HOB (located by + GetFpgaConfigHob), populates mFpgaConfigData, and installs the FPGA_CONFIG_PROTOCOL. @param[in] ImageHandle Image handle for protocol installation. - @param[in] Buffer Pointer to the HOB data buffer from sub_9A0. + @param[in] Buffer Pointer to the HOB data buffer from + GetFpgaConfigHob. @return EFI_SUCCESS on success, error code otherwise. **/ @@ -628,4 +630,4 @@ IN UINTN Size ); -#endif // FPGA_CONFIG_DATA_DXE_NEON_CITY_FPGA_H \ No newline at end of file +#endif // FPGA_CONFIG_DATA_DXE_NEON_CITY_FPGA_H diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.c b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.c index 4273b77..117d78a 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.c +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.c @@ -16,7 +16,7 @@ // Global variable declarations (from UEFI library headers and this module) // =========================================================================== -// System table and boot services (set by sub_38C, consumed by all functions) +// System table and boot services (set by InitializeDriver, consumed by all functions) extern EFI_SYSTEM_TABLE *gST; extern EFI_BOOT_SERVICES *gBS; extern EFI_HANDLE gImageHandle; @@ -59,7 +59,7 @@ IN UINTN Length ) { - // sub_280 at 0x280 -- memset to 0 in 8-byte chunks plus trailing bytes + // ZeroMem implementation // (inline implementation from BaseMemoryLibRepStr) CHAR8 *Buf = (CHAR8 *)Buffer; if (Length == 0) return Buffer; @@ -83,7 +83,6 @@ IN UINTN Length ) { - // sub_300 at 0x300 + sub_20AC at 0x20AC // CopyMem implementation with forward/backward overlap detection return CopyMem (Destination, Source, Length); } @@ -118,7 +117,7 @@ OUT UINT32 *Value ) { - // sub_2064 at 0x2064 + // MmioPciRead32 helper UINT32 Address; UINT32 Result; @@ -150,7 +149,7 @@ VOID ) { - // sub_1044 at 0x1044 + // GetDebugProtocol helper // Allocates 31 bytes then frees as a guard, then calls LocateProtocol // for the DebugLib protocol GUID at 0x31C0 if (mDebugProtocol == NULL) { @@ -189,7 +188,7 @@ ... ) { - // sub_10C4 at 0x10C4 + // DebugPrint helper VOID *Protocol; UINT8 CmosLevel; VA_LIST Va; @@ -240,7 +239,7 @@ IN const CHAR8 *Description ) { - // sub_114C at 0x114C + // DebugAssert helper VOID *Protocol; Protocol = GetDebugProtocol (); if (Protocol != NULL) { @@ -266,7 +265,7 @@ IN const VOID *Buffer ) { - // sub_12AC at 0x12AC + // ReadUnaligned32 helper ASSERT (Buffer != NULL); return *(volatile UINT32 *)Buffer; } @@ -283,7 +282,7 @@ IN const VOID *Buffer ) { - // sub_12DC at 0x12DC + // ReadUnaligned64 helper ASSERT (Buffer != NULL); return *(volatile UINT64 *)Buffer; } @@ -302,7 +301,7 @@ IN UINT64 Value ) { - // sub_130C at 0x130C + // WriteUnaligned64 helper ASSERT (Buffer != NULL); *(volatile UINT64 *)Buffer = Value; return Value; @@ -322,7 +321,7 @@ IN const EFI_GUID *Guid2 ) { - // sub_11D4 at 0x11D4 + // IsGuidEqual helper return ReadUnaligned64 (Guid1) == ReadUnaligned64 (Guid2) && ReadUnaligned64 ((UINT8 *)Guid1 + 8) == ReadUnaligned64 ((UINT8 *)Guid2 + 8); } @@ -343,7 +342,7 @@ IN UINTN Size ) { - // sub_137C at 0x137C + // AllocateZeroPool helper VOID *Buf = AllocatePool (Size); if (Buf != NULL) { ZeroMem (Buf, Size); @@ -363,7 +362,7 @@ IN VOID *Buffer ) { - // sub_13A4 at 0x13A4 + // FreePoolAssert helper EFI_STATUS Status = gBS->FreePool (Buffer); ASSERT_EFI_ERROR (Status); return Status; @@ -391,7 +390,7 @@ OUT VOID **Table ) { - // sub_13E8 at 0x13E8 (EfiGetSystemConfigurationTable) + // GetConfigurationTable helper (EfiGetSystemConfigurationTable equivalent) UINTN Index; ASSERT (TableGuid != NULL); @@ -423,7 +422,7 @@ VOID ) { - // sub_16E8 at 0x16E8 + // GetHobList helper EFI_STATUS Status; if (gHobList == NULL) { @@ -455,7 +454,7 @@ OUT CHAR8 **Language ) { - // sub_14AC at 0x14AC + // GetPlatformLanguage helper UINTN Size; EFI_STATUS Status; @@ -517,7 +516,7 @@ ... ) { - // sub_15A4 at 0x15A4 + // FindLanguage helper CHAR8 *TargetLanguage; VA_LIST Args; UINTN TargetLen; @@ -595,7 +594,7 @@ IN CHAR8 *Language ) { - // sub_1A44 at 0x1A44 + // GetHiiString helper UINTN Size; CHAR16 *String; EFI_STATUS Status; @@ -661,7 +660,7 @@ IN CHAR8 *Language OPTIONAL ) { - // sub_176C at 0x176C (full version with language resolution) + // GetLocalizedHiiString helper CHAR8 *PlatformLang; CHAR16 *Result; EFI_STATUS Status; @@ -714,7 +713,7 @@ OUT UINTN *StringOffset ) { - // sub_1DC8 at 0x1DC8 + // GetNextSmbiosString helper CHAR8 *Base; UINTN Offset; UINTN Index; @@ -760,7 +759,7 @@ IN VOID *Buffer ) { - // sub_1E1C at 0x1E1C -- calls gSmbios3->RemoveString(0, -2, Buffer) + // UpdateSmbiosRecord helper -- calls gSmbios3->RemoveString(0, -2, Buffer) // and gSmbios3->Add() EFI_STATUS Status; @@ -792,7 +791,7 @@ IN UINT8 Type ) { - // sub_1FB4 at 0x1FB4 + // RemoveSmbiosRecordsByType helper EFI_STATUS Status; UINTN Count; EFI_SMBIOS_HANDLE SmbiosHandle; @@ -835,7 +834,7 @@ IN UINT8 Type ) { - // sub_1F50 at 0x1F50 + // RemoveSingleSmbiosRecord helper EFI_SMBIOS_HANDLE Handle; EFI_STATUS Status; @@ -869,7 +868,7 @@ IN const CHAR8 *String ) { - // sub_2148 at 0x2148 + // AsciiStrLen helper UINTN Len; ASSERT (String != NULL); @@ -901,7 +900,7 @@ IN UINTN Length ) { - // sub_21B4 at 0x21B4 + // AsciiStrnCmp helper ASSERT (AsciiStrSize (FirstString) != -1); ASSERT (AsciiStrSize (SecondString) != -1); ASSERT (Length <= PCD_MAX_ASCII_STRING_LENGTH); @@ -948,7 +947,7 @@ IN UINTN DestMax ) { - // sub_2280 at 0x2280 + // StrnLenS helper ASSERT (((UINTN)String & 1) == 0); // Must be 2-byte aligned if (String == NULL || DestMax == 0) return 0; @@ -979,7 +978,7 @@ IN UINTN DestMax ) { - // sub_22E8 at 0x22E8 + // AsciiStrnLenS helper if (String == NULL || DestMax == 0) return 0; if (String[0] == '\0') return 0; @@ -1014,7 +1013,7 @@ IN UINTN DestMax ) { - // sub_2314 at 0x2314 + // UnicodeStrnToAsciiStrS helper UINTN SourceLen; ASSERT (((UINTN)Source & 1) == 0); @@ -1096,7 +1095,7 @@ IN CHAR16 *StringSrc ) { - // sub_1AE8 at 0x1AE8 + // UpdateSmbiosString helper CHAR8 *AsciiString; UINTN AsciiLen; UINTN StringAreaOffset; @@ -1219,7 +1218,7 @@ IN UINTN Index ) { - // sub_77C at 0x77C + // UpdateSmbiosType08 helper // // Table of string token ID pairs for each of the 21 port connector entries. // Each entry occupies 10 bytes: @@ -1288,7 +1287,7 @@ UpdateSmbiosString (Buffer, 0, Entry[4], HiiStr); FreePoolAssert (HiiStr); } else { - return EFI_OUT_OF_RESOURCES; // sub_77C returns 0x8000000000000009 + return EFI_OUT_OF_RESOURCES; // UpdateSmbiosType08 returns 0x8000000000000009 } // Update the second string if present @@ -1346,7 +1345,7 @@ IN UINTN Index ) { - // sub_A20 at 0xA20 + // UpdateSmbiosType09 helper SMBIOS_TABLE_TYPE9 *Type9Rec; UINT32 PciValue; UINT8 Device; @@ -1504,7 +1503,7 @@ IN UINTN Index ) { - // sub_D98 at 0xD98 + // UpdateSmbiosType41 helper SMBIOS_TABLE_TYPE41 *Type41Rec; UINT32 PciValue; UINT8 Device; @@ -1616,7 +1615,7 @@ IN UINTN Size ) { - // sub_F54 at 0xF54 + // SmbiosUpdateCallback helper VOID *RecordBuffer; UINTN Index; @@ -1684,7 +1683,7 @@ OUT EFI_HII_HANDLE *HiiHandle ) { - // sub_1908 at 0x1908 + // RegisterHiiPackageList helper EFI_HII_PACKAGE_LIST_HEADER *PackageListHdr; UINTN BufferSize; UINT8 *Buffer; @@ -1765,7 +1764,7 @@ IN EFI_SYSTEM_TABLE *SystemTable ) { - // sub_38C at 0x38C + // InitializeDriver helper EFI_STATUS Status; // --- Initialize UEFI library globals --- @@ -1863,7 +1862,7 @@ ... ) { - // sub_654 at 0x654 + // RegisterSmbiosUpdate helper EFI_STATUS Status; UBA_SMBIOS_UPDATE_PROTOCOL *Protocol; EFI_HANDLE Handle; @@ -1954,4 +1953,4 @@ // _ModuleEntryPoint at 0x370 InitializeDriver (ImageHandle, SystemTable); return RegisterSmbiosUpdate (ImageHandle); -} \ No newline at end of file +} diff --git a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.h b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.h index 402ca3e..481dfa9 100644 --- a/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.h +++ b/PurleyRpPkg/Uba/UbaMain/Dxe/TypeNeonCityFPGA/SmbiosDataUpdateDxe/SmbiosDataUpdateDxeNeonCityFPGA.h @@ -65,7 +65,7 @@ // HII string token IDs for SMBIOS string overrides // --------------------------------------------------------------------------- -/// String token IDs used in sub_77C (type 8 port connector strings). +/// String token IDs used in UpdateSmbiosType08 (type 8 port connector strings). /// These correspond to strings embedded in the HII package list at 0x31F0. #define STR_TOKEN_TYPE08_00 16 ///< Token 16: string for slot/port arrangement #define STR_TOKEN_TYPE08_01 3 ///< Token 3: port type descriptor @@ -87,7 +87,7 @@ #define STR_TOKEN_TYPE08_17 22 ///< Token 22: port type descriptor #define STR_TOKEN_TYPE08_18 23 ///< Token 23: port type descriptor (actually 0x17=23) -/// String token IDs used in sub_A20 (type 9 system slot strings). +/// String token IDs used in UpdateSmbiosType09 (type 9 system slot strings). #define STR_TOKEN_TYPE09_00 24 ///< Token 24: slot designation #define STR_TOKEN_TYPE09_01 26 ///< Token 26: slot designation #define STR_TOKEN_TYPE09_02 8 ///< Token 8: slot designation @@ -97,7 +97,7 @@ #define STR_TOKEN_TYPE09_06 26 ///< Token 26: slot designation #define STR_TOKEN_TYPE09_07 27 ///< Token 27: slot designation -/// String token IDs used in sub_D98 (type 41 onboard device strings). +/// String token IDs used in UpdateSmbiosType41 (type 41 onboard device strings). #define STR_TOKEN_TYPE41_00 28 ///< Token 28: device description (reference designator) #define STR_TOKEN_TYPE41_01 29 ///< Token 29: device description #define STR_TOKEN_TYPE41_02 30 ///< Token 30: device description @@ -130,7 +130,7 @@ // SmbiosRecordBuffer struct -- temp buffer layout for SMBIOS record building // --------------------------------------------------------------------------- // -// The buffer is allocated at sub_F54+0xa via sub_137C(768). sub_123C zerofills. +// The buffer is allocated at SmbiosUpdateCallback+0xa via AllocateZeroPool(768). // Layout (relative to buffer start): // +0x00: UINT8 Type (SMBIOS type: 8, 9, or 41) // +0x01: UINT8 Length (structure length, varies by type) @@ -149,4 +149,4 @@ IN EFI_SYSTEM_TABLE *SystemTable ); -#endif /* __SMBIOS_DATA_UPDATE_DXE_NEONCITY_FPGA_H__ */ \ No newline at end of file +#endif /* __SMBIOS_DATA_UPDATE_DXE_NEONCITY_FPGA_H__ */ diff --git a/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.c b/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.c index 178ea30..e41a4da 100644 --- a/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.c +++ b/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.c @@ -12005,7 +12005,7 @@ // Function: DxeRegister_47 @ 0x33004 (0x20 bytes) -__int64 __fastcall sub_33004(__int64 *a1) +__int64 __fastcall DxeRegister_47(__int64 *a1) { DxeRegister_27(); /*0x3300d*/ return RegRegister_46(a1, 1u); /*0x3301a*/ @@ -12106,7 +12106,7 @@ // Function: DxeRegister_57 @ 0x331fc (0x46 bytes) -__int64 __fastcall sub_331FC(__int64 a1) +__int64 __fastcall DxeRegister_57(__int64 a1) { __int64 v3; // [rsp+30h] [rbp+8h] BYREF __int64 v4; // [rsp+38h] [rbp+10h] BYREF @@ -12564,7 +12564,7 @@ // Function: DxeRegister_51 @ 0x33b10 (0x11a bytes) -__int64 __fastcall sub_33B10(__int64 a1, __int64 a2, __int64 a3, __int64 a4) +__int64 __fastcall DxeRegister_51(__int64 a1, __int64 a2, __int64 a3, __int64 a4) { if ( *(_DWORD *)(a1 + 268) == 14 ) /*0x33b24*/ { @@ -13334,7 +13334,7 @@ // Function: DxeRegister_53 @ 0x34d64 (0xe2 bytes) -__int64 __fastcall sub_34D64(__int64 a1, char a2, char a3, char a4) +__int64 __fastcall DxeRegister_53(__int64 a1, char a2, char a3, char a4) { int v5; // esi unsigned int v9; // ebx @@ -13421,7 +13421,7 @@ // Function: DxeRegister_55 @ 0x34f2c (0x7b bytes) -__int64 __fastcall sub_34F2C(__int64 *a1, unsigned __int8 a2) +__int64 __fastcall DxeRegister_55(__int64 *a1, unsigned __int8 a2) { int i; // ebx unsigned int v5; // ebp @@ -15765,14 +15765,14 @@ // Function: JUMPOUT_w @ 0x37b64 (0x1a bytes) -void sub_37B64() +void JUMPOUT_w() { JUMPOUT(0x37BE0); /*0x37be0*/ } // Function: DxeRegister_39 @ 0x37b9c (0x43 bytes) -__int64 __fastcall sub_37B9C(__int64 *a1) +__int64 __fastcall DxeRegister_39(__int64 *a1) { __int64 result; // rax unsigned int v3; // ebx @@ -16154,7 +16154,7 @@ // Function: DxeInit_0 @ 0x38b84 (0x20 bytes) -__int64 __fastcall sub_38B84(__int64 *a1) +__int64 __fastcall DxeInit_0(__int64 *a1) { __int64 result; // rax @@ -16651,7 +16651,7 @@ // Function: DxeRegister_58 @ 0x39668 (0x44 bytes) -__int64 __fastcall sub_39668(__int64 a1) +__int64 __fastcall DxeRegister_58(__int64 a1) { __int64 result; // rax unsigned int v3; // ebx @@ -17158,7 +17158,7 @@ // Function: NiiGetMcIpToMac @ 0x3a15c (0x29 bytes) -__int64 __fastcall sub_3A15C(__int64 a1) +__int64 __fastcall NiiGetMcIpToMac(__int64 a1) { if ( (unsigned int)(*(_DWORD *)(a1 + 268) - 3) <= 2 && *(_DWORD *)(a1 + 868) == 255 ) /*0x3a174*/ *(_DWORD *)(a1 + 868) = 3; /*0x3a176*/ @@ -17524,7 +17524,7 @@ // Function: NiiNullStub @ 0x3a8c8 (0x3 bytes) -char sub_3A8C8() +char NiiNullStub() { return 0; /*0x3a8ca*/ } @@ -17858,7 +17858,7 @@ if ( !v3 ) /*0x3af8a*/ return 0; /*0x3af64*/ *(_BYTE *)(a1 + 837) = 0; /*0x3af8f*/ - sub_3E098(a1); /*0x3af96*/ + PhyCheckLinkSpeedCap(a1); /*0x3af96*/ if ( *(_BYTE *)(a1 + 835) ) /*0x3af9b*/ { (*(void (__fastcall **)(__int64))(a1 + 208))(a1); /*0x3afae*/ @@ -19108,13 +19108,13 @@ __int64 (__fastcall *CompNameGetSupportedLang_1)(__int64); // rax v2 = IscsiSetup(a1); /*0x3c61b*/ - *(_QWORD *)(a1 + 1152) = sub_3BD98; /*0x3c627*/ - *(_QWORD *)(a1 + 1168) = sub_3BDA4; /*0x3c635*/ + *(_QWORD *)(a1 + 1152) = DxeRegWrapReg30; /*0x3c627*/ + *(_QWORD *)(a1 + 1168) = DxeRegWrapReg47; /*0x3c635*/ *(_QWORD *)(a1 + 1192) = CompNameGetChildHandle; /*0x3c643*/ if ( (UtlRegisterWrite((__int64 *)a1, 0x10u) & 0x80000) != 0 ) /*0x3c653*/ { *(_DWORD *)(a1 + 1248) = 4; /*0x3c655*/ - *(_QWORD *)(a1 + 1160) = sub_3BFC4; /*0x3c666*/ + *(_QWORD *)(a1 + 1160) = NiiChunkedTransmit; /*0x3c666*/ *(_QWORD *)(a1 + 1208) = CompNameGetControllerName; /*0x3c674*/ *(_QWORD *)(a1 + 1200) = CompNameInitSupportedLang; /*0x3c682*/ CompNameGetSupportedLang_1 = CompNameGetSupportedLang; /*0x3c689*/ @@ -20073,7 +20073,7 @@ // Function: DxeRegister_56 @ 0x3da10 (0x66 bytes) -__int64 __fastcall sub_3DA10(__int64 a1) +__int64 __fastcall DxeRegister_56(__int64 a1) { __int64 result; // rax bool v3; // [rsp+30h] [rbp+8h] BYREF @@ -22180,9 +22180,9 @@ RegRegister_16 = RegRegister_1; /*0x405cd*/ } *(_QWORD *)(a1 + 1184) = RegRegister_16; /*0x405d4*/ - *(_QWORD *)(a1 + 1192) = sub_435E4; /*0x405e2*/ - *(_QWORD *)(a1 + 1200) = sub_4301C; /*0x405f0*/ - *(_QWORD *)(a1 + 1208) = sub_42B54; /*0x405fe*/ + *(_QWORD *)(a1 + 1192) = NvmReadDefaultWord; /*0x405e2*/ + *(_QWORD *)(a1 + 1200) = NvmInitMacAddress; /*0x405f0*/ + *(_QWORD *)(a1 + 1208) = RegRegisterWriteBlock; /*0x405fe*/ return 0; /*0x4060c*/ } @@ -23117,7 +23117,7 @@ { v5 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(a1 + 1024))(a1, 24625, v6); /*0x41cf8*/ if ( !v5 ) /*0x41cfc*/ - v5 = sub_408C4(a1, 0x887u, 0x34u); /*0x41d0f*/ + v5 = MngWriteWordField(a1, 0x887u, 0x34u); /*0x41d0f*/ } (*(void (__fastcall **)(__int64))(a1 + 984))(a1); /*0x41d14*/ return v5; /*0x41d14*/ @@ -23474,7 +23474,7 @@ // Function: DxeRegister_3 @ 0x42438 (0x1fa bytes) -__int64 __fastcall sub_42438(__int64 a1, unsigned __int16 a2, unsigned __int16 a3, __int64 a4) +__int64 __fastcall DxeRegister_3(__int64 a1, unsigned __int16 a2, unsigned __int16 a3, __int64 a4) { unsigned __int16 v5; // ax unsigned int v7; // edi @@ -24755,7 +24755,7 @@ // Function: DxeRegister_32 @ 0x43fbc (0x74 bytes) -void __fastcall sub_43FBC(__int64 a1) +void __fastcall DxeRegister_32(__int64 a1) { __int16 v2; // di unsigned __int16 p_n0xFFFF; // [rsp+30h] [rbp+8h] BYREF diff --git a/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.h b/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.h index 3b2c21f..db556b1 100644 --- a/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.h +++ b/PurleyRpPkg/Uba/UbaMain/Pei/UbaMainPeim/UbaMainPeim.h @@ -523,16 +523,16 @@ // DxeRegister_17 @ 0x4285c // DxeRegister_9 @ 0x4291c // DxeRegister_6 @ 0x42a2c -// sub_42B54 @ 0x42b54 +// RegRegisterWriteBlock @ 0x42b54 // RegRegister_2 @ 0x42bfc // RegRegister_1 @ 0x42e04 -// sub_4301C @ 0x4301c +// NvmInitMacAddress @ 0x4301c // DxeRegister_5 @ 0x430c0 // DxeRegister_4 @ 0x431fc // DxeRegister_21 @ 0x43338 // DxeRegister_23 @ 0x433d0 // DxeRegister_48 @ 0x43464 -// sub_435E4 @ 0x435e4 +// NvmReadDefaultWord @ 0x435e4 // MngUpdateFwImage @ 0x43628 // MngCalcFwCrc @ 0x4372c // MngFwUpdateBlock @ 0x43754 diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.c index 1721962..e0967b8 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.c @@ -3599,7 +3599,7 @@ // Function: AssertCpuDeadLoop_5 @ 0xffd71934 (0x6e bytes) -int sub_FFD71934() +int AssertCpuDeadLoop_5() { int BootMode; // eax int v1; // eax @@ -7097,7 +7097,7 @@ // Function: PciGetInfo @ 0xffd74f1b (0x30 bytes) -char __thiscall sub_FFD74F1B(unsigned int n1024068) +char __thiscall PciGetInfo(unsigned int n1024068) { int v2; // eax @@ -7539,4 +7539,3 @@ return sub_FFD74EF1((void *)5); /*0xffd7636e*/ return v4; /*0xffd76387*/ } - diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.h b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.h index 5f21040..f074b84 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.h +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInit/SiInit.h @@ -33,7 +33,7 @@ EFI_STATUS EFIAPI -if ( sub_FFD74F1B(0xFA044u) >= 0 )( +if ( PciGetInfo(0xFA044u) >= 0 )( VOID ); @@ -117,7 +117,7 @@ EFI_STATUS EFIAPI -v0 = sub_FFD7173C();( +v0 = PeiServicesGetBootMode();( VOID ); @@ -129,7 +129,7 @@ EFI_STATUS EFIAPI -v6 = sub_FFD7173C();( +v6 = PeiServicesGetBootMode();( VOID ); @@ -141,7 +141,7 @@ EFI_STATUS EFIAPI -v5 = sub_FFD7173C();( +v5 = PeiServicesGetBootMode();( VOID ); @@ -195,7 +195,7 @@ EFI_STATUS EFIAPI -result = sub_FFD6D2B4();( +result = DebugAssert();( VOID ); @@ -1075,4 +1075,4 @@ VOID ); -#endif /* __SIINIT_H__ */ \ No newline at end of file +#endif /* __SIINIT_H__ */ diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.c index 7d9f265..1741550 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.c @@ -123,7 +123,7 @@ } //============================================================================= -// Debug Output: sub_FFD7F97E / GetDebugInterface +// Debug Output: GetReportStatusCodePpi / GetDebugInterface //============================================================================= // // Locates the ReportStatusCode PPI (GUID: 36232936-0E76-31C8-...) @@ -160,7 +160,7 @@ } //============================================================================= -// Debug Print: sub_FFD7F9AF +// Debug Print: DebugPrint //============================================================================= // // Conditional debug print via ReportStatusCode PPI. @@ -207,7 +207,7 @@ } //============================================================================= -// PPI Install: sub_FFD7F948 +// PPI Install: InstallPpi //============================================================================= // // Thin wrapper: PeiServices->InstallPpi(PpiList) @@ -225,7 +225,7 @@ } //============================================================================= -// Performance Log: sub_FFD7FBC7 / sub_FFD7FC48 +// Performance Log: RecordPerformanceEntry / EndPerformanceMeasurement //============================================================================= // // Records a TSC-based performance entry. Uses a buffer tracked via @@ -365,7 +365,7 @@ } //============================================================================= -// SiInitPrePolicy: sub_FFD7FD72 - TraceHub initialization +// SiInitPrePolicy: TraceHubInitialize - TraceHub initialization //============================================================================= // // Initializes Intel TraceHub (chipset trace/debug hub) MMIO BARs. @@ -472,7 +472,7 @@ } //============================================================================= -// SetupTraceHubFwBar: sub_FFD7FC9B +// SetupTraceHubFwBar: SetTraceHubFwBar //============================================================================= // // Programs the TraceHub FW_BAR at PCI config space offset 0x20. @@ -513,7 +513,7 @@ } //============================================================================= -// PrintPchInfo: sub_FFD816C4 - PCH series/stepping/SKU report +// PrintPchInfo: PrintPchInfo - PCH series/stepping/SKU report //============================================================================= // // Reads PCH device information and logs it via DebugPrint. @@ -614,7 +614,7 @@ } //============================================================================= -// PchWdtInit: sub_FFD87EED - Watchdog timer initialization +// PchWdtInit: PchWdtInit - Watchdog timer initialization //============================================================================= // // Reads WDT status from PCH and configures WDT control bits. @@ -692,7 +692,7 @@ } //============================================================================= -// PchWdtIsUnexpectedReset: sub_FFD87E99 +// PchWdtIsUnexpectedReset: PchWdtIsUnexpectedReset //============================================================================= // // Checks whether the WDT unexpected reset flag is set. @@ -707,7 +707,7 @@ } //============================================================================= -// InstallPchResetPpi: sub_FFD880D2 +// InstallPchResetPpi: InstallPchResetPpi //============================================================================= // // Installs two reset-related PPIs: @@ -778,7 +778,7 @@ } //============================================================================= -// PchResetInitCallback: sub_FFD88046 +// PchResetInitCallback: PchResetInitCallback //============================================================================= STATIC @@ -792,7 +792,7 @@ } //============================================================================= -// PchResetCallback2: sub_FFD88081 +// PchResetCallback2: PchResetCallback2 //============================================================================= STATIC @@ -806,7 +806,7 @@ } //============================================================================= -// InstallPchSpiPpi: sub_FFD87D42 +// InstallPchSpiPpi: InstallPchSpiPpi //============================================================================= EFI_STATUS @@ -863,7 +863,7 @@ } //============================================================================= -// PchInitPreMem: sub_FFD8155F - Main PCH pre-memory initialization +// PchInitPreMem: PchInitPreMem - Main PCH pre-memory initialization //============================================================================= EFI_STATUS @@ -1112,7 +1112,7 @@ } //============================================================================= -// PchFabricErrorCheck: sub_FFD80210 +// PchFabricErrorCheck: PchFabricErrorCheck //============================================================================= VOID @@ -1129,7 +1129,7 @@ } //============================================================================= -// PchEarlyDisabledDeviceHandling: sub_FFD80BA6 +// PchEarlyDisabledDeviceHandling: PchEarlyDisabledDeviceHandling //============================================================================= EFI_STATUS diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.h b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.h index 9890bf3..777eed0 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.h +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/SiInitPreMem.h @@ -303,7 +303,7 @@ EFI_STATUS EFIAPI -Output: sub_FFD7F97E / GetDebugInterface( +Output: GetReportStatusCodePpi / GetDebugInterface( VOID ); @@ -327,7 +327,7 @@ EFI_STATUS EFIAPI -Print: sub_FFD7F9AF( +Print: DebugPrint( VOID ); @@ -387,7 +387,7 @@ EFI_STATUS EFIAPI -Install: sub_FFD7F948( +Install: InstallPpi( VOID ); @@ -399,7 +399,7 @@ EFI_STATUS EFIAPI -Log: sub_FFD7FBC7 / sub_FFD7FC48( +Log: RecordPerformanceEntry / EndPerformanceMeasurement( VOID ); diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f7a1.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f7a1.c index df61f51..a2e28ab 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f7a1.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f7a1.c @@ -1,2 +1,2 @@ // 0xffd7f7a1 -{"addr":"0xffd7f7a1","code":"EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)\n{\n int v2; // eax\n int v3; // ecx\n void *v4; // ecx\n int v5; // ecx\n int v6; // eax\n int v7; // eax\n int v8; // eax\n unsigned __int64 v10; // [esp-Ch] [ebp-10h]\n\n if ( (sub_FFD9165B(1024068) & 0x80u) == 0 ) /*0xffd7f7b0*/\n {\n sub_FFD9168B(); /*0xffd7f7b2*/\n v2 = sub_FFD9164F(); /*0xffd7f7b7*/\n *(_BYTE *)(v2 + 1024068) |= 0x80u; /*0xffd7f7c3*/\n }\n sub_FFD7F9AF(64, (int)\"SiInitPrePolicy() Start\\n\"); /*0xffd7f88f*/\n sub_FFD7FD72(0); /*0xffd7f898*/\n sub_FFD7FBC7(v3, __rdtsc()); /*0xffd7f8a3*/\n sub_FFD816C4(); /*0xffd7f8a8*/\n sub_FFD7F9AF(64, (int)\"PchInitPrePolicy() - Start\\n\"); /*0xffd7f8b4*/\n sub_FFD87EED(); /*0xffd7f8b9*/\n sub_FFD880D2(); /*0xffd7f8be*/\n sub_FFD87D42(); /*0xffd7f8c3*/\n sub_FFD8155F(); /*0xffd7f8c8*/\n sub_FFD8B940(v4); /*0xffd7f8cd*/\n sub_FFD7F9AF(64, (int)\"PchInitPrePolicy() - End\\n\"); /*0xffd7f8d9*/\n v10 = __rdtsc(); /*0xffd7f8e5*/\n sub_FFD7FC48(v5, v10, HIDWORD(v10)); /*0xffd7f8e7*/\n v6 = sub_FFD8AD54(); /*0xffd7f8ec*/\n v7 = (*(int (__cdecl **)(int, void *))(*(_DWORD *)v6 + 36))(v6, &unk_FFD97FEC); /*0xffd7f8f9*/\n if ( v7 < 0 ) /*0xffd7f901*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v7); /*0xffd7f90e*/\n v8 = sub_FFD7F97E(); /*0xffd7f916*/\n if ( v8 ) /*0xffd7f91d*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd7f92e*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\SiInit\\\\Pei\\\\SiInitPreMem.c\",\n 155,\n \"!EFI_ERROR (Status)\");\n }\n sub_FFD7F9AF(64, (int)\"SiInitPrePolicy() - End\\n\"); /*0xffd7f93b*/\n return 0; /*0xffd7f947*/\n}","refs":[{"addr":"0xffd9168b","name":"sub_FFD9168B"},{"addr":"0xffd9164f","name":"sub_FFD9164F"},{"addr":"0xffd9165b","name":"sub_FFD9165B"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd919e8","name":"aSiinitprepolic","string":"SiInitPrePolicy() Start\n"},{"addr":"0xffd7fd72","name":"sub_FFD7FD72"},{"addr":"0xffd7fbc7","name":"sub_FFD7FBC7"},{"addr":"0xffd816c4","name":"sub_FFD816C4"},{"addr":"0xffd92c9c","name":"aPchinitprepoli","string":"PchInitPrePolicy() - Start\n"},{"addr":"0xffd87eed","name":"sub_FFD87EED"},{"addr":"0xffd880d2","name":"sub_FFD880D2"},{"addr":"0xffd87d42","name":"sub_FFD87D42"},{"addr":"0xffd8155f","name":"sub_FFD8155F"},{"addr":"0xffd8b940","name":"sub_FFD8B940"},{"addr":"0xffd92cb8","name":"aPchinitprepoli_0","string":"PchInitPrePolicy() - End\n"},{"addr":"0xffd7fc48","name":"sub_FFD7FC48"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97fec","name":"unk_FFD97FEC"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91988","name":"aEHsPurleysktpk","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\SiInit\\Pei\\SiInitPreMem.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd91a04","name":"aSiinitprepolic_0","string":"SiInitPrePolicy() - End\n"}]} \ No newline at end of file +{"addr":"0xffd7f7a1","code":"EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)\n{\n int v2; // eax\n int v3; // ecx\n void *v4; // ecx\n int v5; // ecx\n int v6; // eax\n int v7; // eax\n int v8; // eax\n unsigned __int64 v10; // [esp-Ch] [ebp-10h]\n\n if ( (sub_FFD9165B(1024068) & 0x80u) == 0 ) /*0xffd7f7b0*/\n {\n sub_FFD9168B(); /*0xffd7f7b2*/\n v2 = sub_FFD9164F(); /*0xffd7f7b7*/\n *(_BYTE *)(v2 + 1024068) |= 0x80u; /*0xffd7f7c3*/\n }\n DebugPrint(64, (int)\"SiInitPrePolicy() Start\\n\"); /*0xffd7f88f*/\n TraceHubInitialize(0); /*0xffd7f898*/\n RecordPerformanceEntry(v3, __rdtsc()); /*0xffd7f8a3*/\n PrintPchInfo(); /*0xffd7f8a8*/\n DebugPrint(64, (int)\"PchInitPrePolicy() - Start\\n\"); /*0xffd7f8b4*/\n PchWdtInit(); /*0xffd7f8b9*/\n InstallPchResetPpi(); /*0xffd7f8be*/\n InstallPchSpiPpi(); /*0xffd7f8c3*/\n PchInitPreMem(); /*0xffd7f8c8*/\n sub_FFD8B940(v4); /*0xffd7f8cd*/\n DebugPrint(64, (int)\"PchInitPrePolicy() - End\\n\"); /*0xffd7f8d9*/\n v10 = __rdtsc(); /*0xffd7f8e5*/\n EndPerformanceMeasurement(v5, v10, HIDWORD(v10)); /*0xffd7f8e7*/\n v6 = sub_FFD8AD54(); /*0xffd7f8ec*/\n v7 = (*(int (__cdecl **)(int, void *))(*(_DWORD *)v6 + 36))(v6, &unk_FFD97FEC); /*0xffd7f8f9*/\n if ( v7 < 0 ) /*0xffd7f901*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v7); /*0xffd7f90e*/\n v8 = GetReportStatusCodePpi(); /*0xffd7f916*/\n if ( v8 ) /*0xffd7f91d*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd7f92e*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\SiInit\\\\Pei\\\\SiInitPreMem.c\",\n 155,\n \"!EFI_ERROR (Status)\");\n }\n DebugPrint(64, (int)\"SiInitPrePolicy() - End\\n\"); /*0xffd7f93b*/\n return 0; /*0xffd7f947*/\n}","refs":[{"addr":"0xffd9168b","name":"sub_FFD9168B"},{"addr":"0xffd9164f","name":"sub_FFD9164F"},{"addr":"0xffd9165b","name":"sub_FFD9165B"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd919e8","name":"aSiinitprepolic","string":"SiInitPrePolicy() Start\n"},{"addr":"0xffd7fd72","name":"TraceHubInitialize"},{"addr":"0xffd7fbc7","name":"RecordPerformanceEntry"},{"addr":"0xffd816c4","name":"PrintPchInfo"},{"addr":"0xffd92c9c","name":"aPchinitprepoli","string":"PchInitPrePolicy() - Start\n"},{"addr":"0xffd87eed","name":"PchWdtInit"},{"addr":"0xffd880d2","name":"InstallPchResetPpi"},{"addr":"0xffd87d42","name":"InstallPchSpiPpi"},{"addr":"0xffd8155f","name":"PchInitPreMem"},{"addr":"0xffd8b940","name":"sub_FFD8B940"},{"addr":"0xffd92cb8","name":"aPchinitprepoli_0","string":"PchInitPrePolicy() - End\n"},{"addr":"0xffd7fc48","name":"EndPerformanceMeasurement"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97fec","name":"unk_FFD97FEC"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91988","name":"aEHsPurleysktpk","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\SiInit\\Pei\\SiInitPreMem.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd91a04","name":"aSiinitprepolic_0","string":"SiInitPrePolicy() - End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f948.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f948.c index b3f6309..34a493f 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f948.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f948.c @@ -1,2 +1,2 @@ // 0xffd7f948 -{"addr":"0xffd7f948","code":"int __thiscall sub_FFD7F948(void *this)\n{\n int v2; // eax\n\n v2 = sub_FFD8AD54(); /*0xffd7f94b*/\n return (*(int (__cdecl **)(int, void *))(*(_DWORD *)v2 + 24))(v2, this); /*0xffd7f959*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"}]} \ No newline at end of file +{"addr":"0xffd7f948","code":"int __thiscall InstallPpi(void *this)\n{\n int v2; // eax\n\n v2 = sub_FFD8AD54(); /*0xffd7f94b*/\n return (*(int (__cdecl **)(int, void *))(*(_DWORD *)v2 + 24))(v2, this); /*0xffd7f959*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f97e.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f97e.c index 5f27b48..cddfde9 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f97e.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f97e.c @@ -1,2 +1,2 @@ // 0xffd7f97e -{"addr":"0xffd7f97e","code":"int sub_FFD7F97E()\n{\n int v0; // eax\n _BYTE v2[4]; // [esp+0h] [ebp-8h] BYREF\n int v3; // [esp+4h] [ebp-4h] BYREF\n\n v0 = sub_FFD8AD54(); /*0xffd7f983*/\n if ( (*(int (__cdecl **)(int, void *, _DWORD, _BYTE *, int *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD97EAC, 0, v2, &v3) >= 0 ) /*0xffd7f9a2*/\n return v3; /*0xffd7f9a8*/\n else\n return 0; /*0xffd7f9a4*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97eac","name":"unk_FFD97EAC"}]} \ No newline at end of file +{"addr":"0xffd7f97e","code":"int GetReportStatusCodePpi()\n{\n int v0; // eax\n _BYTE v2[4]; // [esp+0h] [ebp-8h] BYREF\n int v3; // [esp+4h] [ebp-4h] BYREF\n\n v0 = sub_FFD8AD54(); /*0xffd7f983*/\n if ( (*(int (__cdecl **)(int, void *, _DWORD, _BYTE *, int *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD97EAC, 0, v2, &v3) >= 0 ) /*0xffd7f9a2*/\n return v3; /*0xffd7f9a8*/\n else\n return 0; /*0xffd7f9a4*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97eac","name":"unk_FFD97EAC"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9af.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9af.c index 8aada72..372555d 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9af.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9af.c @@ -1,2 +1,2 @@ // 0xffd7f9af -{"addr":"0xffd7f9af","code":"int sub_FFD7F9AF(int a1, int a2, ...)\n{\n int result; // eax\n int (__cdecl **v3)(int, int, char *); // esi\n va_list va; // [esp+10h] [ebp+Ch] BYREF\n\n va_start(va, a2);\n result = sub_FFD7F97E(); /*0xffd7f9b0*/\n v3 = (int (__cdecl **)(int, int, char *))result; /*0xffd7f9b5*/\n if ( result ) /*0xffd7f9b9*/\n {\n result = sub_FFD8AD05(); /*0xffd7f9bb*/\n if ( (result & a1) != 0 ) /*0xffd7f9c6*/\n return (*v3)(a1, a2, (char *)va); /*0xffd7f9d2*/\n }\n return result; /*0xffd7f9d7*/\n}","refs":[{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd8ad05","name":"sub_FFD8AD05"}]} \ No newline at end of file +{"addr":"0xffd7f9af","code":"int DebugPrint(int a1, int a2, ...)\n{\n int result; // eax\n int (__cdecl **v3)(int, int, char *); // esi\n va_list va; // [esp+10h] [ebp+Ch] BYREF\n\n va_start(va, a2);\n result = GetReportStatusCodePpi(); /*0xffd7f9b0*/\n v3 = (int (__cdecl **)(int, int, char *))result; /*0xffd7f9b5*/\n if ( result ) /*0xffd7f9b9*/\n {\n result = sub_FFD8AD05(); /*0xffd7f9bb*/\n if ( (result & a1) != 0 ) /*0xffd7f9c6*/\n return (*v3)(a1, a2, (char *)va); /*0xffd7f9d2*/\n }\n return result; /*0xffd7f9d7*/\n}","refs":[{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd8ad05","name":"sub_FFD8AD05"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9d9.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9d9.c index 1fc3da7..5ecead6 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9d9.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7f9d9.c @@ -1,2 +1,2 @@ // 0xffd7f9d9 -{"addr":"0xffd7f9d9","code":"int __fastcall sub_FFD7F9D9(int a1, int a2, const char *PeiServices____((void__)_0))\n{\n int result; // eax\n\n result = sub_FFD7F97E(); /*0xffd7f9df*/\n if ( result ) /*0xffd7f9e6*/\n return (*(int (__cdecl **)(int, int, const char *))(result + 4))(a1, a2, PeiServices____((void__)_0)); /*0xffd7f9ee*/\n return result; /*0xffd7f9f4*/\n}","refs":[{"addr":"0xffd7f97e","name":"sub_FFD7F97E"}]} \ No newline at end of file +{"addr":"0xffd7f9d9","code":"int __fastcall sub_FFD7F9D9(int a1, int a2, const char *PeiServices____((void__)_0))\n{\n int result; // eax\n\n result = GetReportStatusCodePpi(); /*0xffd7f9df*/\n if ( result ) /*0xffd7f9e6*/\n return (*(int (__cdecl **)(int, int, const char *))(result + 4))(a1, a2, PeiServices____((void__)_0)); /*0xffd7f9ee*/\n return result; /*0xffd7f9f4*/\n}","refs":[{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fa8d.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fa8d.c index a1e1713..98e9c05 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fa8d.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fa8d.c @@ -1,2 +1,2 @@ // 0xffd7fa8d -{"addr":"0xffd7fa8d","code":"int __fastcall sub_FFD7FA8D(int *a1, int *a2)\n{\n int v4; // eax\n int v5; // eax\n int v6; // eax\n int v7; // edi\n int v8; // eax\n int result; // eax\n int v10; // eax\n int v11; // eax\n\n if ( !a1 ) /*0xffd7fa9d*/\n {\n v4 = sub_FFD7F97E(); /*0xffd7fa9f*/\n if ( v4 ) /*0xffd7faa6*/\n (*(void (__cdecl **)(const char *, int, const char *))(v4 + 4))( /*0xffd7fab0*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 57,\n \"PeiPerformanceLog != ((void *) 0)\");\n }\n if ( !a2 ) /*0xffd7fab8*/\n {\n v5 = sub_FFD7F97E(); /*0xffd7faba*/\n if ( v5 ) /*0xffd7fac1*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd7facb*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 58,\n \"PeiPerformanceIdArray != ((void *) 0)\");\n }\n v6 = sub_FFD8CE7C(&unk_FFD97F9C); /*0xffd7fad8*/\n if ( v6 ) /*0xffd7fadf*/\n {\n *a1 = v6 + 24; /*0xffd7fae9*/\n v7 = sub_FFD8CE7C(&unk_FFD97ECC); /*0xffd7faf0*/\n if ( !v7 ) /*0xffd7faf4*/\n {\n v8 = sub_FFD7F97E(); /*0xffd7faf6*/\n if ( v8 ) /*0xffd7fafd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd7fb07*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 72,\n \"GuidHob != ((void *) 0)\");\n }\n result = v7 + 24; /*0xffd7fb0d*/\n }\n else\n {\n v10 = sub_FFD8CF46(&unk_FFD97F9C, 40008); /*0xffd7fb1b*/\n *a1 = v10; /*0xffd7fb22*/\n *a1 = sub_FFD8D4C8(v10, 40008); /*0xffd7fb2b*/\n v11 = sub_FFD8CF46(&unk_FFD97ECC, 4000); /*0xffd7fb39*/\n *a2 = v11; /*0xffd7fb40*/\n result = sub_FFD8D4C8(v11, 4000); /*0xffd7fb44*/\n }\n *a2 = result; /*0xffd7fb4a*/\n return result; /*0xffd7fb49*/\n}","refs":[{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91a5c","name":"aEHsMdemodulepk","string":"e:\\hs\\MdeModulePkg\\Library\\PeiPerformanceLib\\PeiPerformanceLib.c"},{"addr":"0xffd91a38","name":"aPeiperformance","string":"PeiPerformanceLog != ((void *) 0)"},{"addr":"0xffd91aa0","name":"aPeiperformance_0","string":"PeiPerformanceIdArray != ((void *) 0)"},{"addr":"0xffd8ce7c","name":"sub_FFD8CE7C"},{"addr":"0xffd97f9c","name":"unk_FFD97F9C"},{"addr":"0xffd97ecc","name":"unk_FFD97ECC"},{"addr":"0xffd91ac8","name":"aGuidhobVoid0","string":"GuidHob != ((void *) 0)"},{"addr":"0xffd8cf46","name":"sub_FFD8CF46"},{"addr":"0xffd8d4c8","name":"sub_FFD8D4C8"}]} \ No newline at end of file +{"addr":"0xffd7fa8d","code":"int __fastcall GetPerformanceLogBuffer(int *a1, int *a2)\n{\n int v4; // eax\n int v5; // eax\n int v6; // eax\n int v7; // edi\n int v8; // eax\n int result; // eax\n int v10; // eax\n int v11; // eax\n\n if ( !a1 ) /*0xffd7fa9d*/\n {\n v4 = GetReportStatusCodePpi(); /*0xffd7fa9f*/\n if ( v4 ) /*0xffd7faa6*/\n (*(void (__cdecl **)(const char *, int, const char *))(v4 + 4))( /*0xffd7fab0*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 57,\n \"PeiPerformanceLog != ((void *) 0)\");\n }\n if ( !a2 ) /*0xffd7fab8*/\n {\n v5 = GetReportStatusCodePpi(); /*0xffd7faba*/\n if ( v5 ) /*0xffd7fac1*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd7facb*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 58,\n \"PeiPerformanceIdArray != ((void *) 0)\");\n }\n v6 = sub_FFD8CE7C(&unk_FFD97F9C); /*0xffd7fad8*/\n if ( v6 ) /*0xffd7fadf*/\n {\n *a1 = v6 + 24; /*0xffd7fae9*/\n v7 = sub_FFD8CE7C(&unk_FFD97ECC); /*0xffd7faf0*/\n if ( !v7 ) /*0xffd7faf4*/\n {\n v8 = GetReportStatusCodePpi(); /*0xffd7faf6*/\n if ( v8 ) /*0xffd7fafd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd7fb07*/\n \"e:\\\\hs\\\\MdeModulePkg\\\\Library\\\\PeiPerformanceLib\\\\PeiPerformanceLib.c\",\n 72,\n \"GuidHob != ((void *) 0)\");\n }\n result = v7 + 24; /*0xffd7fb0d*/\n }\n else\n {\n v10 = sub_FFD8CF46(&unk_FFD97F9C, 40008); /*0xffd7fb1b*/\n *a1 = v10; /*0xffd7fb22*/\n *a1 = sub_FFD8D4C8(v10, 40008); /*0xffd7fb2b*/\n v11 = sub_FFD8CF46(&unk_FFD97ECC, 4000); /*0xffd7fb39*/\n *a2 = v11; /*0xffd7fb40*/\n result = sub_FFD8D4C8(v11, 4000); /*0xffd7fb44*/\n }\n *a2 = result; /*0xffd7fb4a*/\n return result; /*0xffd7fb49*/\n}","refs":[{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91a5c","name":"aEHsMdemodulepk","string":"e:\\hs\\MdeModulePkg\\Library\\PeiPerformanceLib\\PeiPerformanceLib.c"},{"addr":"0xffd91a38","name":"aPeiperformance","string":"PeiPerformanceLog != ((void *) 0)"},{"addr":"0xffd91aa0","name":"aPeiperformance_0","string":"PeiPerformanceIdArray != ((void *) 0)"},{"addr":"0xffd8ce7c","name":"sub_FFD8CE7C"},{"addr":"0xffd97f9c","name":"unk_FFD97F9C"},{"addr":"0xffd97ecc","name":"unk_FFD97ECC"},{"addr":"0xffd91ac8","name":"aGuidhobVoid0","string":"GuidHob != ((void *) 0)"},{"addr":"0xffd8cf46","name":"sub_FFD8CF46"},{"addr":"0xffd8d4c8","name":"sub_FFD8D4C8"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fbc7.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fbc7.c index 9998536..f420a70 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fbc7.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fbc7.c @@ -1,2 +1,2 @@ // 0xffd7fbc7 -{"addr":"0xffd7fbc7","code":"int __cdecl sub_FFD7FBC7(int a1, __int64 a2)\n{\n _DWORD *v2; // ecx\n int v3; // edx\n int v5; // edi\n int v6; // esi\n int v7; // eax\n int v8; // edx\n unsigned __int64 v9; // rax\n int v10; // [esp+8h] [ebp-8h] BYREF\n _DWORD *v11; // [esp+Ch] [ebp-4h] BYREF\n\n sub_FFD7FA8D((int *)&v11, &v10); /*0xffd7fbd4*/\n v2 = v11; /*0xffd7fbd9*/\n v3 = *v11; /*0xffd7fbdc*/\n if ( *v11 < 0x3E8u ) /*0xffd7fbe4*/\n {\n v5 = HIDWORD(a2); /*0xffd7fbfe*/\n v6 = 10 * v3; /*0xffd7fc04*/\n *v11 = v3 + 1; /*0xffd7fc07*/\n v2[v6 + 3] = 0; /*0xffd7fc0b*/\n v2[v6 + 10] = 0; /*0xffd7fc0f*/\n v2[v6 + 11] = 0; /*0xffd7fc13*/\n v7 = v10; /*0xffd7fc17*/\n v2[v6 + 2] = &unk_FFD97F8C; /*0xffd7fc1a*/\n *(_DWORD *)(v7 + 4 * v3) = 20704; /*0xffd7fc22*/\n v8 = a2; /*0xffd7fc29*/\n if ( !a2 ) /*0xffd7fc30*/\n {\n v9 = __rdtsc(); /*0xffd7fc32*/\n v5 = HIDWORD(v9); /*0xffd7fc34*/\n v8 = v9; /*0xffd7fc36*/\n }\n v2[v6 + 8] = v8; /*0xffd7fc38*/\n v2[v6 + 9] = v5; /*0xffd7fc3e*/\n return 0; /*0xffd7fc3c*/\n }\n else\n {\n sub_FFD7F9AF(0x80000000, (int)\"PEI performance log array out of resources\\n\"); /*0xffd7fbf0*/\n return -2147483639; /*0xffd7fbf7*/\n }\n}","refs":[{"addr":"0xffd7fa8d","name":"sub_FFD7FA8D"},{"addr":"0xffd97f8c","name":"unk_FFD97F8C"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd91ae4","name":"aPeiPerformance","string":"PEI performance log array out of resources\n"}]} \ No newline at end of file +{"addr":"0xffd7fbc7","code":"int __cdecl RecordPerformanceEntry(int a1, __int64 a2)\n{\n _DWORD *v2; // ecx\n int v3; // edx\n int v5; // edi\n int v6; // esi\n int v7; // eax\n int v8; // edx\n unsigned __int64 v9; // rax\n int v10; // [esp+8h] [ebp-8h] BYREF\n _DWORD *v11; // [esp+Ch] [ebp-4h] BYREF\n\n GetPerformanceLogBuffer((int *)&v11, &v10); /*0xffd7fbd4*/\n v2 = v11; /*0xffd7fbd9*/\n v3 = *v11; /*0xffd7fbdc*/\n if ( *v11 < 0x3E8u ) /*0xffd7fbe4*/\n {\n v5 = HIDWORD(a2); /*0xffd7fbfe*/\n v6 = 10 * v3; /*0xffd7fc04*/\n *v11 = v3 + 1; /*0xffd7fc07*/\n v2[v6 + 3] = 0; /*0xffd7fc0b*/\n v2[v6 + 10] = 0; /*0xffd7fc0f*/\n v2[v6 + 11] = 0; /*0xffd7fc13*/\n v7 = v10; /*0xffd7fc17*/\n v2[v6 + 2] = &unk_FFD97F8C; /*0xffd7fc1a*/\n *(_DWORD *)(v7 + 4 * v3) = 20704; /*0xffd7fc22*/\n v8 = a2; /*0xffd7fc29*/\n if ( !a2 ) /*0xffd7fc30*/\n {\n v9 = __rdtsc(); /*0xffd7fc32*/\n v5 = HIDWORD(v9); /*0xffd7fc34*/\n v8 = v9; /*0xffd7fc36*/\n }\n v2[v6 + 8] = v8; /*0xffd7fc38*/\n v2[v6 + 9] = v5; /*0xffd7fc3e*/\n return 0; /*0xffd7fc3c*/\n }\n else\n {\n DebugPrint(0x80000000, (int)\"PEI performance log array out of resources\\n\"); /*0xffd7fbf0*/\n return -2147483639; /*0xffd7fbf7*/\n }\n}","refs":[{"addr":"0xffd7fa8d","name":"GetPerformanceLogBuffer"},{"addr":"0xffd97f8c","name":"unk_FFD97F8C"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd91ae4","name":"aPeiPerformance","string":"PEI performance log array out of resources\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc48.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc48.c index f2b2370..2be5f3c 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc48.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc48.c @@ -1,2 +1,2 @@ // 0xffd7fc48 -{"addr":"0xffd7fc48","code":"int __cdecl sub_FFD7FC48(int a1, unsigned __int64 a2)\n{\n unsigned __int64 v2; // kr00_8\n unsigned int *v3; // ebx\n unsigned int v4; // eax\n int v6; // [esp+Ch] [ebp-4h] BYREF\n\n v2 = a2; /*0xffd7fc54*/\n if ( !a2 ) /*0xffd7fc59*/\n v2 = __rdtsc(); /*0xffd7fc5f*/\n sub_FFD7FA8D((int *)&a2 + 1, &v6); /*0xffd7fc67*/\n v3 = (unsigned int *)HIDWORD(a2); /*0xffd7fc6c*/\n v4 = sub_FFD7FB51((unsigned int *)HIDWORD(a2)); /*0xffd7fc74*/\n if ( v4 >= *v3 ) /*0xffd7fc7e*/\n return -2147483634; /*0xffd7fc80*/\n *(_QWORD *)&v3[10 * v4 + 10] = v2; /*0xffd7fc8b*/\n return 0; /*0xffd7fc94*/\n}","refs":[{"addr":"0xffd7fa8d","name":"sub_FFD7FA8D"},{"addr":"0xffd7fb51","name":"sub_FFD7FB51"}]} \ No newline at end of file +{"addr":"0xffd7fc48","code":"int __cdecl EndPerformanceMeasurement(int a1, unsigned __int64 a2)\n{\n unsigned __int64 v2; // kr00_8\n unsigned int *v3; // ebx\n unsigned int v4; // eax\n int v6; // [esp+Ch] [ebp-4h] BYREF\n\n v2 = a2; /*0xffd7fc54*/\n if ( !a2 ) /*0xffd7fc59*/\n v2 = __rdtsc(); /*0xffd7fc5f*/\n GetPerformanceLogBuffer((int *)&a2 + 1, &v6); /*0xffd7fc67*/\n v3 = (unsigned int *)HIDWORD(a2); /*0xffd7fc6c*/\n v4 = sub_FFD7FB51((unsigned int *)HIDWORD(a2)); /*0xffd7fc74*/\n if ( v4 >= *v3 ) /*0xffd7fc7e*/\n return -2147483634; /*0xffd7fc80*/\n *(_QWORD *)&v3[10 * v4 + 10] = v2; /*0xffd7fc8b*/\n return 0; /*0xffd7fc94*/\n}","refs":[{"addr":"0xffd7fa8d","name":"GetPerformanceLogBuffer"},{"addr":"0xffd7fb51","name":"sub_FFD7FB51"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc9b.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc9b.c index 7d53fad..7a71da9 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc9b.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fc9b.c @@ -1,2 +1,2 @@ // 0xffd7fc9b -{"addr":"0xffd7fc9b","code":"int sub_FFD7FC9B()\n{\n int v0; // eax\n int v2; // esi\n int v3; // eax\n int v4; // [esp+4h] [ebp-4h] BYREF\n\n sub_FFD8C2A0(0xEFu, 0x2234u, 4, &v4); /*0xffd7fcb0*/\n if ( v4 < 0 ) /*0xffd7fcbf*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"TraceHubBaseSet Error. DMIC.SRL is set.\\n\"); /*0xffd7fcc7*/\n v0 = sub_FFD7F97E(); /*0xffd7fcce*/\n if ( v0 ) /*0xffd7fcd5*/\n (*(void (__cdecl **)(const char *, int, const char *))(v0 + 4))( /*0xffd7fce3*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmTraceHubInitLib\\\\PeiDxeSmmTraceHubInitLib.c\",\n 64,\n \"((BOOLEAN)(0==1))\");\n return -2147483645; /*0xffd7fcee*/\n }\n v2 = sub_FFD8CBBA(0, 31, 7); /*0xffd7fcfd*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v2) == 0xFFFF ) /*0xffd7fd0e*/\n {\n v3 = sub_FFD7F97E(); /*0xffd7fd10*/\n if ( v3 ) /*0xffd7fd17*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd7fd20*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmTraceHubInitLib\\\\PeiDxeSmmTraceHubInitLib.c\",\n 74,\n \"((BOOLEAN)(0==1))\");\n return -2147483645; /*0xffd7fd20*/\n }\n *(_DWORD *)(v2 + 112) = -32768000; /*0xffd7fd2c*/\n *(_DWORD *)(v2 + 116) = 0; /*0xffd7fd2f*/\n sub_FFD8C497(4, -32768000); /*0xffd7fd40*/\n sub_FFD8C497(4, 0); /*0xffd7fd50*/\n sub_FFD8C5F6(255, 2); /*0xffd7fd63*/\n return 0; /*0xffd7fd6d*/\n}","refs":[{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd91b84","name":"aTracehubbasese","string":"TraceHubBaseSet Error. DMIC.SRL is set.\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91b24","name":"aEHsPurleysktpk_0","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmTraceHubInitLib\\PeiDxeSmmTraceHubInitLib.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"}]} \ No newline at end of file +{"addr":"0xffd7fc9b","code":"int SetTraceHubFwBar()\n{\n int v0; // eax\n int v2; // esi\n int v3; // eax\n int v4; // [esp+4h] [ebp-4h] BYREF\n\n sub_FFD8C2A0(0xEFu, 0x2234u, 4, &v4); /*0xffd7fcb0*/\n if ( v4 < 0 ) /*0xffd7fcbf*/\n {\n DebugPrint(0x80000000, (int)\"TraceHubBaseSet Error. DMIC.SRL is set.\\n\"); /*0xffd7fcc7*/\n v0 = GetReportStatusCodePpi(); /*0xffd7fcce*/\n if ( v0 ) /*0xffd7fcd5*/\n (*(void (__cdecl **)(const char *, int, const char *))(v0 + 4))( /*0xffd7fce3*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmTraceHubInitLib\\\\PeiDxeSmmTraceHubInitLib.c\",\n 64,\n \"((BOOLEAN)(0==1))\");\n return -2147483645; /*0xffd7fcee*/\n }\n v2 = sub_FFD8CBBA(0, 31, 7); /*0xffd7fcfd*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v2) == 0xFFFF ) /*0xffd7fd0e*/\n {\n v3 = GetReportStatusCodePpi(); /*0xffd7fd10*/\n if ( v3 ) /*0xffd7fd17*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd7fd20*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmTraceHubInitLib\\\\PeiDxeSmmTraceHubInitLib.c\",\n 74,\n \"((BOOLEAN)(0==1))\");\n return -2147483645; /*0xffd7fd20*/\n }\n *(_DWORD *)(v2 + 112) = -32768000; /*0xffd7fd2c*/\n *(_DWORD *)(v2 + 116) = 0; /*0xffd7fd2f*/\n sub_FFD8C497(4, -32768000); /*0xffd7fd40*/\n sub_FFD8C497(4, 0); /*0xffd7fd50*/\n sub_FFD8C5F6(255, 2); /*0xffd7fd63*/\n return 0; /*0xffd7fd6d*/\n}","refs":[{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd91b84","name":"aTracehubbasese","string":"TraceHubBaseSet Error. DMIC.SRL is set.\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91b24","name":"aEHsPurleysktpk_0","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmTraceHubInitLib\\PeiDxeSmmTraceHubInitLib.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fd72.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fd72.c index d9d7500..b514b96 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fd72.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd7fd72.c @@ -1,2 +1,2 @@ // 0xffd7fd72 -{"addr":"0xffd7fd72","code":"int __fastcall sub_FFD7FD72(char a1)\n{\n int v2; // esi\n int result; // eax\n unsigned int v4; // [esp+Ch] [ebp-4h] BYREF\n\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Start\\n\"); /*0xffd7fd84*/\n sub_FFD8C909(&v4); /*0xffd7fd8c*/\n *(_BYTE *)(v4 + 1488) = 0; /*0xffd7fd9b*/\n v2 = sub_FFD8CBBA(0, 31, 7); /*0xffd7fdb0*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v2) == 0xFFFF ) /*0xffd7fdc1*/\n return sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - End. TraceHub device is not present \\n\"); /*0xffd7fdc8*/\n if ( (*(_DWORD *)(v2 + 4) & 2) != 0 ) /*0xffd7fdd2*/\n {\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - End. Early init done already \\n\"); /*0xffd7fdda*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - FW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 112)); /*0xffd7fde9*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - MTB_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 16)); /*0xffd7fdfb*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - SW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 24)); /*0xffd7fe0d*/\n result = MEMORY[0xFE1000E0]; /*0xffd7fe1a*/\n if ( (MEMORY[0xFE1000E0] & 0x1000000) != 0 ) /*0xffd7fe21*/\n return sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Trace Hub enabled due to SCRPD0.24\\n\"); /*0xffd7fe2c*/\n }\n else\n {\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Setting MTB_BAR\\n\"); /*0xffd7fe37*/\n *(_DWORD *)(v2 + 16) = -32505856; /*0xffd7fe3e*/\n *(_DWORD *)(v2 + 20) = 0; /*0xffd7fe47*/\n *(_BYTE *)(v2 + 4) |= 2u; /*0xffd7fe4f*/\n if ( (MEMORY[0xFE1000E0] & 0x1000000) != 0 || a1 ) /*0xffd7fe62*/\n {\n MEMORY[0xFE1000CC] = 357000000; /*0xffd7fe91*/\n *(_BYTE *)(v2 + 4) = 0; /*0xffd7fe9c*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Setting SW_BAR\\n\"); /*0xffd7fe9f*/\n *(_DWORD *)(v2 + 24) = -31457280; /*0xffd7fea9*/\n *(_DWORD *)(v2 + 28) = 0; /*0xffd7feb1*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Setting FW_BAR\\n\"); /*0xffd7feb8*/\n sub_FFD7FC9B(); /*0xffd7febd*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Enabling MSE and BME\\n\"); /*0xffd7fec8*/\n *(_BYTE *)(v2 + 4) |= 6u; /*0xffd7fed8*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize () Assigned BARs:\\n\"); /*0xffd7fedb*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize () FW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 112)); /*0xffd7feea*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize () MTB_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 16)); /*0xffd7fefc*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize () SW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 24)); /*0xffd7ff0e*/\n return sub_FFD7F9AF(64, (int)\"TraceHubInitialize () - End\\n\"); /*0xffd7ff1c*/\n }\n else\n {\n *(_BYTE *)(v2 + 4) = 0; /*0xffd7fe6a*/\n sub_FFD7F9AF(64, (int)\"TraceHubInitialize() - Clearing MTB_BAR\\n\"); /*0xffd7fe6d*/\n *(_DWORD *)(v2 + 16) = 0; /*0xffd7fe78*/\n return sub_FFD7F9AF( /*0xffd7fe7f*/\n 64,\n (int)\"TraceHubInitialize() - End. STT disconnected and Trace Hub requested to be disable\\n\");\n }\n }\n return result; /*0xffd7ff23*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd91bb0","name":"aTracehubinitia","string":"TraceHubInitialize() - Start\n"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd91bd0","name":"aTracehubinitia_0","string":"TraceHubInitialize() - End. TraceHub device is not present \n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd91c10","name":"aTracehubinitia_1","string":"TraceHubInitialize() - End. Early init done already \n"},{"addr":"0xffd91c48","name":"aTracehubinitia_2","string":"TraceHubInitialize() - FW_LBAR = 0x%08x\n"},{"addr":"0xffd91c74","name":"aTracehubinitia_3","string":"TraceHubInitialize() - MTB_LBAR = 0x%08x\n"},{"addr":"0xffd91ca0","name":"aTracehubinitia_4","string":"TraceHubInitialize() - SW_LBAR = 0x%08x\n"},{"addr":"0xffd91ccc","name":"aTracehubinitia_5","string":"TraceHubInitialize() - Trace Hub enabled due to SCRPD0.24\n"},{"addr":"0xffd91d08","name":"aTracehubinitia_6","string":"TraceHubInitialize() - Setting MTB_BAR\n"},{"addr":"0xffd91db0","name":"aTracehubinitia_9","string":"TraceHubInitialize() - Setting SW_BAR\n"},{"addr":"0xffd91dd8","name":"aTracehubinitia_10","string":"TraceHubInitialize() - Setting FW_BAR\n"},{"addr":"0xffd7fc9b","name":"sub_FFD7FC9B"},{"addr":"0xffd91e00","name":"aTracehubinitia_11","string":"TraceHubInitialize() - Enabling MSE and BME\n"},{"addr":"0xffd91e30","name":"aTracehubinitia_12","string":"TraceHubInitialize () Assigned BARs:\n"},{"addr":"0xffd91e58","name":"aTracehubinitia_13","string":"TraceHubInitialize () FW_LBAR = 0x%08x\n"},{"addr":"0xffd91e84","name":"aTracehubinitia_14","string":"TraceHubInitialize () MTB_LBAR = 0x%08x\n"},{"addr":"0xffd91eb0","name":"aTracehubinitia_15","string":"TraceHubInitialize () SW_LBAR = 0x%08x\n"},{"addr":"0xffd91edc","name":"aTracehubinitia_16","string":"TraceHubInitialize () - End\n"},{"addr":"0xffd91d30","name":"aTracehubinitia_7","string":"TraceHubInitialize() - Clearing MTB_BAR\n"},{"addr":"0xffd91d5c","name":"aTracehubinitia_8","string":"TraceHubInitialize() - End. STT disconnected and Trace Hub requested to be disable\n"}]} \ No newline at end of file +{"addr":"0xffd7fd72","code":"int __fastcall TraceHubInitialize(char a1)\n{\n int v2; // esi\n int result; // eax\n unsigned int v4; // [esp+Ch] [ebp-4h] BYREF\n\n DebugPrint(64, (int)\"TraceHubInitialize() - Start\\n\"); /*0xffd7fd84*/\n sub_FFD8C909(&v4); /*0xffd7fd8c*/\n *(_BYTE *)(v4 + 1488) = 0; /*0xffd7fd9b*/\n v2 = sub_FFD8CBBA(0, 31, 7); /*0xffd7fdb0*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v2) == 0xFFFF ) /*0xffd7fdc1*/\n return DebugPrint(64, (int)\"TraceHubInitialize() - End. TraceHub device is not present \\n\"); /*0xffd7fdc8*/\n if ( (*(_DWORD *)(v2 + 4) & 2) != 0 ) /*0xffd7fdd2*/\n {\n DebugPrint(64, (int)\"TraceHubInitialize() - End. Early init done already \\n\"); /*0xffd7fdda*/\n DebugPrint(64, (int)\"TraceHubInitialize() - FW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 112)); /*0xffd7fde9*/\n DebugPrint(64, (int)\"TraceHubInitialize() - MTB_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 16)); /*0xffd7fdfb*/\n DebugPrint(64, (int)\"TraceHubInitialize() - SW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 24)); /*0xffd7fe0d*/\n result = MEMORY[0xFE1000E0]; /*0xffd7fe1a*/\n if ( (MEMORY[0xFE1000E0] & 0x1000000) != 0 ) /*0xffd7fe21*/\n return DebugPrint(64, (int)\"TraceHubInitialize() - Trace Hub enabled due to SCRPD0.24\\n\"); /*0xffd7fe2c*/\n }\n else\n {\n DebugPrint(64, (int)\"TraceHubInitialize() - Setting MTB_BAR\\n\"); /*0xffd7fe37*/\n *(_DWORD *)(v2 + 16) = -32505856; /*0xffd7fe3e*/\n *(_DWORD *)(v2 + 20) = 0; /*0xffd7fe47*/\n *(_BYTE *)(v2 + 4) |= 2u; /*0xffd7fe4f*/\n if ( (MEMORY[0xFE1000E0] & 0x1000000) != 0 || a1 ) /*0xffd7fe62*/\n {\n MEMORY[0xFE1000CC] = 357000000; /*0xffd7fe91*/\n *(_BYTE *)(v2 + 4) = 0; /*0xffd7fe9c*/\n DebugPrint(64, (int)\"TraceHubInitialize() - Setting SW_BAR\\n\"); /*0xffd7fe9f*/\n *(_DWORD *)(v2 + 24) = -31457280; /*0xffd7fea9*/\n *(_DWORD *)(v2 + 28) = 0; /*0xffd7feb1*/\n DebugPrint(64, (int)\"TraceHubInitialize() - Setting FW_BAR\\n\"); /*0xffd7feb8*/\n SetTraceHubFwBar(); /*0xffd7febd*/\n DebugPrint(64, (int)\"TraceHubInitialize() - Enabling MSE and BME\\n\"); /*0xffd7fec8*/\n *(_BYTE *)(v2 + 4) |= 6u; /*0xffd7fed8*/\n DebugPrint(64, (int)\"TraceHubInitialize () Assigned BARs:\\n\"); /*0xffd7fedb*/\n DebugPrint(64, (int)\"TraceHubInitialize () FW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 112)); /*0xffd7feea*/\n DebugPrint(64, (int)\"TraceHubInitialize () MTB_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 16)); /*0xffd7fefc*/\n DebugPrint(64, (int)\"TraceHubInitialize () SW_LBAR = 0x%08x\\n\", *(_DWORD *)(v2 + 24)); /*0xffd7ff0e*/\n return DebugPrint(64, (int)\"TraceHubInitialize () - End\\n\"); /*0xffd7ff1c*/\n }\n else\n {\n *(_BYTE *)(v2 + 4) = 0; /*0xffd7fe6a*/\n DebugPrint(64, (int)\"TraceHubInitialize() - Clearing MTB_BAR\\n\"); /*0xffd7fe6d*/\n *(_DWORD *)(v2 + 16) = 0; /*0xffd7fe78*/\n return DebugPrint( /*0xffd7fe7f*/\n 64,\n (int)\"TraceHubInitialize() - End. STT disconnected and Trace Hub requested to be disable\\n\");\n }\n }\n return result; /*0xffd7ff23*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd91bb0","name":"aTracehubinitia","string":"TraceHubInitialize() - Start\n"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd91bd0","name":"aTracehubinitia_0","string":"TraceHubInitialize() - End. TraceHub device is not present \n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd91c10","name":"aTracehubinitia_1","string":"TraceHubInitialize() - End. Early init done already \n"},{"addr":"0xffd91c48","name":"aTracehubinitia_2","string":"TraceHubInitialize() - FW_LBAR = 0x%08x\n"},{"addr":"0xffd91c74","name":"aTracehubinitia_3","string":"TraceHubInitialize() - MTB_LBAR = 0x%08x\n"},{"addr":"0xffd91ca0","name":"aTracehubinitia_4","string":"TraceHubInitialize() - SW_LBAR = 0x%08x\n"},{"addr":"0xffd91ccc","name":"aTracehubinitia_5","string":"TraceHubInitialize() - Trace Hub enabled due to SCRPD0.24\n"},{"addr":"0xffd91d08","name":"aTracehubinitia_6","string":"TraceHubInitialize() - Setting MTB_BAR\n"},{"addr":"0xffd91db0","name":"aTracehubinitia_9","string":"TraceHubInitialize() - Setting SW_BAR\n"},{"addr":"0xffd91dd8","name":"aTracehubinitia_10","string":"TraceHubInitialize() - Setting FW_BAR\n"},{"addr":"0xffd7fc9b","name":"SetTraceHubFwBar"},{"addr":"0xffd91e00","name":"aTracehubinitia_11","string":"TraceHubInitialize() - Enabling MSE and BME\n"},{"addr":"0xffd91e30","name":"aTracehubinitia_12","string":"TraceHubInitialize () Assigned BARs:\n"},{"addr":"0xffd91e58","name":"aTracehubinitia_13","string":"TraceHubInitialize () FW_LBAR = 0x%08x\n"},{"addr":"0xffd91e84","name":"aTracehubinitia_14","string":"TraceHubInitialize () MTB_LBAR = 0x%08x\n"},{"addr":"0xffd91eb0","name":"aTracehubinitia_15","string":"TraceHubInitialize () SW_LBAR = 0x%08x\n"},{"addr":"0xffd91edc","name":"aTracehubinitia_16","string":"TraceHubInitialize () - End\n"},{"addr":"0xffd91d30","name":"aTracehubinitia_7","string":"TraceHubInitialize() - Clearing MTB_BAR\n"},{"addr":"0xffd91d5c","name":"aTracehubinitia_8","string":"TraceHubInitialize() - End. STT disconnected and Trace Hub requested to be disable\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80210.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80210.c index 13be6a6..4922d0e 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80210.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80210.c @@ -1,2 +1,2 @@ // 0xffd80210 -{"addr":"0xffd80210","code":"int sub_FFD80210()\n{\n int v0; // eax\n int v1; // eax\n unsigned __int8 *v2; // esi\n int v3; // edi\n unsigned int i; // ebp\n unsigned int v5; // ecx\n unsigned int v6; // edx\n unsigned int v7; // ebx\n unsigned __int8 v8; // cl\n unsigned int v9; // ebx\n int v10; // ebx\n unsigned int v11; // eax\n int result; // eax\n int v13; // [esp+0h] [ebp-24h] BYREF\n int v14; // [esp+4h] [ebp-20h]\n int v15; // [esp+8h] [ebp-1Ch]\n _DWORD *v16; // [esp+Ch] [ebp-18h] BYREF\n int n10; // [esp+10h] [ebp-14h]\n int v18; // [esp+14h] [ebp-10h] BYREF\n int v19; // [esp+18h] [ebp-Ch] BYREF\n unsigned int v20; // [esp+1Ch] [ebp-8h]\n unsigned int v21; // [esp+20h] [ebp-4h]\n\n v13 = 0; /*0xffd80213*/\n v0 = sub_FFD8AD54(); /*0xffd80217*/\n if ( (*(int (__cdecl **)(int, int, _DWORD **))(*(_DWORD *)v0 + 76))(v0, 4, &v16) ) /*0xffd80226*/\n {\n v1 = sub_FFD7F97E(); /*0xffd80230*/\n if ( v1 ) /*0xffd80237*/\n (*(void (__cdecl **)(const char *, int, const char *))(v1 + 4))( /*0xffd80248*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 456,\n \"Status == 0\");\n }\n *v16 = 0; /*0xffd80255*/\n v2 = (unsigned __int8 *)&unk_FFD980CC; /*0xffd80258*/\n v15 = 0; /*0xffd8025d*/\n n10 = 10; /*0xffd80263*/\n do\n {\n v3 = 0; /*0xffd8026b*/\n for ( i = 0; i < 0xC00; i += 512 )\n {\n v5 = 0; /*0xffd80272*/\n v6 = i + *((_DWORD *)v2 + 2); /*0xffd80274*/\n v14 = 0; /*0xffd80276*/\n v21 = v6; /*0xffd8027a*/\n if ( v2[v3 + 1] )\n {\n while ( 1 ) /*0xffd80288*/\n {\n v7 = v5; /*0xffd80288*/\n v8 = *v2; /*0xffd8028e*/\n v9 = v6 + 32 * v7; /*0xffd80294*/\n v20 = v9; /*0xffd8029b*/\n sub_FFD8C2A0(v8, v9, 4, &v18); /*0xffd8029f*/\n sub_FFD8C2A0(*v2, v9, 4, &v19); /*0xffd802b0*/\n v10 = v18; /*0xffd802b5*/\n if ( v18 == v19 ) /*0xffd802c0*/\n {\n v13 = v18; /*0xffd802dd*/\n }\n else\n {\n sub_FFD8C2A0(*v2, v20, 4, &v13); /*0xffd802d0*/\n v10 = v13; /*0xffd802d5*/\n }\n if ( v10 ) /*0xffd802e3*/\n break; /*0xffd802e3*/\n v11 = v2[v3 + 1]; /*0xffd802e9*/\n v5 = v14 + 1; /*0xffd802ee*/\n v6 = v21; /*0xffd802ef*/\n v14 = v5; /*0xffd802f3*/\n if ( v5 >= v11 ) /*0xffd802f9*/\n goto LABEL_14; /*0xffd802f9*/\n }\n *v16 |= (v10 & 7) << v15; /*0xffd80311*/\n sub_FFD7F9AF(0x80000000, (int)\"ERROR: Internal fabric error detected!! \");\n sub_FFD7F9AF( /*0xffd80331*/\n 0x80000000,\n (int)\"PSF PID:0x%x, RSx/PortGroup:0x%x, Port:0x%x, Channel:0, error bits:0x%x\\n\",\n *v2,\n v3,\n v14,\n v10);\n }\nLABEL_14:\n ++v3; /*0xffd8033f*/\n }\n v15 += 3; /*0xffd8034c*/\n v2 += 12; /*0xffd80351*/\n --n10; /*0xffd80354*/\n }\n while ( n10 );\n result = sub_FFD8CFB4(&unk_FFD97F6C, 4); /*0xffd8036a*/\n if ( !result ) /*0xffd80376*/\n {\n result = sub_FFD7F97E(); /*0xffd80378*/\n if ( result ) /*0xffd8037f*/\n return (*(int (__cdecl **)(const char *, int, const char *))(result + 4))( /*0xffd80390*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 504,\n \"HobPtr != 0\");\n }\n return result; /*0xffd80396*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd9204c","name":"aStatus0","string":"Status == 0"},{"addr":"0xffd980cc","name":"unk_FFD980CC"},{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92058","name":"aErrorInternalF","string":"ERROR: Internal fabric error detected!! "},{"addr":"0xffd92084","name":"aPsfPid0xXRsxPo","string":"PSF PID:0x%x, RSx/PortGroup:0x%x, Port:0x%x, Channel:0, error bits:0x%x\n"},{"addr":"0xffd8cfb4","name":"sub_FFD8CFB4"},{"addr":"0xffd97f6c","name":"unk_FFD97F6C"},{"addr":"0xffd920d0","name":"aHobptr0","string":"HobPtr != 0"}]} \ No newline at end of file +{"addr":"0xffd80210","code":"int PchFabricErrorCheck()\n{\n int v0; // eax\n int v1; // eax\n unsigned __int8 *v2; // esi\n int v3; // edi\n unsigned int i; // ebp\n unsigned int v5; // ecx\n unsigned int v6; // edx\n unsigned int v7; // ebx\n unsigned __int8 v8; // cl\n unsigned int v9; // ebx\n int v10; // ebx\n unsigned int v11; // eax\n int result; // eax\n int v13; // [esp+0h] [ebp-24h] BYREF\n int v14; // [esp+4h] [ebp-20h]\n int v15; // [esp+8h] [ebp-1Ch]\n _DWORD *v16; // [esp+Ch] [ebp-18h] BYREF\n int n10; // [esp+10h] [ebp-14h]\n int v18; // [esp+14h] [ebp-10h] BYREF\n int v19; // [esp+18h] [ebp-Ch] BYREF\n unsigned int v20; // [esp+1Ch] [ebp-8h]\n unsigned int v21; // [esp+20h] [ebp-4h]\n\n v13 = 0; /*0xffd80213*/\n v0 = sub_FFD8AD54(); /*0xffd80217*/\n if ( (*(int (__cdecl **)(int, int, _DWORD **))(*(_DWORD *)v0 + 76))(v0, 4, &v16) ) /*0xffd80226*/\n {\n v1 = GetReportStatusCodePpi(); /*0xffd80230*/\n if ( v1 ) /*0xffd80237*/\n (*(void (__cdecl **)(const char *, int, const char *))(v1 + 4))( /*0xffd80248*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 456,\n \"Status == 0\");\n }\n *v16 = 0; /*0xffd80255*/\n v2 = (unsigned __int8 *)&unk_FFD980CC; /*0xffd80258*/\n v15 = 0; /*0xffd8025d*/\n n10 = 10; /*0xffd80263*/\n do\n {\n v3 = 0; /*0xffd8026b*/\n for ( i = 0; i < 0xC00; i += 512 )\n {\n v5 = 0; /*0xffd80272*/\n v6 = i + *((_DWORD *)v2 + 2); /*0xffd80274*/\n v14 = 0; /*0xffd80276*/\n v21 = v6; /*0xffd8027a*/\n if ( v2[v3 + 1] )\n {\n while ( 1 ) /*0xffd80288*/\n {\n v7 = v5; /*0xffd80288*/\n v8 = *v2; /*0xffd8028e*/\n v9 = v6 + 32 * v7; /*0xffd80294*/\n v20 = v9; /*0xffd8029b*/\n sub_FFD8C2A0(v8, v9, 4, &v18); /*0xffd8029f*/\n sub_FFD8C2A0(*v2, v9, 4, &v19); /*0xffd802b0*/\n v10 = v18; /*0xffd802b5*/\n if ( v18 == v19 ) /*0xffd802c0*/\n {\n v13 = v18; /*0xffd802dd*/\n }\n else\n {\n sub_FFD8C2A0(*v2, v20, 4, &v13); /*0xffd802d0*/\n v10 = v13; /*0xffd802d5*/\n }\n if ( v10 ) /*0xffd802e3*/\n break; /*0xffd802e3*/\n v11 = v2[v3 + 1]; /*0xffd802e9*/\n v5 = v14 + 1; /*0xffd802ee*/\n v6 = v21; /*0xffd802ef*/\n v14 = v5; /*0xffd802f3*/\n if ( v5 >= v11 ) /*0xffd802f9*/\n goto LABEL_14; /*0xffd802f9*/\n }\n *v16 |= (v10 & 7) << v15; /*0xffd80311*/\n DebugPrint(0x80000000, (int)\"ERROR: Internal fabric error detected!! \");\n DebugPrint( /*0xffd80331*/\n 0x80000000,\n (int)\"PSF PID:0x%x, RSx/PortGroup:0x%x, Port:0x%x, Channel:0, error bits:0x%x\\n\",\n *v2,\n v3,\n v14,\n v10);\n }\nLABEL_14:\n ++v3; /*0xffd8033f*/\n }\n v15 += 3; /*0xffd8034c*/\n v2 += 12; /*0xffd80351*/\n --n10; /*0xffd80354*/\n }\n while ( n10 );\n result = sub_FFD8CFB4(&unk_FFD97F6C, 4); /*0xffd8036a*/\n if ( !result ) /*0xffd80376*/\n {\n result = GetReportStatusCodePpi(); /*0xffd80378*/\n if ( result ) /*0xffd8037f*/\n return (*(int (__cdecl **)(const char *, int, const char *))(result + 4))( /*0xffd80390*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 504,\n \"HobPtr != 0\");\n }\n return result; /*0xffd80396*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd9204c","name":"aStatus0","string":"Status == 0"},{"addr":"0xffd980cc","name":"unk_FFD980CC"},{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92058","name":"aErrorInternalF","string":"ERROR: Internal fabric error detected!! "},{"addr":"0xffd92084","name":"aPsfPid0xXRsxPo","string":"PSF PID:0x%x, RSx/PortGroup:0x%x, Port:0x%x, Channel:0, error bits:0x%x\n"},{"addr":"0xffd8cfb4","name":"sub_FFD8CFB4"},{"addr":"0xffd97f6c","name":"unk_FFD97F6C"},{"addr":"0xffd920d0","name":"aHobptr0","string":"HobPtr != 0"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd804a1.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd804a1.c index 574100f..0d025fd 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd804a1.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd804a1.c @@ -1,2 +1,2 @@ // 0xffd804a1 -{"addr":"0xffd804a1","code":"int __thiscall sub_FFD804A1(_BYTE *this)\n{\n int v2; // eax\n\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n sub_FFD7F9AF(64, (int)\"DWR: PchMiscInit() End\\n\");\n }\n else\n {\n sub_FFD8BE68(); /*0xffd804c0*/\n v2 = sub_FFD8CBBA(0, 31, 2); /*0xffd804ce*/\n *(_DWORD *)(v2 + 172) &= ~0x100000u; /*0xffd804e5*/\n if ( *(this + 1) ) /*0xffd804f0*/\n sub_FFD8C5F6(255, 8); /*0xffd80506*/\n else\n sub_FFD8C5F6(247, 0); /*0xffd804fd*/\n sub_FFD8C578(-1793, 8207); /*0xffd80521*/\n sub_FFD8C578(-1, 0x80000000); /*0xffd80535*/\n sub_FFD8C5F6(223, 0); /*0xffd80556*/\n }\n return 0; /*0xffd8055d*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92134","name":"aDwrPchmiscinit","string":"DWR: PchMiscInit() End\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file +{"addr":"0xffd804a1","code":"int __thiscall PchMiscInit(_BYTE *this)\n{\n int v2; // eax\n\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n DebugPrint(64, (int)\"DWR: PchMiscInit() End\\n\");\n }\n else\n {\n sub_FFD8BE68(); /*0xffd804c0*/\n v2 = sub_FFD8CBBA(0, 31, 2); /*0xffd804ce*/\n *(_DWORD *)(v2 + 172) &= ~0x100000u; /*0xffd804e5*/\n if ( *(this + 1) ) /*0xffd804f0*/\n sub_FFD8C5F6(255, 8); /*0xffd80506*/\n else\n sub_FFD8C5F6(247, 0); /*0xffd804fd*/\n sub_FFD8C578(-1793, 8207); /*0xffd80521*/\n sub_FFD8C578(-1, 0x80000000); /*0xffd80535*/\n sub_FFD8C5F6(223, 0); /*0xffd80556*/\n }\n return 0; /*0xffd8055d*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92134","name":"aDwrPchmiscinit","string":"DWR: PchMiscInit() End\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80603.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80603.c index b80d34f..fc80c01 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80603.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80603.c @@ -1,2 +1,2 @@ // 0xffd80603 -{"addr":"0xffd80603","code":"int __thiscall sub_FFD80603(int this)\n{\n unsigned __int8 n0x2C; // bl\n int v3; // ecx\n unsigned __int16 *v4; // edi\n unsigned __int8 v6; // [esp+Fh] [ebp-1h]\n\n sub_FFD7F9AF(64, (int)\"ProgramSvidSid() Start\\n\"); /*0xffd80613*/\n sub_FFD8BE68(); /*0xffd8061a*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n sub_FFD7F9AF(64, (int)\"DWR: ProgramSvidSid() End\\n\");\n }\n else\n {\n n0x2C = 0; /*0xffd8062f*/\n if ( *(_WORD *)(this + 8) || *(_WORD *)(this + 10) ) /*0xffd80637*/\n {\n do /*0xffd80693*/\n {\n v3 = 3 * n0x2C; /*0xffd80640*/\n v6 = byte_FFD97FFE[v3]; /*0xffd80658*/\n v4 = (unsigned __int16 *)sub_FFD8CBBA(0, byte_FFD97FFC[v3], byte_FFD97FFD[v3]); /*0xffd80667*/\n if ( (unsigned __int16)sub_FFD8CCA5(v4) == 0x8086 ) /*0xffd80678*/\n *(_DWORD *)((char *)v4 + v6) = *(_DWORD *)(this + 8); /*0xffd8068b*/\n ++n0x2C; /*0xffd8068e*/\n }\n while ( n0x2C < 0x2Cu ); /*0xffd80693*/\n }\n sub_FFD7F9AF(64, (int)\"ProgramSvidSid() End\\n\"); /*0xffd8069c*/\n }\n return 0; /*0xffd806a3*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9214c","name":"aProgramsvidsid","string":"ProgramSvidSid() Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd92164","name":"aDwrProgramsvid","string":"DWR: ProgramSvidSid() End\n"},{"addr":"0xffd97ffe","name":"byte_FFD97FFE"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd97ffc","name":"byte_FFD97FFC"},{"addr":"0xffd97ffd","name":"byte_FFD97FFD"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd92180","name":"aProgramsvidsid_0","string":"ProgramSvidSid() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file +{"addr":"0xffd80603","code":"int __thiscall ProgramSvidSid(int this)\n{\n unsigned __int8 n0x2C; // bl\n int v3; // ecx\n unsigned __int16 *v4; // edi\n unsigned __int8 v6; // [esp+Fh] [ebp-1h]\n\n DebugPrint(64, (int)\"ProgramSvidSid() Start\\n\"); /*0xffd80613*/\n sub_FFD8BE68(); /*0xffd8061a*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n DebugPrint(64, (int)\"DWR: ProgramSvidSid() End\\n\");\n }\n else\n {\n n0x2C = 0; /*0xffd8062f*/\n if ( *(_WORD *)(this + 8) || *(_WORD *)(this + 10) ) /*0xffd80637*/\n {\n do /*0xffd80693*/\n {\n v3 = 3 * n0x2C; /*0xffd80640*/\n v6 = byte_FFD97FFE[v3]; /*0xffd80658*/\n v4 = (unsigned __int16 *)sub_FFD8CBBA(0, byte_FFD97FFC[v3], byte_FFD97FFD[v3]); /*0xffd80667*/\n if ( (unsigned __int16)sub_FFD8CCA5(v4) == 0x8086 ) /*0xffd80678*/\n *(_DWORD *)((char *)v4 + v6) = *(_DWORD *)(this + 8); /*0xffd8068b*/\n ++n0x2C; /*0xffd8068e*/\n }\n while ( n0x2C < 0x2Cu ); /*0xffd80693*/\n }\n DebugPrint(64, (int)\"ProgramSvidSid() End\\n\"); /*0xffd8069c*/\n }\n return 0; /*0xffd806a3*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9214c","name":"aProgramsvidsid","string":"ProgramSvidSid() Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd92164","name":"aDwrProgramsvid","string":"DWR: ProgramSvidSid() End\n"},{"addr":"0xffd97ffe","name":"byte_FFD97FFE"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd97ffc","name":"byte_FFD97FFC"},{"addr":"0xffd97ffd","name":"byte_FFD97FFD"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd92180","name":"aProgramsvidsid_0","string":"ProgramSvidSid() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd806ac.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd806ac.c index 27657bb..c3e8f3e 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd806ac.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd806ac.c @@ -1,2 +1,2 @@ // 0xffd806ac -{"addr":"0xffd806ac","code":"int __thiscall sub_FFD806AC(char *this)\n{\n char *this_1; // ebx\n unsigned int v2; // ebp\n int v3; // eax\n unsigned int n3; // esi\n unsigned int v5; // edi\n _DWORD *v6; // ebx\n int v7; // edx\n int v10; // [esp+18h] [ebp-Ch]\n int v11; // [esp+1Ch] [ebp-8h]\n int v12; // [esp+20h] [ebp-4h]\n\n v10 = 0; /*0xffd806b9*/\n this_1 = this; /*0xffd806ba*/\n v11 = 0; /*0xffd806c0*/\n v12 = 0; /*0xffd806c1*/\n v2 = (unsigned __int8)sub_FFD8BFFD(); /*0xffd806c7*/\n if ( (v2 & 0xFFFFFFF8) > 0x18 ) /*0xffd806d2*/\n {\n v3 = sub_FFD7F97E(); /*0xffd806d4*/\n if ( v3 ) /*0xffd806db*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd806ec*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 958,\n \"(MaxPciePortNum / 8) <= 3\");\n }\n n3 = 0; /*0xffd806f2*/\n v5 = 0; /*0xffd806f4*/\n if ( v2 ) /*0xffd806f8*/\n {\n v6 = this_1 + 28; /*0xffd806fa*/\n do /*0xffd8072a*/\n {\n if ( (*v6 & 0x800) != 0 ) /*0xffd80705*/\n v7 = (unsigned __int16)*v6 >> 12; /*0xffd8070a*/\n else\n v7 = 0; /*0xffd8070f*/\n v6 += 25; /*0xffd8071e*/\n *(&v10 + (v5 >> 3)) |= v7 << (4 * (v5 & 7)); /*0xffd80723*/\n ++v5; /*0xffd80727*/\n }\n while ( v5 < v2 ); /*0xffd8072a*/\n this_1 = this; /*0xffd8072c*/\n }\n v12 |= (*(_DWORD *)(this_1 + 2755) & 0xFFFFFF80) << 21; /*0xffd80747*/\n sub_FFD7F9AF(64, (int)\"DRCRM: 0x%08x 0x%08x 0x%08x\\n\", v10, v11, v12);\n do /*0xffd80779*/\n sub_FFD8C497(4, *(&v10 + n3++)); /*0xffd8076e*/\n while ( n3 < 3 ); /*0xffd80779*/\n return sub_FFD8C578(-1, -2147254272); /*0xffd8078e*/\n}","refs":[{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd92198","name":"aMaxpcieportnum","string":"(MaxPciePortNum / 8) <= 3"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd921b4","name":"aDrcrm0x08x0x08","string":"DRCRM: 0x%08x 0x%08x 0x%08x\n"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c578","name":"sub_FFD8C578"}]} \ No newline at end of file +{"addr":"0xffd806ac","code":"int __thiscall sub_FFD806AC(char *this)\n{\n char *this_1; // ebx\n unsigned int v2; // ebp\n int v3; // eax\n unsigned int n3; // esi\n unsigned int v5; // edi\n _DWORD *v6; // ebx\n int v7; // edx\n int v10; // [esp+18h] [ebp-Ch]\n int v11; // [esp+1Ch] [ebp-8h]\n int v12; // [esp+20h] [ebp-4h]\n\n v10 = 0; /*0xffd806b9*/\n this_1 = this; /*0xffd806ba*/\n v11 = 0; /*0xffd806c0*/\n v12 = 0; /*0xffd806c1*/\n v2 = (unsigned __int8)sub_FFD8BFFD(); /*0xffd806c7*/\n if ( (v2 & 0xFFFFFFF8) > 0x18 ) /*0xffd806d2*/\n {\n v3 = GetReportStatusCodePpi(); /*0xffd806d4*/\n if ( v3 ) /*0xffd806db*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd806ec*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 958,\n \"(MaxPciePortNum / 8) <= 3\");\n }\n n3 = 0; /*0xffd806f2*/\n v5 = 0; /*0xffd806f4*/\n if ( v2 ) /*0xffd806f8*/\n {\n v6 = this_1 + 28; /*0xffd806fa*/\n do /*0xffd8072a*/\n {\n if ( (*v6 & 0x800) != 0 ) /*0xffd80705*/\n v7 = (unsigned __int16)*v6 >> 12; /*0xffd8070a*/\n else\n v7 = 0; /*0xffd8070f*/\n v6 += 25; /*0xffd8071e*/\n *(&v10 + (v5 >> 3)) |= v7 << (4 * (v5 & 7)); /*0xffd80723*/\n ++v5; /*0xffd80727*/\n }\n while ( v5 < v2 ); /*0xffd8072a*/\n this_1 = this; /*0xffd8072c*/\n }\n v12 |= (*(_DWORD *)(this_1 + 2755) & 0xFFFFFF80) << 21; /*0xffd80747*/\n DebugPrint(64, (int)\"DRCRM: 0x%08x 0x%08x 0x%08x\\n\", v10, v11, v12);\n do /*0xffd80779*/\n sub_FFD8C497(4, *(&v10 + n3++)); /*0xffd8076e*/\n while ( n3 < 3 ); /*0xffd80779*/\n return sub_FFD8C578(-1, -2147254272); /*0xffd8078e*/\n}","refs":[{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd92198","name":"aMaxpcieportnum","string":"(MaxPciePortNum / 8) <= 3"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd921b4","name":"aDrcrm0x08x0x08","string":"DRCRM: 0x%08x 0x%08x 0x%08x\n"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c578","name":"sub_FFD8C578"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80796.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80796.c index ac0d503..8939210 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80796.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80796.c @@ -1,2 +1,2 @@ // 0xffd80796 -{"addr":"0xffd80796","code":"// positive sp value has been detected, the output may be wrong!\nint __thiscall sub_FFD80796(int this)\n{\n int v2; // ebx\n int v3; // esi\n int v4; // ebp\n int v5; // eax\n int v6; // eax\n int v7; // eax\n int v8; // eax\n int v9; // eax\n int v10; // eax\n int v11; // eax\n int v12; // eax\n bool v13; // zf\n char v14; // bl\n _BYTE *v15; // eax\n int n3; // ecx\n int v17; // edx\n int v18; // eax\n int v19; // edx\n int v20; // eax\n int v21; // eax\n int v22; // eax\n int v23; // eax\n int v24; // eax\n int v25; // eax\n int v26; // eax\n int v27; // eax\n int v28; // ecx\n _DWORD v30[3]; // [esp+4h] [ebp-14h] BYREF\n int v31; // [esp+10h] [ebp-8h] BYREF\n\n sub_FFD7F9AF(64, (int)\"PchOnPolicyInstalled() - Start\\n\"); /*0xffd807ab*/\n v2 = sub_FFD8CBBA(0, 31, 0); /*0xffd807c1*/\n v3 = sub_FFD8CBBA(0, 31, 2); /*0xffd807d5*/\n v4 = sub_FFD8CBBA(0, 31, 5); /*0xffd807e1*/\n v5 = sub_FFD8C632(*(_WORD *)(this + 2)); /*0xffd807e3*/\n if ( v5 < 0 ) /*0xffd807ea*/\n {\n sub_FFD7F9AF(0x8000... [6904 chars total]","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd921d4","name":"aPchonpolicyins","string":"PchOnPolicyInstalled() - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c632","name":"sub_FFD8C632"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd8c80a","name":"sub_FFD8C80A"},{"addr":"0xffd94584","name":"aWdtUsageMismat","string":"(WDT) Usage mismatched with policy\n"}]}Output truncated. Run: curl -o .ida-mcp/8ab907f0-29ca-41a0-9d6b-fa48fe5810b5.json http://127.0.0.1:13432/output/8ab907f0-29ca-41a0-9d6b-fa48fe5810b5.json \ No newline at end of file +{"addr":"0xffd80796","code":"// positive sp value has been detected, the output may be wrong!\nint __thiscall sub_FFD80796(int this)\n{\n int v2; // ebx\n int v3; // esi\n int v4; // ebp\n int v5; // eax\n int v6; // eax\n int v7; // eax\n int v8; // eax\n int v9; // eax\n int v10; // eax\n int v11; // eax\n int v12; // eax\n bool v13; // zf\n char v14; // bl\n _BYTE *v15; // eax\n int n3; // ecx\n int v17; // edx\n int v18; // eax\n int v19; // edx\n int v20; // eax\n int v21; // eax\n int v22; // eax\n int v23; // eax\n int v24; // eax\n int v25; // eax\n int v26; // eax\n int v27; // eax\n int v28; // ecx\n _DWORD v30[3]; // [esp+4h] [ebp-14h] BYREF\n int v31; // [esp+10h] [ebp-8h] BYREF\n\n DebugPrint(64, (int)\"PchOnPolicyInstalled() - Start\\n\"); /*0xffd807ab*/\n v2 = sub_FFD8CBBA(0, 31, 0); /*0xffd807c1*/\n v3 = sub_FFD8CBBA(0, 31, 2); /*0xffd807d5*/\n v4 = sub_FFD8CBBA(0, 31, 5); /*0xffd807e1*/\n v5 = sub_FFD8C632(*(_WORD *)(this + 2)); /*0xffd807e3*/\n if ( v5 < 0 ) /*0xffd807ea*/\n {\n DebugPrint(0x8000... [6904 chars total]","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd921d4","name":"aPchonpolicyins","string":"PchOnPolicyInstalled() - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c632","name":"sub_FFD8C632"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd8c80a","name":"sub_FFD8C80A"},{"addr":"0xffd94584","name":"aWdtUsageMismat","string":"(WDT) Usage mismatched with policy\n"}]}Output truncated. Run: curl -o .ida-mcp/8ab907f0-29ca-41a0-9d6b-fa48fe5810b5.json http://127.0.0.1:13432/output/8ab907f0-29ca-41a0-9d6b-fa48fe5810b5.json \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80ba6.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80ba6.c index 754e312..aed64d4 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80ba6.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd80ba6.c @@ -1,2 +1,2 @@ // 0xffd80ba6 -{"addr":"0xffd80ba6","code":"int __thiscall sub_FFD80BA6(int *this)\n{\n int v2; // esi\n int v3; // edi\n int v4; // ebx\n int v5; // ebp\n int n2_1; // ebx\n int v7; // ebx\n __int16 v8; // si\n int v9; // ebx\n int v10; // eax\n int v11; // eax\n int v12; // eax\n int v14; // [esp+10h] [ebp-54h] BYREF\n int v15; // [esp+14h] [ebp-50h] BYREF\n int v16; // [esp+18h] [ebp-4Ch] BYREF\n int n2; // [esp+1Ch] [ebp-48h]\n int v18; // [esp+20h] [ebp-44h] BYREF\n int v19; // [esp+24h] [ebp-40h] BYREF\n int v20; // [esp+28h] [ebp-3Ch] BYREF\n int v21; // [esp+2Ch] [ebp-38h] BYREF\n int v22; // [esp+30h] [ebp-34h]\n int v23; // [esp+34h] [ebp-30h] BYREF\n int n704654080; // [esp+38h] [ebp-2Ch]\n int n671099136; // [esp+3Ch] [ebp-28h]\n int n637544192; // [esp+40h] [ebp-24h]\n int n603989248; // [esp+44h] [ebp-20h]\n int n570434304; // [esp+48h] [ebp-1Ch]\n int n536879360; // [esp+4Ch] [ebp-18h]\n int n637544192_1; // [esp+50h] [ebp-14h]\n int n603989248_1; // [esp+54h] [ebp-10h]\n int n570434304_1; // [esp+58h] [ebp-Ch]\n i... [12460 chars total]","refs":[{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92214","name":"aPchearlydisabl","string":"PchEarlyDisabledDeviceHandling() - Start\n"},{"addr":"0xffd92240","name":"aPchpwrmbaseRPc","string":"PchPwrmBase + R_PCH_PWRM_FUSE_DIS_RD_2 = %x\n"},{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd92270","name":"aSpaControllerP","string":"SPA Controller PCD Value = %x\n"},{"addr":"0xffd92290","name":"aSpbControllerP","string":"SPB Controller PCD Value = %x\n"},{"addr":"0xffd922b0","name":"aSpcControllerP","string":"SPC Controller PCD Value = %x\n"},{"addr":"0xffd922d0","name":"aSpdControllerP","string":"SPD Controller PCD Value = %x\n"},{"addr":"0xffd922f0","name":"aSpeControllerP","string":"SPE Controller PCD Value = %x\n"}]}Output truncated. Run: curl -o .ida-mcp/7508e8c4-5a63-42fa-96dc-a63404b02de7.json http://127.0.0.1:13432/output/7508e8c4-5a63-42fa-96dc-a63404b02de7.json \ No newline at end of file +{"addr":"0xffd80ba6","code":"int __thiscall PchEarlyDisabledDeviceHandling(int *this)\n{\n int v2; // esi\n int v3; // edi\n int v4; // ebx\n int v5; // ebp\n int n2_1; // ebx\n int v7; // ebx\n __int16 v8; // si\n int v9; // ebx\n int v10; // eax\n int v11; // eax\n int v12; // eax\n int v14; // [esp+10h] [ebp-54h] BYREF\n int v15; // [esp+14h] [ebp-50h] BYREF\n int v16; // [esp+18h] [ebp-4Ch] BYREF\n int n2; // [esp+1Ch] [ebp-48h]\n int v18; // [esp+20h] [ebp-44h] BYREF\n int v19; // [esp+24h] [ebp-40h] BYREF\n int v20; // [esp+28h] [ebp-3Ch] BYREF\n int v21; // [esp+2Ch] [ebp-38h] BYREF\n int v22; // [esp+30h] [ebp-34h]\n int v23; // [esp+34h] [ebp-30h] BYREF\n int n704654080; // [esp+38h] [ebp-2Ch]\n int n671099136; // [esp+3Ch] [ebp-28h]\n int n637544192; // [esp+40h] [ebp-24h]\n int n603989248; // [esp+44h] [ebp-20h]\n int n570434304; // [esp+48h] [ebp-1Ch]\n int n536879360; // [esp+4Ch] [ebp-18h]\n int n637544192_1; // [esp+50h] [ebp-14h]\n int n603989248_1; // [esp+54h] [ebp-10h]\n int n570434304_1; // [esp+58h] [ebp-Ch]\n i... [12460 chars total]","refs":[{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92214","name":"aPchearlydisabl","string":"PchEarlyDisabledDeviceHandling() - Start\n"},{"addr":"0xffd92240","name":"aPchpwrmbaseRPc","string":"PchPwrmBase + R_PCH_PWRM_FUSE_DIS_RD_2 = %x\n"},{"addr":"0xffd8c2a0","name":"sub_FFD8C2A0"},{"addr":"0xffd92270","name":"aSpaControllerP","string":"SPA Controller PCD Value = %x\n"},{"addr":"0xffd92290","name":"aSpbControllerP","string":"SPB Controller PCD Value = %x\n"},{"addr":"0xffd922b0","name":"aSpcControllerP","string":"SPC Controller PCD Value = %x\n"},{"addr":"0xffd922d0","name":"aSpdControllerP","string":"SPD Controller PCD Value = %x\n"},{"addr":"0xffd922f0","name":"aSpeControllerP","string":"SPE Controller PCD Value = %x\n"}]}Output truncated. Run: curl -o .ida-mcp/7508e8c4-5a63-42fa-96dc-a63404b02de7.json http://127.0.0.1:13432/output/7508e8c4-5a63-42fa-96dc-a63404b02de7.json \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd813d1.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd813d1.c index be0b617..deb4977 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd813d1.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd813d1.c @@ -1,2 +1,2 @@ // 0xffd813d1 -{"addr":"0xffd813d1","code":"int __thiscall sub_FFD813D1(int *this)\n{\n int v2; // eax\n int v3; // edi\n unsigned __int8 v4; // al\n unsigned __int8 v5; // al\n unsigned __int8 v6; // al\n unsigned __int8 v7; // al\n\n sub_FFD7F9AF(64, (int)\"PchEarlyInit() - Start\\n\"); /*0xffd813df*/\n sub_FFD82723(); /*0xffd813e4*/\n sub_FFD81769(); /*0xffd813e9*/\n sub_FFD8C497(2, 1); /*0xffd813fc*/\n sub_FFD8C5F6(255, 3); /*0xffd81414*/\n sub_FFD8C578(-2, 0); /*0xffd81425*/\n v2 = sub_FFD8CBBA(0, 31, 1); /*0xffd81431*/\n *(_DWORD *)(v2 + 128) = 0; /*0xffd8143b*/\n *(_DWORD *)(v2 + 132) = 0; /*0xffd81441*/\n *(_DWORD *)(v2 + 136) = 0; /*0xffd81447*/\n *(_DWORD *)(v2 + 140) = 0; /*0xffd8144d*/\n *(_DWORD *)(v2 + 144) = 0; /*0xffd81453*/\n *(_DWORD *)(v2 + 148) = 61440; /*0xffd81459*/\n *(_DWORD *)(v2 + 152) = 16; /*0xffd81463*/\n *(_DWORD *)(v2 + 156) = 0; /*0xffd8146d*/\n *(_BYTE *)(v2 + 244) |= 1u; /*0xffd8147d*/\n v3 = sub_FFD8CBBA(0, 31, 2); /*0xffd8148d*/\n if ( (*(_BYTE *)(v3 + 164) & 4) != 0 ) /*0xffd81499*/\n {\n __outbyte(0x74u, 0xAu); /*0xffd814a3*/\n v4 = __inbyte(0x74u); /*0xffd814a4*/\n __outbyte(0x75u, v4 & 0x8F | 0x60); /*0xffd814af*/\n __outbyte(0x74u, 0xBu); /*0xffd814b5*/\n v5 = __inbyte(0x75u); /*0xffd814b9*/\n __outbyte(0x75u, v5 | 0x80); /*0xffd814bc*/\n __outbyte(0x74u, 0xAu); /*0xffd814c2*/\n v6 = __inbyte(0x75u); /*0xffd814c6*/\n __outbyte(0x75u, v6 & 0x8F | 0x20); /*0xffd814cb*/\n __outbyte(0x74u, 0xBu); /*0xffd814d1*/\n v7 = __inbyte(0x75u); /*0xffd814d5*/\n __outbyte(0x75u, v7 & 0x7F); /*0xffd814d8*/\n }\n *(this + 4) = 16; /*0xffd814d9*/\n *(_DWORD *)(v3 + 172) &= ~0x100000u; /*0xffd814ed*/\n *(this + 53) = 0; /*0xffd814f3*/\n *(this + 61) = 0; /*0xffd814f9*/\n sub_FFD80BA6(this); /*0xffd814ff*/\n sub_FFD905CC(); /*0xffd81504*/\n sub_FFD8C497(4, 0); /*0xffd81518*/\n sub_FFD8C497(4, 18875648); /*0xffd8152c*/\n sub_FFD8C497(4, 0); /*0xffd81539*/\n sub_FFD8C497(4, 18875648); /*0xffd81545*/\n return sub_FFD7F9AF(64, (int)\"PchEarlyInit() - End\\n\"); /*0xffd81559*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92b50","name":"aPchearlyinitSt","string":"PchEarlyInit() - Start\n"},{"addr":"0xffd82723","name":"sub_FFD82723"},{"addr":"0xffd81769","name":"sub_FFD81769"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd80ba6","name":"sub_FFD80BA6"},{"addr":"0xffd905cc","name":"sub_FFD905CC"},{"addr":"0xffd92b68","name":"aPchearlyinitEn","string":"PchEarlyInit() - End\n"}]} \ No newline at end of file +{"addr":"0xffd813d1","code":"int __thiscall PchEarlyInit(int *this)\n{\n int v2; // eax\n int v3; // edi\n unsigned __int8 v4; // al\n unsigned __int8 v5; // al\n unsigned __int8 v6; // al\n unsigned __int8 v7; // al\n\n DebugPrint(64, (int)\"PchEarlyInit() - Start\\n\"); /*0xffd813df*/\n sub_FFD82723(); /*0xffd813e4*/\n sub_FFD81769(); /*0xffd813e9*/\n sub_FFD8C497(2, 1); /*0xffd813fc*/\n sub_FFD8C5F6(255, 3); /*0xffd81414*/\n sub_FFD8C578(-2, 0); /*0xffd81425*/\n v2 = sub_FFD8CBBA(0, 31, 1); /*0xffd81431*/\n *(_DWORD *)(v2 + 128) = 0; /*0xffd8143b*/\n *(_DWORD *)(v2 + 132) = 0; /*0xffd81441*/\n *(_DWORD *)(v2 + 136) = 0; /*0xffd81447*/\n *(_DWORD *)(v2 + 140) = 0; /*0xffd8144d*/\n *(_DWORD *)(v2 + 144) = 0; /*0xffd81453*/\n *(_DWORD *)(v2 + 148) = 61440; /*0xffd81459*/\n *(_DWORD *)(v2 + 152) = 16; /*0xffd81463*/\n *(_DWORD *)(v2 + 156) = 0; /*0xffd8146d*/\n *(_BYTE *)(v2 + 244) |= 1u; /*0xffd8147d*/\n v3 = sub_FFD8CBBA(0, 31, 2); /*0xffd8148d*/\n if ( (*(_BYTE *)(v3 + 164) & 4) != 0 ) /*0xffd81499*/\n {\n __outbyte(0x74u, 0xAu); /*0xffd814a3*/\n v4 = __inbyte(0x74u); /*0xffd814a4*/\n __outbyte(0x75u, v4 & 0x8F | 0x60); /*0xffd814af*/\n __outbyte(0x74u, 0xBu); /*0xffd814b5*/\n v5 = __inbyte(0x75u); /*0xffd814b9*/\n __outbyte(0x75u, v5 | 0x80); /*0xffd814bc*/\n __outbyte(0x74u, 0xAu); /*0xffd814c2*/\n v6 = __inbyte(0x75u); /*0xffd814c6*/\n __outbyte(0x75u, v6 & 0x8F | 0x20); /*0xffd814cb*/\n __outbyte(0x74u, 0xBu); /*0xffd814d1*/\n v7 = __inbyte(0x75u); /*0xffd814d5*/\n __outbyte(0x75u, v7 & 0x7F); /*0xffd814d8*/\n }\n *(this + 4) = 16; /*0xffd814d9*/\n *(_DWORD *)(v3 + 172) &= ~0x100000u; /*0xffd814ed*/\n *(this + 53) = 0; /*0xffd814f3*/\n *(this + 61) = 0; /*0xffd814f9*/\n PchEarlyDisabledDeviceHandling(this); /*0xffd814ff*/\n sub_FFD905CC(); /*0xffd81504*/\n sub_FFD8C497(4, 0); /*0xffd81518*/\n sub_FFD8C497(4, 18875648); /*0xffd8152c*/\n sub_FFD8C497(4, 0); /*0xffd81539*/\n sub_FFD8C497(4, 18875648); /*0xffd81545*/\n return DebugPrint(64, (int)\"PchEarlyInit() - End\\n\"); /*0xffd81559*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92b50","name":"aPchearlyinitSt","string":"PchEarlyInit() - Start\n"},{"addr":"0xffd82723","name":"sub_FFD82723"},{"addr":"0xffd81769","name":"sub_FFD81769"},{"addr":"0xffd8c497","name":"sub_FFD8C497"},{"addr":"0xffd8c5f6","name":"sub_FFD8C5F6"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd80ba6","name":"PchEarlyDisabledDeviceHandling"},{"addr":"0xffd905cc","name":"sub_FFD905CC"},{"addr":"0xffd92b68","name":"aPchearlyinitEn","string":"PchEarlyInit() - End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8155f.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8155f.c index 24f7a77..960ba95 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8155f.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8155f.c @@ -1,2 +1,2 @@ // 0xffd8155f -{"addr":"0xffd8155f","code":"int sub_FFD8155F()\n{\n int v0; // eax\n int v1; // esi\n int v2; // eax\n int v3; // eax\n int v4; // esi\n int v5; // eax\n int *v7; // [esp+10h] [ebp-4h] BYREF\n\n sub_FFD7F9AF(64, (int)\"PchInitPreMem() - Start\\n\"); /*0xffd8156b*/\n if ( !(unsigned __int8)sub_FFD8BDC8() ) /*0xffd81572*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"PCH SKU is not supported due to no proper PCH LPC found!\\n\"); /*0xffd8158b*/\n v0 = sub_FFD7F97E(); /*0xffd81592*/\n if ( v0 ) /*0xffd81599*/\n (*(void (__cdecl **)(const char *, int, const char *))(v0 + 4))( /*0xffd815a6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 1948,\n \"((BOOLEAN)(0==1))\");\n }\n v1 = sub_FFD8CBBA(0, 31, 1); /*0xffd815b8*/\n if ( (*(_DWORD *)(v1 + 16) & 0xFF000000) == 0 ) /*0xffd815c4*/\n {\n sub_FFD7F9AF(64, (int)\"SBREG should be programmed before here\\n\"); /*0xffd815cd*/\n *(_DWORD *)(v1 + 16) = -50331648; /*0xffd815d2*/\n *(_BYTE *)(v1 + 4) |= 2u; /*0xffd815e0*/\n }\n sub_FFD8C632(0x500u); /*0xffd815e8*/\n sub_FFD8C80A(); /*0xffd815ed*/\n sub_FFD8C99B(); /*0xffd815f2*/\n sub_FFD8C909((unsigned int *)&v7); /*0xffd815fb*/\n sub_FFD7F9AF(64, (int)\"PCH PWRM Base needs to be programmed before here\\n\"); /*0xffd81607*/\n if ( !v7 ) /*0xffd81613*/\n {\n v2 = sub_FFD7F97E(); /*0xffd81615*/\n if ( v2 ) /*0xffd8161c*/\n (*(void (__cdecl **)(const char *, int, const char *))(v2 + 4))( /*0xffd81629*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 1993,\n \"PchPwrmBase != 0\");\n }\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n sub_FFD7F9AF(0x80000000, (int)\"DWR: DWR detected - install PPI\\n\");\n if ( sub_FFD7F948(&unk_FFD98084) >= 0 )\n sub_FFD7F9AF(0x80000000, (int)\"DWR: DWR PPI has been installed\\n\");\n else\n sub_FFD7F9AF(0x80000000, (int)\"ERROR: Can't install DWR PPI\\n\");\n }\n sub_FFD80210(); /*0xffd81667*/\n sub_FFD813D1(v7); /*0xffd81670*/\n v3 = sub_FFD7F948(&unk_FFD980AC); /*0xffd8167a*/\n v4 = v3; /*0xffd8167f*/\n if ( v3 < 0 ) /*0xffd81683*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v3); /*0xffd8168c*/\n v5 = sub_FFD7F97E(); /*0xffd81694*/\n if ( v5 ) /*0xffd8169b*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd816a8*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 2007,\n \"!EFI_ERROR (Status)\");\n }\n sub_FFD7F9AF(64, (int)\"PchInitPreMem() - End\\n\"); /*0xffd816b5*/\n return v4; /*0xffd816bc*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92b80","name":"aPchinitprememS","string":"PchInitPreMem() - Start\n"},{"addr":"0xffd92b9c","name":"aPchSkuIsNotSup","string":"PCH SKU is not supported due to no proper PCH LPC found!\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8bdc8","name":"sub_FFD8BDC8"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd92bd8","name":"aSbregShouldBeP","string":"SBREG should be programmed before here\n"},{"addr":"0xffd8c632","name":"sub_FFD8C632"},{"addr":"0xffd8c80a","name":"sub_FFD8C80A"},{"addr":"0xffd8c99b","name":"sub_FFD8C99B"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd92c00","name":"aPchPwrmBaseNee","string":"PCH PWRM Base needs to be programmed before here\n"},{"addr":"0xffd92c34","name":"aPchpwrmbase0","string":"PchPwrmBase != 0"},{"addr":"0xffd91fe4","name":"aDwrDwrDetected","string":"DWR: DWR detected - install PPI\n"},{"addr":"0xffd92028","name":"aDwrDwrPpiHasBe","string":"DWR: DWR PPI has been installed\n"},{"addr":"0xffd92008","name":"aErrorCanTInsta","string":"ERROR: Can't install DWR PPI\n"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd98084","name":"unk_FFD98084"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd80210","name":"sub_FFD80210"},{"addr":"0xffd813d1","name":"sub_FFD813D1"},{"addr":"0xffd980ac","name":"unk_FFD980AC"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd92c48","name":"aPchinitprememE","string":"PchInitPreMem() - End\n"}]} \ No newline at end of file +{"addr":"0xffd8155f","code":"int PchInitPreMem()\n{\n int v0; // eax\n int v1; // esi\n int v2; // eax\n int v3; // eax\n int v4; // esi\n int v5; // eax\n int *v7; // [esp+10h] [ebp-4h] BYREF\n\n DebugPrint(64, (int)\"PchInitPreMem() - Start\\n\"); /*0xffd8156b*/\n if ( !(unsigned __int8)sub_FFD8BDC8() ) /*0xffd81572*/\n {\n DebugPrint(0x80000000, (int)\"PCH SKU is not supported due to no proper PCH LPC found!\\n\"); /*0xffd8158b*/\n v0 = GetReportStatusCodePpi(); /*0xffd81592*/\n if ( v0 ) /*0xffd81599*/\n (*(void (__cdecl **)(const char *, int, const char *))(v0 + 4))( /*0xffd815a6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 1948,\n \"((BOOLEAN)(0==1))\");\n }\n v1 = sub_FFD8CBBA(0, 31, 1); /*0xffd815b8*/\n if ( (*(_DWORD *)(v1 + 16) & 0xFF000000) == 0 ) /*0xffd815c4*/\n {\n DebugPrint(64, (int)\"SBREG should be programmed before here\\n\"); /*0xffd815cd*/\n *(_DWORD *)(v1 + 16) = -50331648; /*0xffd815d2*/\n *(_BYTE *)(v1 + 4) |= 2u; /*0xffd815e0*/\n }\n sub_FFD8C632(0x500u); /*0xffd815e8*/\n sub_FFD8C80A(); /*0xffd815ed*/\n sub_FFD8C99B(); /*0xffd815f2*/\n sub_FFD8C909((unsigned int *)&v7); /*0xffd815fb*/\n DebugPrint(64, (int)\"PCH PWRM Base needs to be programmed before here\\n\"); /*0xffd81607*/\n if ( !v7 ) /*0xffd81613*/\n {\n v2 = GetReportStatusCodePpi(); /*0xffd81615*/\n if ( v2 ) /*0xffd8161c*/\n (*(void (__cdecl **)(const char *, int, const char *))(v2 + 4))( /*0xffd81629*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 1993,\n \"PchPwrmBase != 0\");\n }\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n DebugPrint(0x80000000, (int)\"DWR: DWR detected - install PPI\\n\");\n if ( InstallPpi(&unk_FFD98084) >= 0 )\n DebugPrint(0x80000000, (int)\"DWR: DWR PPI has been installed\\n\");\n else\n DebugPrint(0x80000000, (int)\"ERROR: Can't install DWR PPI\\n\");\n }\n PchFabricErrorCheck(); /*0xffd81667*/\n PchEarlyInit(v7); /*0xffd81670*/\n v3 = InstallPpi(&unk_FFD980AC); /*0xffd8167a*/\n v4 = v3; /*0xffd8167f*/\n if ( v3 < 0 ) /*0xffd81683*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v3); /*0xffd8168c*/\n v5 = GetReportStatusCodePpi(); /*0xffd81694*/\n if ( v5 ) /*0xffd8169b*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd816a8*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n 2007,\n \"!EFI_ERROR (Status)\");\n }\n DebugPrint(64, (int)\"PchInitPreMem() - End\\n\"); /*0xffd816b5*/\n return v4; /*0xffd816bc*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92b80","name":"aPchinitprememS","string":"PchInitPreMem() - Start\n"},{"addr":"0xffd92b9c","name":"aPchSkuIsNotSup","string":"PCH SKU is not supported due to no proper PCH LPC found!\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8bdc8","name":"sub_FFD8BDC8"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd92bd8","name":"aSbregShouldBeP","string":"SBREG should be programmed before here\n"},{"addr":"0xffd8c632","name":"sub_FFD8C632"},{"addr":"0xffd8c80a","name":"sub_FFD8C80A"},{"addr":"0xffd8c99b","name":"sub_FFD8C99B"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd92c00","name":"aPchPwrmBaseNee","string":"PCH PWRM Base needs to be programmed before here\n"},{"addr":"0xffd92c34","name":"aPchpwrmbase0","string":"PchPwrmBase != 0"},{"addr":"0xffd91fe4","name":"aDwrDwrDetected","string":"DWR: DWR detected - install PPI\n"},{"addr":"0xffd92028","name":"aDwrDwrPpiHasBe","string":"DWR: DWR PPI has been installed\n"},{"addr":"0xffd92008","name":"aErrorCanTInsta","string":"ERROR: Can't install DWR PPI\n"},{"addr":"0xffd7f948","name":"InstallPpi"},{"addr":"0xffd98084","name":"unk_FFD98084"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd80210","name":"PchFabricErrorCheck"},{"addr":"0xffd813d1","name":"PchEarlyInit"},{"addr":"0xffd980ac","name":"unk_FFD980AC"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd92c48","name":"aPchinitprememE","string":"PchInitPreMem() - End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd816c4.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd816c4.c index 8871e16..5ebf54a 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd816c4.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd816c4.c @@ -1,2 +1,2 @@ // 0xffd816c4 -{"addr":"0xffd816c4","code":"int sub_FFD816C4()\n{\n int v0; // esi\n int v1; // ecx\n __int16 v2; // ax\n double v4; // [esp-4h] [ebp-34h]\n double v5; // [esp-4h] [ebp-34h]\n double v6; // [esp-4h] [ebp-34h]\n _BYTE v7[32]; // [esp+Ch] [ebp-24h] BYREF\n int p_n32; // [esp+2Ch] [ebp-4h] BYREF\n\n v0 = sub_FFD8CBBA(0, 31, 0); /*0xffd816db*/\n p_n32 = 32; /*0xffd816e3*/\n sub_FFD8BE68(); /*0xffd816e6*/\n sub_FFD8C111(&p_n32); /*0xffd816f1*/\n LODWORD(v4) = v7; /*0xffd816fa*/\n sub_FFD7F9AF(64, (int)\"PCH Series : %a\\n\", v4);\n p_n32 = 32; /*0xffd8170a*/\n sub_FFD8BB3A(v1); /*0xffd81712*/\n sub_FFD8C06D(&p_n32); /*0xffd8171d*/\n LODWORD(v5) = v7; /*0xffd81726*/\n sub_FFD7F9AF(64, (int)\"PCH Stepping : %a\\n\", v5);\n p_n32 = 32; /*0xffd81736*/\n v2 = sub_FFD8CCA5((unsigned __int16 *)(v0 + 2)); /*0xffd81740*/\n sub_FFD8C1B5(v2, v7, &p_n32); /*0xffd8174a*/\n LODWORD(v6) = v7; /*0xffd81753*/\n return sub_FFD7F9AF(64, (int)\"PCH SKU : %a\\n\", v6);\n}","refs":[{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8c111","name":"sub_FFD8C111"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92c60","name":"aPchSeriesA","string":"PCH Series : %a\n"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c06d","name":"sub_FFD8C06D"},{"addr":"0xffd92c74","name":"aPchSteppingA","string":"PCH Stepping : %a\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8c1b5","name":"sub_FFD8C1B5"},{"addr":"0xffd92c88","name":"aPchSkuA","string":"PCH SKU : %a\n"}]} \ No newline at end of file +{"addr":"0xffd816c4","code":"int PrintPchInfo()\n{\n int v0; // esi\n int v1; // ecx\n __int16 v2; // ax\n double v4; // [esp-4h] [ebp-34h]\n double v5; // [esp-4h] [ebp-34h]\n double v6; // [esp-4h] [ebp-34h]\n _BYTE v7[32]; // [esp+Ch] [ebp-24h] BYREF\n int p_n32; // [esp+2Ch] [ebp-4h] BYREF\n\n v0 = sub_FFD8CBBA(0, 31, 0); /*0xffd816db*/\n p_n32 = 32; /*0xffd816e3*/\n sub_FFD8BE68(); /*0xffd816e6*/\n sub_FFD8C111(&p_n32); /*0xffd816f1*/\n LODWORD(v4) = v7; /*0xffd816fa*/\n DebugPrint(64, (int)\"PCH Series : %a\\n\", v4);\n p_n32 = 32; /*0xffd8170a*/\n sub_FFD8BB3A(v1); /*0xffd81712*/\n sub_FFD8C06D(&p_n32); /*0xffd8171d*/\n LODWORD(v5) = v7; /*0xffd81726*/\n DebugPrint(64, (int)\"PCH Stepping : %a\\n\", v5);\n p_n32 = 32; /*0xffd81736*/\n v2 = sub_FFD8CCA5((unsigned __int16 *)(v0 + 2)); /*0xffd81740*/\n sub_FFD8C1B5(v2, v7, &p_n32); /*0xffd8174a*/\n LODWORD(v6) = v7; /*0xffd81753*/\n return DebugPrint(64, (int)\"PCH SKU : %a\\n\", v6);\n}","refs":[{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8c111","name":"sub_FFD8C111"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd92c60","name":"aPchSeriesA","string":"PCH Series : %a\n"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c06d","name":"sub_FFD8C06D"},{"addr":"0xffd92c74","name":"aPchSteppingA","string":"PCH Stepping : %a\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8c1b5","name":"sub_FFD8C1B5"},{"addr":"0xffd92c88","name":"aPchSkuA","string":"PCH SKU : %a\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd821b8.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd821b8.c index 16fa20b..b99e228 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd821b8.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd821b8.c @@ -1,2 +1,2 @@ // 0xffd821b8 -{"addr":"0xffd821b8","code":"int __fastcall sub_FFD821B8(int a1, char a2, int a3, unsigned __int8 n2)\n{\n unsigned __int8 n2_1; // bh\n char v5; // bl\n int v7; // edi\n int v8; // eax\n __int16 v9; // si\n int v10; // edx\n unsigned __int8 v11; // bl\n char v12; // al\n char v13; // al\n char n2_2; // [esp+11h] [ebp-3h] BYREF\n char v16; // [esp+12h] [ebp-2h]\n char v17; // [esp+13h] [ebp-1h] BYREF\n\n n2_1 = n2; /*0xffd821ba*/\n v5 = 0; /*0xffd821be*/\n v16 = a2; /*0xffd821c0*/\n if ( n2 == 1 )\n {\n sub_FFD7F9AF(64, (int)\"EarlyConfigurePchHSata() - First Controller - Start\\n\"); /*0xffd821d5*/\n v7 = sub_FFD8CBBA(0, 23, 0); /*0xffd821e9*/\n sub_FFD8C019(); /*0xffd821eb*/\n }\n else\n {\n if ( n2 != 2 )\n {\n sub_FFD7F9AF(0x80000000, (int)\"Error: Invalid SATA controller!\\n\");\n return -2147483646; /*0xffd8244e*/\n }\n sub_FFD7F9AF(64, (int)\"EarlyConfigurePchHSata() - Second Controller - Start\\n\"); /*0xffd82202*/\n v7 = sub_FFD8CBBA(0, 17, 5); /*0xffd82216*/\n }\n v8 = sub_FFD8CBBA(0, 31, 0); /*0xffd8221f*/\n v9 = sub_FFD8CCA5((unsigned __int16 *)(v8 + 2)); /*0xffd8222d*/\n if ( !(unsigned __int8)sub_FFD8D58A() ) /*0xffd82230*/\n {\n if ( n2_1 == 1 ) /*0xffd8223c*/\n v5 = sub_FFD81814(); /*0xffd82243*/\n if ( n2_1 != 2 ) /*0xffd82248*/\n goto LABEL_14; /*0xffd82248*/\n v11 = 0; /*0xffd8224a*/\n while ( 1 ) /*0xffd82253*/\n {\n sub_FFD8E7BA(v11, &n2); /*0xffd82253*/\n sub_FFD8E062(n2, &v17, &n2_2); /*0xffd82266*/\n if ( n2_2 == 2 ) /*0xffd82271*/\n break; /*0xffd82271*/\n if ( ++v11 >= 6u ) /*0xffd82278*/\n {\n v5 = 0; /*0xffd8227a*/\n goto LABEL_14; /*0xffd8227c*/\n }\n }\n }\n v5 = 1; /*0xffd8227e*/\nLABEL_14:\n if ( (*(_BYTE *)a1 & 1) != 0 && (v5 || *(_DWORD *)(a1 + 4)) ) /*0xffd8228e*/\n {\n *(_BYTE *)(v7 + 160) = -104; /*0xffd82298*/\n *(_DWORD *)(v7 + 164) = *(_DWORD *)(v7 + 164) & 0xFFFFFE00 | 0x183; /*0xffd822ad*/\n *(_BYTE *)(v7 + 160) = -104; /*0xffd822b3*/\n *(_DWORD *)(v7 + 164) |= 0x8000u; /*0xffd822c5*/\n *(_BYTE *)(v7 + 160) = -92; /*0xffd822cb*/\n *(_DWORD *)(v7 + 164) |= 0x40u; /*0xffd822db*/\n if ( v9 == -24254 /*0xffd8237d*/\n || v9 == -24253\n || v9 == -24252\n || v9 == -24251\n || v9 == -24250\n || v9 == -24249\n || v9 == -24248\n || v9 == -24256\n || v9 == -24255\n || v9 == -24243\n || v9 == -24242\n || v9 == -24241\n || v9 == -25280\n || v9 == -25279\n || v9 == -25278\n || v9 == -25277\n || v9 == -25274\n || v9 == -25272 )\n {\n *(_BYTE *)(v7 + 160) = -100; /*0xffd8237f*/\n *(_DWORD *)(v7 + 164) |= 0x400000u; /*0xffd82391*/\n }\n *(_BYTE *)(v7 + 160) = -100; /*0xffd82397*/\n *(_DWORD *)(v7 + 164) = *(_DWORD *)(v7 + 164) & 0xDF63E013 | 0x209C0224; /*0xffd823ae*/\n if ( n2_1 == 1 ) /*0xffd823b7*/\n {\n *(_BYTE *)(v7 + 160) = -100; /*0xffd823b9*/\n *(_DWORD *)(v7 + 164) |= 0x40000000u; /*0xffd823cb*/\n }\n v12 = *(_BYTE *)(v7 + 156) | 0x20; /*0xffd823d7*/\n if ( *(_DWORD *)(a1 + 4) == 1 ) /*0xffd823dd*/\n {\n if ( (*(_BYTE *)(a1 + 76) & 1) != 0 ) /*0xffd823e5*/\n v12 = *(_BYTE *)(v7 + 156) & 0x1F | 0xA0; /*0xffd823e7*/\n else\n v12 = *(_BYTE *)(v7 + 156) & 0x1F | 0x60; /*0xffd823eb*/\n }\n if ( v16 ) /*0xffd823f2*/\n v13 = v12 & 0xE1 | 6; /*0xffd823f6*/\n else\n v13 = v12 & 0xE8 | 0x10; /*0xffd823fc*/\n *(_BYTE *)(v7 + 156) = v13 & 0xF8 | 6; /*0xffd8240d*/\n sub_FFD8CC4F(v7 + 148, 255); /*0xffd82413*/\n sub_FFD7FA46(2u); /*0xffd8241b*/\n sub_FFD7F9AF(64, (int)\"EarlyConfigurePchHSata() End\\n\"); /*0xffd82427*/\n return 0; /*0xffd8242c*/\n }\n else\n {\n LOBYTE(v10) = n2_1; /*0xffd82434*/\n sub_FFD81FF5(a3, v10); /*0xffd82436*/\n return 0; /*0xffd8243b*/\n }\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd93020","name":"aEarlyconfigure","string":"EarlyConfigurePchHSata() - First Controller - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c019","name":"sub_FFD8C019"},{"addr":"0xffd92d9c","name":"aErrorInvalidSa","string":"Error: Invalid SATA controller!\n"},{"addr":"0xffd93058","name":"aEarlyconfigure_0","string":"EarlyConfigurePchHSata() - Second Controller - Start\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd81814","name":"sub_FFD81814"},{"addr":"0xffd8e7ba","name":"sub_FFD8E7BA"},{"addr":"0xffd8e062","name":"sub_FFD8E062"},{"addr":"0xffd8d58a","name":"sub_FFD8D58A"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd93090","name":"aEarlyconfigure_1","string":"EarlyConfigurePchHSata() End\n"},{"addr":"0xffd81ff5","name":"sub_FFD81FF5"}]} \ No newline at end of file +{"addr":"0xffd821b8","code":"int __fastcall sub_FFD821B8(int a1, char a2, int a3, unsigned __int8 n2)\n{\n unsigned __int8 n2_1; // bh\n char v5; // bl\n int v7; // edi\n int v8; // eax\n __int16 v9; // si\n int v10; // edx\n unsigned __int8 v11; // bl\n char v12; // al\n char v13; // al\n char n2_2; // [esp+11h] [ebp-3h] BYREF\n char v16; // [esp+12h] [ebp-2h]\n char v17; // [esp+13h] [ebp-1h] BYREF\n\n n2_1 = n2; /*0xffd821ba*/\n v5 = 0; /*0xffd821be*/\n v16 = a2; /*0xffd821c0*/\n if ( n2 == 1 )\n {\n DebugPrint(64, (int)\"EarlyConfigurePchHSata() - First Controller - Start\\n\"); /*0xffd821d5*/\n v7 = sub_FFD8CBBA(0, 23, 0); /*0xffd821e9*/\n sub_FFD8C019(); /*0xffd821eb*/\n }\n else\n {\n if ( n2 != 2 )\n {\n DebugPrint(0x80000000, (int)\"Error: Invalid SATA controller!\\n\");\n return -2147483646; /*0xffd8244e*/\n }\n DebugPrint(64, (int)\"EarlyConfigurePchHSata() - Second Controller - Start\\n\"); /*0xffd82202*/\n v7 = sub_FFD8CBBA(0, 17, 5); /*0xffd82216*/\n }\n v8 = sub_FFD8CBBA(0, 31, 0); /*0xffd8221f*/\n v9 = sub_FFD8CCA5((unsigned __int16 *)(v8 + 2)); /*0xffd8222d*/\n if ( !(unsigned __int8)sub_FFD8D58A() ) /*0xffd82230*/\n {\n if ( n2_1 == 1 ) /*0xffd8223c*/\n v5 = sub_FFD81814(); /*0xffd82243*/\n if ( n2_1 != 2 ) /*0xffd82248*/\n goto LABEL_14; /*0xffd82248*/\n v11 = 0; /*0xffd8224a*/\n while ( 1 ) /*0xffd82253*/\n {\n sub_FFD8E7BA(v11, &n2); /*0xffd82253*/\n sub_FFD8E062(n2, &v17, &n2_2); /*0xffd82266*/\n if ( n2_2 == 2 ) /*0xffd82271*/\n break; /*0xffd82271*/\n if ( ++v11 >= 6u ) /*0xffd82278*/\n {\n v5 = 0; /*0xffd8227a*/\n goto LABEL_14; /*0xffd8227c*/\n }\n }\n }\n v5 = 1; /*0xffd8227e*/\nLABEL_14:\n if ( (*(_BYTE *)a1 & 1) != 0 && (v5 || *(_DWORD *)(a1 + 4)) ) /*0xffd8228e*/\n {\n *(_BYTE *)(v7 + 160) = -104; /*0xffd82298*/\n *(_DWORD *)(v7 + 164) = *(_DWORD *)(v7 + 164) & 0xFFFFFE00 | 0x183; /*0xffd822ad*/\n *(_BYTE *)(v7 + 160) = -104; /*0xffd822b3*/\n *(_DWORD *)(v7 + 164) |= 0x8000u; /*0xffd822c5*/\n *(_BYTE *)(v7 + 160) = -92; /*0xffd822cb*/\n *(_DWORD *)(v7 + 164) |= 0x40u; /*0xffd822db*/\n if ( v9 == -24254 /*0xffd8237d*/\n || v9 == -24253\n || v9 == -24252\n || v9 == -24251\n || v9 == -24250\n || v9 == -24249\n || v9 == -24248\n || v9 == -24256\n || v9 == -24255\n || v9 == -24243\n || v9 == -24242\n || v9 == -24241\n || v9 == -25280\n || v9 == -25279\n || v9 == -25278\n || v9 == -25277\n || v9 == -25274\n || v9 == -25272 )\n {\n *(_BYTE *)(v7 + 160) = -100; /*0xffd8237f*/\n *(_DWORD *)(v7 + 164) |= 0x400000u; /*0xffd82391*/\n }\n *(_BYTE *)(v7 + 160) = -100; /*0xffd82397*/\n *(_DWORD *)(v7 + 164) = *(_DWORD *)(v7 + 164) & 0xDF63E013 | 0x209C0224; /*0xffd823ae*/\n if ( n2_1 == 1 ) /*0xffd823b7*/\n {\n *(_BYTE *)(v7 + 160) = -100; /*0xffd823b9*/\n *(_DWORD *)(v7 + 164) |= 0x40000000u; /*0xffd823cb*/\n }\n v12 = *(_BYTE *)(v7 + 156) | 0x20; /*0xffd823d7*/\n if ( *(_DWORD *)(a1 + 4) == 1 ) /*0xffd823dd*/\n {\n if ( (*(_BYTE *)(a1 + 76) & 1) != 0 ) /*0xffd823e5*/\n v12 = *(_BYTE *)(v7 + 156) & 0x1F | 0xA0; /*0xffd823e7*/\n else\n v12 = *(_BYTE *)(v7 + 156) & 0x1F | 0x60; /*0xffd823eb*/\n }\n if ( v16 ) /*0xffd823f2*/\n v13 = v12 & 0xE1 | 6; /*0xffd823f6*/\n else\n v13 = v12 & 0xE8 | 0x10; /*0xffd823fc*/\n *(_BYTE *)(v7 + 156) = v13 & 0xF8 | 6; /*0xffd8240d*/\n sub_FFD8CC4F(v7 + 148, 255); /*0xffd82413*/\n sub_FFD7FA46(2u); /*0xffd8241b*/\n DebugPrint(64, (int)\"EarlyConfigurePchHSata() End\\n\"); /*0xffd82427*/\n return 0; /*0xffd8242c*/\n }\n else\n {\n LOBYTE(v10) = n2_1; /*0xffd82434*/\n sub_FFD81FF5(a3, v10); /*0xffd82436*/\n return 0; /*0xffd8243b*/\n }\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd93020","name":"aEarlyconfigure","string":"EarlyConfigurePchHSata() - First Controller - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c019","name":"sub_FFD8C019"},{"addr":"0xffd92d9c","name":"aErrorInvalidSa","string":"Error: Invalid SATA controller!\n"},{"addr":"0xffd93058","name":"aEarlyconfigure_0","string":"EarlyConfigurePchHSata() - Second Controller - Start\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd81814","name":"sub_FFD81814"},{"addr":"0xffd8e7ba","name":"sub_FFD8E7BA"},{"addr":"0xffd8e062","name":"sub_FFD8E062"},{"addr":"0xffd8d58a","name":"sub_FFD8D58A"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd93090","name":"aEarlyconfigure_1","string":"EarlyConfigurePchHSata() End\n"},{"addr":"0xffd81ff5","name":"sub_FFD81FF5"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8245b.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8245b.c index 485f770..035c5b0 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8245b.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8245b.c @@ -1,2 +1,2 @@ // 0xffd8245b -{"addr":"0xffd8245b","code":"int __cdecl sub_FFD8245B(int n2)\n{\n int v1; // ecx\n int v2; // ebx\n int v3; // edi\n int v4; // esi\n unsigned int n6; // ebp\n int v6; // eax\n unsigned __int8 n6_1; // cl\n int v8; // eax\n\n v2 = 0; /*0xffd82460*/\n v3 = v1; /*0xffd8246c*/\n if ( (_BYTE)n2 == 1 ) /*0xffd8246e*/\n {\n sub_FFD7F9AF(64, (int)\"ConfigurePchHSata() - First Controller - Start\\n\"); /*0xffd82477*/\n v4 = sub_FFD8CBBA(0, 23, 0); /*0xffd8248a*/\n n6 = (unsigned __int8)sub_FFD8C019(); /*0xffd82491*/\n }\n else\n {\n sub_FFD7F9AF(64, (int)\"ConfigurePchHSata() - Second Controller - Start\\n\"); /*0xffd8249d*/\n v4 = sub_FFD8CBBA(0, 17, 5); /*0xffd824b1*/\n n6 = 6; /*0xffd824b5*/\n }\n v6 = sub_FFD8CBBA(0, 31, 0); /*0xffd824bc*/\n sub_FFD8CCA5((unsigned __int16 *)(v6 + 2)); /*0xffd824c5*/\n sub_FFD81B92(n2); /*0xffd824d4*/\n if ( (*(_BYTE *)v3 & 8) != 0 ) /*0xffd824dd*/\n {\n n6_1 = 0; /*0xffd824e3*/\n if ( n6 ) /*0xffd824e7*/\n {\n v8 = 0; /*0xffd824e9*/\n do /*0xffd82506*/\n {\n if ( (*(_BYTE *)(v3 + 8 * v8 + 12) & 1) != 0 && (*(_DWORD *)(v3 + 8 * v8 + 12) & 0x40000A) != 0 ) /*0xffd824fa*/\n v2 |= 1 << v8; /*0xffd824fc*/\n v8 = ++n6_1; /*0xffd82501*/\n }\n while ( n6_1 < n6 ); /*0xffd82506*/\n }\n *(_BYTE *)(v4 + 160) = -112; /*0xffd82508*/\n *(_DWORD *)(v4 + 164) |= (unsigned __int8)~(_BYTE)v2; /*0xffd82521*/\n *(_BYTE *)(v4 + 160) = 0x80; /*0xffd8252c*/\n *(_DWORD *)(v4 + 164) |= v2 << 16; /*0xffd8253b*/\n *(_BYTE *)(v4 + 160) = -116; /*0xffd82541*/\n *(_DWORD *)(v4 + 164) |= 0xFF00FFu; /*0xffd82550*/\n *(_BYTE *)(v4 + 160) = -96; /*0xffd82556*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xFF037FFF | 0x588000; /*0xffd8256d*/\n *(_BYTE *)(v4 + 160) = -124; /*0xffd82573*/\n *(_DWORD *)(v4 + 164) |= 0xFF00FFu; /*0xffd82582*/\n *(_BYTE *)(v4 + 160) = -92; /*0xffd82588*/\n *(_DWORD *)(v4 + 164) |= 0x4000u; /*0xffd8259a*/\n *(_BYTE *)(v4 + 160) = -52; /*0xffd825a0*/\n *(_DWORD *)(v4 + 164) = -2009296895; /*0xffd825a7*/\n *(_BYTE *)(v4 + 160) = -48; /*0xffd825b1*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xFFFF0000 | 0x8828; /*0xffd825c8*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825ce*/\n *(_DWORD *)(v4 + 164) |= 8u; /*0xffd825de*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825e4*/\n *(_DWORD *)(v4 + 164) |= 1u; /*0xffd825f4*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825fa*/\n *(_DWORD *)(v4 + 164) |= 2u; /*0xffd8260a*/\n }\n *(_BYTE *)(v4 + 160) = -88; /*0xffd82610*/\n *(_DWORD *)(v4 + 164) &= 0xFFF0FFFF; /*0xffd82622*/\n *(_BYTE *)(v4 + 160) = -44; /*0xffd82628*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xC0C0E0E0 | 0x2C1E1108; /*0xffd8263f*/\n *(_BYTE *)(v4 + 158) &= ~1u; /*0xffd8264d*/\n if ( *(_DWORD *)(v3 + 4) == 1 ) /*0xffd82657*/\n *(_BYTE *)(v4 + 158) |= 1u; /*0xffd82661*/\n if ( (_BYTE)n2 == 1 ) /*0xffd8266c*/\n return sub_FFD7F9AF(64, (int)\"ConfigurePchHSata() - First Controller - End\\n\"); /*0xffd82673*/\n else\n return sub_FFD7F9AF(64, (int)\"ConfigurePchHSata() - Second Controller - End\\n\"); /*0xffd8267c*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd930b0","name":"aConfigurepchhs","string":"ConfigurePchHSata() - First Controller - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c019","name":"sub_FFD8C019"},{"addr":"0xffd930e0","name":"aConfigurepchhs_0","string":"ConfigurePchHSata() - Second Controller - Start\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd81b92","name":"sub_FFD81B92"},{"addr":"0xffd93114","name":"aConfigurepchhs_3","string":"ConfigurePchHSata() - First Controller - End\n"},{"addr":"0xffd93144","name":"aConfigurepchhs_4","string":"ConfigurePchHSata() - Second Controller - End\n"}]} \ No newline at end of file +{"addr":"0xffd8245b","code":"int __cdecl sub_FFD8245B(int n2)\n{\n int v1; // ecx\n int v2; // ebx\n int v3; // edi\n int v4; // esi\n unsigned int n6; // ebp\n int v6; // eax\n unsigned __int8 n6_1; // cl\n int v8; // eax\n\n v2 = 0; /*0xffd82460*/\n v3 = v1; /*0xffd8246c*/\n if ( (_BYTE)n2 == 1 ) /*0xffd8246e*/\n {\n DebugPrint(64, (int)\"ConfigurePchHSata() - First Controller - Start\\n\"); /*0xffd82477*/\n v4 = sub_FFD8CBBA(0, 23, 0); /*0xffd8248a*/\n n6 = (unsigned __int8)sub_FFD8C019(); /*0xffd82491*/\n }\n else\n {\n DebugPrint(64, (int)\"ConfigurePchHSata() - Second Controller - Start\\n\"); /*0xffd8249d*/\n v4 = sub_FFD8CBBA(0, 17, 5); /*0xffd824b1*/\n n6 = 6; /*0xffd824b5*/\n }\n v6 = sub_FFD8CBBA(0, 31, 0); /*0xffd824bc*/\n sub_FFD8CCA5((unsigned __int16 *)(v6 + 2)); /*0xffd824c5*/\n sub_FFD81B92(n2); /*0xffd824d4*/\n if ( (*(_BYTE *)v3 & 8) != 0 ) /*0xffd824dd*/\n {\n n6_1 = 0; /*0xffd824e3*/\n if ( n6 ) /*0xffd824e7*/\n {\n v8 = 0; /*0xffd824e9*/\n do /*0xffd82506*/\n {\n if ( (*(_BYTE *)(v3 + 8 * v8 + 12) & 1) != 0 && (*(_DWORD *)(v3 + 8 * v8 + 12) & 0x40000A) != 0 ) /*0xffd824fa*/\n v2 |= 1 << v8; /*0xffd824fc*/\n v8 = ++n6_1; /*0xffd82501*/\n }\n while ( n6_1 < n6 ); /*0xffd82506*/\n }\n *(_BYTE *)(v4 + 160) = -112; /*0xffd82508*/\n *(_DWORD *)(v4 + 164) |= (unsigned __int8)~(_BYTE)v2; /*0xffd82521*/\n *(_BYTE *)(v4 + 160) = 0x80; /*0xffd8252c*/\n *(_DWORD *)(v4 + 164) |= v2 << 16; /*0xffd8253b*/\n *(_BYTE *)(v4 + 160) = -116; /*0xffd82541*/\n *(_DWORD *)(v4 + 164) |= 0xFF00FFu; /*0xffd82550*/\n *(_BYTE *)(v4 + 160) = -96; /*0xffd82556*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xFF037FFF | 0x588000; /*0xffd8256d*/\n *(_BYTE *)(v4 + 160) = -124; /*0xffd82573*/\n *(_DWORD *)(v4 + 164) |= 0xFF00FFu; /*0xffd82582*/\n *(_BYTE *)(v4 + 160) = -92; /*0xffd82588*/\n *(_DWORD *)(v4 + 164) |= 0x4000u; /*0xffd8259a*/\n *(_BYTE *)(v4 + 160) = -52; /*0xffd825a0*/\n *(_DWORD *)(v4 + 164) = -2009296895; /*0xffd825a7*/\n *(_BYTE *)(v4 + 160) = -48; /*0xffd825b1*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xFFFF0000 | 0x8828; /*0xffd825c8*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825ce*/\n *(_DWORD *)(v4 + 164) |= 8u; /*0xffd825de*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825e4*/\n *(_DWORD *)(v4 + 164) |= 1u; /*0xffd825f4*/\n *(_BYTE *)(v4 + 160) = -56; /*0xffd825fa*/\n *(_DWORD *)(v4 + 164) |= 2u; /*0xffd8260a*/\n }\n *(_BYTE *)(v4 + 160) = -88; /*0xffd82610*/\n *(_DWORD *)(v4 + 164) &= 0xFFF0FFFF; /*0xffd82622*/\n *(_BYTE *)(v4 + 160) = -44; /*0xffd82628*/\n *(_DWORD *)(v4 + 164) = *(_DWORD *)(v4 + 164) & 0xC0C0E0E0 | 0x2C1E1108; /*0xffd8263f*/\n *(_BYTE *)(v4 + 158) &= ~1u; /*0xffd8264d*/\n if ( *(_DWORD *)(v3 + 4) == 1 ) /*0xffd82657*/\n *(_BYTE *)(v4 + 158) |= 1u; /*0xffd82661*/\n if ( (_BYTE)n2 == 1 ) /*0xffd8266c*/\n return DebugPrint(64, (int)\"ConfigurePchHSata() - First Controller - End\\n\"); /*0xffd82673*/\n else\n return DebugPrint(64, (int)\"ConfigurePchHSata() - Second Controller - End\\n\"); /*0xffd8267c*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd930b0","name":"aConfigurepchhs","string":"ConfigurePchHSata() - First Controller - Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c019","name":"sub_FFD8C019"},{"addr":"0xffd930e0","name":"aConfigurepchhs_0","string":"ConfigurePchHSata() - Second Controller - Start\n"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd81b92","name":"sub_FFD81B92"},{"addr":"0xffd93114","name":"aConfigurepchhs_3","string":"ConfigurePchHSata() - First Controller - End\n"},{"addr":"0xffd93144","name":"aConfigurepchhs_4","string":"ConfigurePchHSata() - Second Controller - End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82c71.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82c71.c index 0294e7c..ecd81d3 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82c71.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82c71.c @@ -1,2 +1,2 @@ // 0xffd82c71 -{"addr":"0xffd82c71","code":"int sub_FFD82C71()\n{\n unsigned int i; // edi\n int v1; // ebx\n unsigned __int16 v2; // ax\n char v4; // [esp+10h] [ebp-8h]\n int v5; // [esp+14h] [ebp-4h] BYREF\n\n sub_FFD7F9AF(64, (int)\"PciERWORegInit() Start\\n\"); /*0xffd82c81*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n sub_FFD7F9AF(64, (int)\"DWR: PciERWORegInit() End\\n\");\n }\n else\n {\n sub_FFD8BE68(); /*0xffd82c9b*/\n for ( i = 0; i < (unsigned __int8)sub_FFD8BFFD(); ++i ) /*0xffd82ca2*/\n {\n sub_FFD8D75C(&v5); /*0xffd82cb4*/\n v1 = sub_FFD8CBBA(0, v4, v5); /*0xffd82cc8*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v1) != 0xFFFF ) /*0xffd82cd9*/\n {\n v2 = sub_FFD8CCA5((unsigned __int16 *)(v1 + 68)); /*0xffd82cde*/\n sub_FFD8CCD3(v1 + 68, v2); /*0xffd82ce9*/\n *(_DWORD *)(v1 + 76) = *(_DWORD *)(v1 + 76); /*0xffd82cf1*/\n *(_DWORD *)(v1 + 84) = *(_DWORD *)(v1 + 84); /*0xffd82cf7*/\n *(_DWORD *)(v1 + 216) |= 0x800000u; /*0xffd82d05*/\n }\n }\n sub_FFD7F9AF(64, (int)\"PciERWORegInit() End\\n\"); /*0xffd82d1f*/\n }\n return 0; /*0xffd82d26*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd93288","name":"aPcierworeginit","string":"PciERWORegInit() Start\n"},{"addr":"0xffd932a0","name":"aDwrPcierworegi","string":"DWR: PciERWORegInit() End\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd932bc","name":"aPcierworeginit_0","string":"PciERWORegInit() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file +{"addr":"0xffd82c71","code":"int PciERWORegInit()\n{\n unsigned int i; // edi\n int v1; // ebx\n unsigned __int16 v2; // ax\n char v4; // [esp+10h] [ebp-8h]\n int v5; // [esp+14h] [ebp-4h] BYREF\n\n DebugPrint(64, (int)\"PciERWORegInit() Start\\n\"); /*0xffd82c81*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n DebugPrint(64, (int)\"DWR: PciERWORegInit() End\\n\");\n }\n else\n {\n sub_FFD8BE68(); /*0xffd82c9b*/\n for ( i = 0; i < (unsigned __int8)sub_FFD8BFFD(); ++i ) /*0xffd82ca2*/\n {\n sub_FFD8D75C(&v5); /*0xffd82cb4*/\n v1 = sub_FFD8CBBA(0, v4, v5); /*0xffd82cc8*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v1) != 0xFFFF ) /*0xffd82cd9*/\n {\n v2 = sub_FFD8CCA5((unsigned __int16 *)(v1 + 68)); /*0xffd82cde*/\n sub_FFD8CCD3(v1 + 68, v2); /*0xffd82ce9*/\n *(_DWORD *)(v1 + 76) = *(_DWORD *)(v1 + 76); /*0xffd82cf1*/\n *(_DWORD *)(v1 + 84) = *(_DWORD *)(v1 + 84); /*0xffd82cf7*/\n *(_DWORD *)(v1 + 216) |= 0x800000u; /*0xffd82d05*/\n }\n }\n DebugPrint(64, (int)\"PciERWORegInit() End\\n\"); /*0xffd82d1f*/\n }\n return 0; /*0xffd82d26*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd93288","name":"aPcierworeginit","string":"PciERWORegInit() Start\n"},{"addr":"0xffd932a0","name":"aDwrPcierworegi","string":"DWR: PciERWORegInit() End\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd932bc","name":"aPcierworeginit_0","string":"PciERWORegInit() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82d2f.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82d2f.c index d3c7e05..451c2c1 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82d2f.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82d2f.c @@ -1,2 +1,2 @@ // 0xffd82d2f -{"addr":"0xffd82d2f","code":"int __fastcall sub_FFD82D2F(int a1, int a2)\n{\n unsigned __int8 i_1; // al\n unsigned int i_2; // esi\n unsigned int i; // ebx\n int v5; // eax\n int v6; // edi\n unsigned int j; // esi\n int v8; // ebp\n unsigned int n0x96; // ebp\n unsigned int i_3; // esi\n unsigned int k; // ebp\n int v12; // esi\n unsigned int n0x96_2; // ebp\n unsigned int i_4; // esi\n unsigned int n0x96_1; // [esp+14h] [ebp-60h] BYREF\n unsigned int v17; // [esp+18h] [ebp-5Ch]\n int v18; // [esp+1Ch] [ebp-58h]\n int v19; // [esp+20h] [ebp-54h]\n _DWORD v20[20]; // [esp+24h] [ebp-50h]\n\n v18 = a2; /*0xffd82d36*/\n v19 = a1; /*0xffd82d3a*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n sub_FFD7F9AF(64, (int)\"DWR: PchPcieRpSpeedChange() End\\n\");\n }\n else\n {\n i_1 = sub_FFD8BFFD(); /*0xffd82d5a*/\n i_2 = 0; /*0xffd82d5f*/\n for ( i = i_1; i_2 < i; ++i_2 ) /*0xffd82d66*/\n {\n v20[i_2] = 0; /*0xffd82d68*/\n if ( sub_FFD8D75C(&n0x96_1) >= 0 ) /*0xffd82d80*/\n {\n v20[i_2] = sub_FFD8CBBA(0, v17, n0x96_1); /*0xffd82db2*/\n }\n else\n {\n v5 = sub_FFD7F97E(); /*0xffd82d82*/\n if ( v5 ) /*0xffd82d89*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd82d9a*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 822,\n \"((BOOLEAN)(0==1))\");\n }\n }\n v6 = 0; /*0xffd82dbb*/\n for ( j = 0; j < i; ++j ) /*0xffd82dc1*/\n {\n v8 = v20[j]; /*0xffd82dc3*/\n if ( v8 ) /*0xffd82dc9*/\n {\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v20[j]) != 0xFFFF ) /*0xffd82dda*/\n {\n v17 = *(_DWORD *)(v8 + 76) & 0xF; /*0xffd82de2*/\n if ( v17 > 1 && !sub_FFD826AE(v19 + 28, j, *(_BYTE *)(j + v18)) ) /*0xffd82dfd*/\n {\n sub_FFD8CC85(v17); /*0xffd82e13*/\n if ( (sub_FFD8CCA5((unsigned __int16 *)(v8 + 90)) & 0x40) != 0 ) /*0xffd82e23*/\n {\n sub_FFD8CC4F(v8 + 80, 32); /*0xffd82e2b*/\n v6 |= 1 << j; /*0xffd82e30*/\n }\n }\n }\n }\n }\n n0x96 = 0; /*0xffd82e38*/\n n0x96_1 = 0; /*0xffd82e3a*/\n if ( v6 ) /*0xffd82e40*/\n {\n do /*0xffd82e90*/\n {\n if ( n0x96 >= 0x96 ) /*0xffd82e4c*/\n break; /*0xffd82e4c*/\n sub_FFD7FA46(0x64u); /*0xffd82e51*/\n i_3 = 0; /*0xffd82e56*/\n if ( i ) /*0xffd82e5a*/\n {\n do /*0xffd82e83*/\n {\n if ( ((1 << i_3) & v6) != 0 && (sub_FFD8CCA5((unsigned __int16 *)(v20[i_3] + 82)) & 0x2000) != 0 ) /*0xffd82e7b*/\n v6 &= ~(1 << i_3); /*0xffd82e7d*/\n ++i_3; /*0xffd82e80*/\n }\n while ( i_3 < i ); /*0xffd82e83*/\n n0x96 = n0x96_1; /*0xffd82e85*/\n }\n n0x96_1 = ++n0x96; /*0xffd82e8a*/\n }\n while ( v6 ); /*0xffd82e90*/\n if ( v6 ) /*0xffd82e94*/\n {\n for ( k = 0; k < i; ++k ) /*0xffd82e9e*/\n {\n if ( ((1 << k) & v6) != 0 ) /*0xffd82ea9*/\n {\n v12 = v20[k]; /*0xffd82eab*/\n sub_FFD8CC85(1); /*0xffd82eb9*/\n sub_FFD8CC4F(v12 + 80, 32); /*0xffd82ec5*/\n }\n }\n n0x96_2 = 0; /*0xffd82ecf*/\n n0x96_1 = 0; /*0xffd82ed1*/\n do /*0xffd82f1f*/\n {\n if ( n0x96_2 >= 0x96 ) /*0xffd82edb*/\n break; /*0xffd82edb*/\n sub_FFD7FA46(0x64u); /*0xffd82ee0*/\n i_4 = 0; /*0xffd82ee5*/\n if ( i ) /*0xffd82ee9*/\n {\n do /*0xffd82f12*/\n {\n if ( ((1 << i_4) & v6) != 0 && (sub_FFD8CCA5((unsigned __int16 *)(v20[i_4] + 82)) & 0x2000) != 0 ) /*0xffd82f0a*/\n v6 &= ~(1 << i_4); /*0xffd82f0c*/\n ++i_4; /*0xffd82f0f*/\n }\n while ( i_4 < i ); /*0xffd82f12*/\n n0x96_2 = n0x96_1; /*0xffd82f14*/\n }\n n0x96_1 = ++n0x96_2; /*0xffd82f19*/\n }\n while ( v6 ); /*0xffd82f1f*/\n }\n }\n }\n return 0; /*0xffd82f21*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd932d4","name":"aDwrPchpcierpsp","string":"DWR: PchPcieRpSpeedChange() End\n"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd8cc85","name":"sub_FFD8CC85"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd826ae","name":"sub_FFD826AE"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file +{"addr":"0xffd82d2f","code":"int __fastcall PchPcieRpSpeedChange(int a1, int a2)\n{\n unsigned __int8 i_1; // al\n unsigned int i_2; // esi\n unsigned int i; // ebx\n int v5; // eax\n int v6; // edi\n unsigned int j; // esi\n int v8; // ebp\n unsigned int n0x96; // ebp\n unsigned int i_3; // esi\n unsigned int k; // ebp\n int v12; // esi\n unsigned int n0x96_2; // ebp\n unsigned int i_4; // esi\n unsigned int n0x96_1; // [esp+14h] [ebp-60h] BYREF\n unsigned int v17; // [esp+18h] [ebp-5Ch]\n int v18; // [esp+1Ch] [ebp-58h]\n int v19; // [esp+20h] [ebp-54h]\n _DWORD v20[20]; // [esp+24h] [ebp-50h]\n\n v18 = a2; /*0xffd82d36*/\n v19 = a1; /*0xffd82d3a*/\n if ( (unsigned __int8)sub_FFD8D59A() )\n {\n DebugPrint(64, (int)\"DWR: PchPcieRpSpeedChange() End\\n\");\n }\n else\n {\n i_1 = sub_FFD8BFFD(); /*0xffd82d5a*/\n i_2 = 0; /*0xffd82d5f*/\n for ( i = i_1; i_2 < i; ++i_2 ) /*0xffd82d66*/\n {\n v20[i_2] = 0; /*0xffd82d68*/\n if ( sub_FFD8D75C(&n0x96_1) >= 0 ) /*0xffd82d80*/\n {\n v20[i_2] = sub_FFD8CBBA(0, v17, n0x96_1); /*0xffd82db2*/\n }\n else\n {\n v5 = GetReportStatusCodePpi(); /*0xffd82d82*/\n if ( v5 ) /*0xffd82d89*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd82d9a*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 822,\n \"((BOOLEAN)(0==1))\");\n }\n }\n v6 = 0; /*0xffd82dbb*/\n for ( j = 0; j < i; ++j ) /*0xffd82dc1*/\n {\n v8 = v20[j]; /*0xffd82dc3*/\n if ( v8 ) /*0xffd82dc9*/\n {\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v20[j]) != 0xFFFF ) /*0xffd82dda*/\n {\n v17 = *(_DWORD *)(v8 + 76) & 0xF; /*0xffd82de2*/\n if ( v17 > 1 && !sub_FFD826AE(v19 + 28, j, *(_BYTE *)(j + v18)) ) /*0xffd82dfd*/\n {\n sub_FFD8CC85(v17); /*0xffd82e13*/\n if ( (sub_FFD8CCA5((unsigned __int16 *)(v8 + 90)) & 0x40) != 0 ) /*0xffd82e23*/\n {\n sub_FFD8CC4F(v8 + 80, 32); /*0xffd82e2b*/\n v6 |= 1 << j; /*0xffd82e30*/\n }\n }\n }\n }\n }\n n0x96 = 0; /*0xffd82e38*/\n n0x96_1 = 0; /*0xffd82e3a*/\n if ( v6 ) /*0xffd82e40*/\n {\n do /*0xffd82e90*/\n {\n if ( n0x96 >= 0x96 ) /*0xffd82e4c*/\n break; /*0xffd82e4c*/\n sub_FFD7FA46(0x64u); /*0xffd82e51*/\n i_3 = 0; /*0xffd82e56*/\n if ( i ) /*0xffd82e5a*/\n {\n do /*0xffd82e83*/\n {\n if ( ((1 << i_3) & v6) != 0 && (sub_FFD8CCA5((unsigned __int16 *)(v20[i_3] + 82)) & 0x2000) != 0 ) /*0xffd82e7b*/\n v6 &= ~(1 << i_3); /*0xffd82e7d*/\n ++i_3; /*0xffd82e80*/\n }\n while ( i_3 < i ); /*0xffd82e83*/\n n0x96 = n0x96_1; /*0xffd82e85*/\n }\n n0x96_1 = ++n0x96; /*0xffd82e8a*/\n }\n while ( v6 ); /*0xffd82e90*/\n if ( v6 ) /*0xffd82e94*/\n {\n for ( k = 0; k < i; ++k ) /*0xffd82e9e*/\n {\n if ( ((1 << k) & v6) != 0 ) /*0xffd82ea9*/\n {\n v12 = v20[k]; /*0xffd82eab*/\n sub_FFD8CC85(1); /*0xffd82eb9*/\n sub_FFD8CC4F(v12 + 80, 32); /*0xffd82ec5*/\n }\n }\n n0x96_2 = 0; /*0xffd82ecf*/\n n0x96_1 = 0; /*0xffd82ed1*/\n do /*0xffd82f1f*/\n {\n if ( n0x96_2 >= 0x96 ) /*0xffd82edb*/\n break; /*0xffd82edb*/\n sub_FFD7FA46(0x64u); /*0xffd82ee0*/\n i_4 = 0; /*0xffd82ee5*/\n if ( i ) /*0xffd82ee9*/\n {\n do /*0xffd82f12*/\n {\n if ( ((1 << i_4) & v6) != 0 && (sub_FFD8CCA5((unsigned __int16 *)(v20[i_4] + 82)) & 0x2000) != 0 ) /*0xffd82f0a*/\n v6 &= ~(1 << i_4); /*0xffd82f0c*/\n ++i_4; /*0xffd82f0f*/\n }\n while ( i_4 < i ); /*0xffd82f12*/\n n0x96_2 = n0x96_1; /*0xffd82f14*/\n }\n n0x96_1 = ++n0x96_2; /*0xffd82f19*/\n }\n while ( v6 ); /*0xffd82f1f*/\n }\n }\n }\n return 0; /*0xffd82f21*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd932d4","name":"aDwrPchpcierpsp","string":"DWR: PchPcieRpSpeedChange() End\n"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd8cc85","name":"sub_FFD8CC85"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd826ae","name":"sub_FFD826AE"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82f2b.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82f2b.c index e72311c..d5e25d8 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82f2b.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd82f2b.c @@ -1,2 +1,2 @@ // 0xffd82f2b -{"addr":"0xffd82f2b","code":"bool __fastcall sub_FFD82F2B(int a1, unsigned __int8 a2, unsigned __int16 *a3)\n{\n char v5; // bl\n unsigned int v7; // ebp\n unsigned __int8 v8; // al\n unsigned __int16 *v9; // ecx\n unsigned int *v11; // [esp+1Ch] [ebp+4h]\n\n v5 = 0; /*0xffd82f40*/\n *(_DWORD *)(a3 + 1) = 0xFFFF; /*0xffd82f42*/\n *a3 = -1; /*0xffd82f49*/\n if ( (sub_FFD8CCA5((unsigned __int16 *)(a1 + 90)) & 0x40) == 0 ) /*0xffd82f56*/\n return 0; /*0xffd82f58*/\n *(_DWORD *)(a1 + 24) = *(_DWORD *)(a1 + 24) & 0xFF0000FF | ((a2 | (a2 << 8)) << 8); /*0xffd82f7c*/\n v11 = (unsigned int *)sub_FFD8CBBA(a2, 0, 0); /*0xffd82f8b*/\n sub_FFD8CCD3(v11, 0); /*0xffd82f8f*/\n v7 = *v11; /*0xffd82f94*/\n *(_DWORD *)a3 = *v11; /*0xffd82f9c*/\n if ( v7 != -1 ) /*0xffd82fa6*/\n {\n v8 = sub_FFD90A71(0, HIWORD(v7)); /*0xffd82fb0*/\n if ( v8 ) /*0xffd82fb9*/\n {\n v9 = (unsigned __int16 *)((char *)v11 + v8 + 12); /*0xffd82fc5*/\n v5 = *(_BYTE *)v9 & 0xF; /*0xffd82fc9*/\n *((_BYTE *)a3 + 5) = ((unsigned __int16)sub_FFD8CCA5(v9) >> 4) & 0x3F; /*0xffd82fd7*/\n }\n *((_BYTE *)a3 + 4) = v5; /*0xffd82fda*/\n }\n *(_DWORD *)(a1 + 24) &= 0xFF0000FF; /*0xffd82fe5*/\n sub_FFD7F9AF(\n 64,\n (int)\"VID: %04X DID: %04X MLS: %d MLW: %d\\n\",\n *a3,\n a3[1],\n *((unsigned __int8 *)a3 + 4),\n *((unsigned __int8 *)a3 + 5));\n return v7 != -1; /*0xffd83012*/\n}","refs":[{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd90a71","name":"sub_FFD90A71"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd932f8","name":"aVid04xDid04xMl","string":"VID: %04X DID: %04X MLS: %d MLW: %d\n"}]} \ No newline at end of file +{"addr":"0xffd82f2b","code":"bool __fastcall GetPciEndpointInfo(int a1, unsigned __int8 a2, unsigned __int16 *a3)\n{\n char v5; // bl\n unsigned int v7; // ebp\n unsigned __int8 v8; // al\n unsigned __int16 *v9; // ecx\n unsigned int *v11; // [esp+1Ch] [ebp+4h]\n\n v5 = 0; /*0xffd82f40*/\n *(_DWORD *)(a3 + 1) = 0xFFFF; /*0xffd82f42*/\n *a3 = -1; /*0xffd82f49*/\n if ( (sub_FFD8CCA5((unsigned __int16 *)(a1 + 90)) & 0x40) == 0 ) /*0xffd82f56*/\n return 0; /*0xffd82f58*/\n *(_DWORD *)(a1 + 24) = *(_DWORD *)(a1 + 24) & 0xFF0000FF | ((a2 | (a2 << 8)) << 8); /*0xffd82f7c*/\n v11 = (unsigned int *)sub_FFD8CBBA(a2, 0, 0); /*0xffd82f8b*/\n sub_FFD8CCD3(v11, 0); /*0xffd82f8f*/\n v7 = *v11; /*0xffd82f94*/\n *(_DWORD *)a3 = *v11; /*0xffd82f9c*/\n if ( v7 != -1 ) /*0xffd82fa6*/\n {\n v8 = sub_FFD90A71(0, HIWORD(v7)); /*0xffd82fb0*/\n if ( v8 ) /*0xffd82fb9*/\n {\n v9 = (unsigned __int16 *)((char *)v11 + v8 + 12); /*0xffd82fc5*/\n v5 = *(_BYTE *)v9 & 0xF; /*0xffd82fc9*/\n *((_BYTE *)a3 + 5) = ((unsigned __int16)sub_FFD8CCA5(v9) >> 4) & 0x3F; /*0xffd82fd7*/\n }\n *((_BYTE *)a3 + 4) = v5; /*0xffd82fda*/\n }\n *(_DWORD *)(a1 + 24) &= 0xFF0000FF; /*0xffd82fe5*/\n DebugPrint(\n 64,\n (int)\"VID: %04X DID: %04X MLS: %d MLW: %d\\n\",\n *a3,\n a3[1],\n *((unsigned __int8 *)a3 + 4),\n *((unsigned __int8 *)a3 + 5));\n return v7 != -1; /*0xffd83012*/\n}","refs":[{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd90a71","name":"sub_FFD90A71"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd932f8","name":"aVid04xDid04xMl","string":"VID: %04X DID: %04X MLS: %d MLW: %d\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83019.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83019.c index bfe8d45..60756cb 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83019.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83019.c @@ -1,2 +1,2 @@ // 0xffd83019 -{"addr":"0xffd83019","code":"int sub_FFD83019()\n{\n int result; // eax\n int v1; // eax\n int v2; // esi\n int v3; // eax\n int *v4; // eax\n int *v5; // esi\n int v6; // ecx\n int v7; // eax\n int v8; // esi\n int v9; // eax\n _DWORD v10[2]; // [esp+0h] [ebp-10h] BYREF\n char v11[8]; // [esp+8h] [ebp-8h] BYREF\n\n result = sub_FFD8D59A(); /*0xffd8301c*/\n if ( (_BYTE)result )\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nDirtyWarmResetExecute() - Start\\n\"); /*0xffd83037*/\n v1 = sub_FFD85F37(); /*0xffd8303c*/\n v2 = sub_FFD8D921(v1); /*0xffd83048*/\n if ( sub_FFD82F2B(v2, 2u, (unsigned __int16 *)v11) )\n {\n *(_DWORD *)(v2 + 24) = *(_DWORD *)(v2 + 24) & 0xFF0000FF | 0x20200; /*0xffd83083*/\n v3 = sub_FFD8CBBA(2u, 0, 0); /*0xffd83086*/\n sub_FFD8CCD3(v3, 0); /*0xffd83090*/\n }\n else\n {\n sub_FFD7F9AF(0x80000000, (int)\"ERROR: DirtyWarmReset: can't get end point device available...\\n\");\n }\n v4 = (int *)sub_FFD8CC10(); /*0xffd83099*/\n v5 = v4; /*0xffd8309e*/\n v6 = *v4; /*0xffd830a8*/\n if ( (*v4 & 0x2000000) != 0 && v6 != -1 ) /*0xffd830b5*/\n *v4 = v6 | 0x4000000; /*0xffd830b9*/\n sub_FFD7F9AF(64, (int)\"DWR: Sending DirtyWarmReset Notification ...\\n\");\n sub_FFD7F948(&unk_FFD93FB4); /*0xffd830cc*/\n sub_FFD7F9AF(64, (int)\"DWR: DirtyWarmReset Notification completed\\n\");\n if ( (*v5 & 0x2000000) != 0 && *v5 != -1 )\n {\n sub_FFD7F9AF(64, (int)\"\\nDWR: Stalling in DWR flow to allow error collection.\\n\");\n while ( (*v5 & 0x4000000) != 0 ) /*0xffd83100*/\n ; /*0xffd830fc*/\n }\n v7 = sub_FFD8AD54(); /*0xffd83102*/\n v8 = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, _DWORD *))(*(_DWORD *)v7 + 32))(v7, &unk_FFD97FAC, 0, 0, v10); /*0xffd8311c*/\n if ( v8 < 0 )\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nDWR: ERROR: Can't get reset PPI\\n\");\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v8); /*0xffd83142*/\n v9 = sub_FFD7F97E(); /*0xffd8314a*/\n if ( v9 ) /*0xffd83151*/\n (*(void (__cdecl **)(const char *, int, const char *))(v9 + 4))( /*0xffd83162*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1104,\n \"!EFI_ERROR (Status)\");\n }\n else\n {\n (*(void (__cdecl **)(_DWORD, int))v10[0])(v10[0], 5); /*0xffd8312a*/\n }\n sub_FFD7F9AF(0x80000000, (int)\"\\nDWR: Waiting for reset.\\n\");\n v10[1] = 0; /*0xffd83175*/\n while ( 1 ) /*0xffd83179*/\n ; /*0xffd83179*/\n }\n return result; /*0xffd83182*/\n}","refs":[{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd85f37","name":"sub_FFD85F37"},{"addr":"0xffd8d921","name":"sub_FFD8D921"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd82f2b","name":"sub_FFD82F2B"},{"addr":"0xffd8cc10","name":"sub_FFD8CC10"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd93fb4","name":"unk_FFD93FB4"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97fac","name":"unk_FFD97FAC"},{"addr":"0xffd93418","name":"aDwrErrorCanTGe","string":"\nDWR: ERROR: Can't get reset PPI\n"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd9343c","name":"aDwrWaitingForR","string":"\nDWR: Waiting for reset.\n"}]} \ No newline at end of file +{"addr":"0xffd83019","code":"int DirtyWarmResetExecute()\n{\n int result; // eax\n int v1; // eax\n int v2; // esi\n int v3; // eax\n int *v4; // eax\n int *v5; // esi\n int v6; // ecx\n int v7; // eax\n int v8; // esi\n int v9; // eax\n _DWORD v10[2]; // [esp+0h] [ebp-10h] BYREF\n char v11[8]; // [esp+8h] [ebp-8h] BYREF\n\n result = sub_FFD8D59A(); /*0xffd8301c*/\n if ( (_BYTE)result )\n {\n DebugPrint(0x80000000, (int)\"\\nDirtyWarmResetExecute() - Start\\n\"); /*0xffd83037*/\n v1 = sub_FFD85F37(); /*0xffd8303c*/\n v2 = sub_FFD8D921(v1); /*0xffd83048*/\n if ( GetPciEndpointInfo(v2, 2u, (unsigned __int16 *)v11) )\n {\n *(_DWORD *)(v2 + 24) = *(_DWORD *)(v2 + 24) & 0xFF0000FF | 0x20200; /*0xffd83083*/\n v3 = sub_FFD8CBBA(2u, 0, 0); /*0xffd83086*/\n sub_FFD8CCD3(v3, 0); /*0xffd83090*/\n }\n else\n {\n DebugPrint(0x80000000, (int)\"ERROR: DirtyWarmReset: can't get end point device available...\\n\");\n }\n v4 = (int *)sub_FFD8CC10(); /*0xffd83099*/\n v5 = v4; /*0xffd8309e*/\n v6 = *v4; /*0xffd830a8*/\n if ( (*v4 & 0x2000000) != 0 && v6 != -1 ) /*0xffd830b5*/\n *v4 = v6 | 0x4000000; /*0xffd830b9*/\n DebugPrint(64, (int)\"DWR: Sending DirtyWarmReset Notification ...\\n\");\n InstallPpi(&unk_FFD93FB4); /*0xffd830cc*/\n DebugPrint(64, (int)\"DWR: DirtyWarmReset Notification completed\\n\");\n if ( (*v5 & 0x2000000) != 0 && *v5 != -1 )\n {\n DebugPrint(64, (int)\"\\nDWR: Stalling in DWR flow to allow error collection.\\n\");\n while ( (*v5 & 0x4000000) != 0 ) /*0xffd83100*/\n ; /*0xffd830fc*/\n }\n v7 = sub_FFD8AD54(); /*0xffd83102*/\n v8 = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, _DWORD *))(*(_DWORD *)v7 + 32))(v7, &unk_FFD97FAC, 0, 0, v10); /*0xffd8311c*/\n if ( v8 < 0 )\n {\n DebugPrint(0x80000000, (int)\"\\nDWR: ERROR: Can't get reset PPI\\n\");\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v8); /*0xffd83142*/\n v9 = GetReportStatusCodePpi(); /*0xffd8314a*/\n if ( v9 ) /*0xffd83151*/\n (*(void (__cdecl **)(const char *, int, const char *))(v9 + 4))( /*0xffd83162*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1104,\n \"!EFI_ERROR (Status)\");\n }\n else\n {\n (*(void (__cdecl **)(_DWORD, int))v10[0])(v10[0], 5); /*0xffd8312a*/\n }\n DebugPrint(0x80000000, (int)\"\\nDWR: Waiting for reset.\\n\");\n v10[1] = 0; /*0xffd83175*/\n while ( 1 ) /*0xffd83179*/\n ; /*0xffd83179*/\n }\n return result; /*0xffd83182*/\n}","refs":[{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd85f37","name":"sub_FFD85F37"},{"addr":"0xffd8d921","name":"sub_FFD8D921"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8ccd3","name":"sub_FFD8CCD3"},{"addr":"0xffd82f2b","name":"GetPciEndpointInfo"},{"addr":"0xffd8cc10","name":"sub_FFD8CC10"},{"addr":"0xffd7f948","name":"InstallPpi"},{"addr":"0xffd93fb4","name":"unk_FFD93FB4"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97fac","name":"unk_FFD97FAC"},{"addr":"0xffd93418","name":"aDwrErrorCanTGe","string":"\nDWR: ERROR: Can't get reset PPI\n"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd9343c","name":"aDwrWaitingForR","string":"\nDWR: Waiting for reset.\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83186.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83186.c index 07857c0..169dc3d 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83186.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83186.c @@ -1,2 +1,2 @@ // 0xffd83186 -{"addr":"0xffd83186","code":"int __thiscall sub_FFD83186(char *this)\n{\n int v2; // eax\n int v3; // eax\n int v4; // eax\n int v5; // eax\n int v6; // esi\n double v8; // [esp-4h] [ebp-20h]\n int v9; // [esp+14h] [ebp-8h] BYREF\n\n v2 = sub_FFD8D75C(&v9); /*0xffd8319f*/\n if ( v2 < 0 ) /*0xffd831b1*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd831be*/\n v3 = sub_FFD7F97E(); /*0xffd831c6*/\n if ( v3 ) /*0xffd831cd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd831d6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1132,\n \"!EFI_ERROR (Status)\");\n }\n v4 = sub_FFD9041E(&v9); /*0xffd831e8*/\n if ( v4 < 0 ) /*0xffd831f0*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v4); /*0xffd831fd*/\n v5 = sub_FFD7F97E(); /*0xffd83205*/\n if ( v5 ) /*0xffd8320c*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd83215*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1135,\n \"!EFI_ERROR (Status)\");\n }\n v6 = (unsigned __int16)v9 >> 14; /*0xffd83225*/\n LODWORD(v8) = off_FFD93F7C[v6]; // \"4x1\" /*0xffd83228*/\n sub_FFD7F9AF(64, (int)\"PCIe SP%c is %a\\n\", this + 65, v8); /*0xffd83237*/\n return v6; /*0xffd83241*/\n}","refs":[{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd9041e","name":"sub_FFD9041E"},{"addr":"0xffd93f7c","name":"off_FFD93F7C"},{"addr":"0xffd93458","name":"aPcieSpCIsA","string":"PCIe SP%c is %a\n"}]} \ No newline at end of file +{"addr":"0xffd83186","code":"int __thiscall sub_FFD83186(char *this)\n{\n int v2; // eax\n int v3; // eax\n int v4; // eax\n int v5; // eax\n int v6; // esi\n double v8; // [esp-4h] [ebp-20h]\n int v9; // [esp+14h] [ebp-8h] BYREF\n\n v2 = sub_FFD8D75C(&v9); /*0xffd8319f*/\n if ( v2 < 0 ) /*0xffd831b1*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd831be*/\n v3 = GetReportStatusCodePpi(); /*0xffd831c6*/\n if ( v3 ) /*0xffd831cd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd831d6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1132,\n \"!EFI_ERROR (Status)\");\n }\n v4 = sub_FFD9041E(&v9); /*0xffd831e8*/\n if ( v4 < 0 ) /*0xffd831f0*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v4); /*0xffd831fd*/\n v5 = GetReportStatusCodePpi(); /*0xffd83205*/\n if ( v5 ) /*0xffd8320c*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd83215*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1135,\n \"!EFI_ERROR (Status)\");\n }\n v6 = (unsigned __int16)v9 >> 14; /*0xffd83225*/\n LODWORD(v8) = off_FFD93F7C[v6]; // \"4x1\" /*0xffd83228*/\n DebugPrint(64, (int)\"PCIe SP%c is %a\\n\", this + 65, v8); /*0xffd83237*/\n return v6; /*0xffd83241*/\n}","refs":[{"addr":"0xffd8d75c","name":"sub_FFD8D75C"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd9041e","name":"sub_FFD9041E"},{"addr":"0xffd93f7c","name":"off_FFD93F7C"},{"addr":"0xffd93458","name":"aPcieSpCIsA","string":"PCIe SP%c is %a\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83249.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83249.c index 44a05cf..441c7d3 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83249.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd83249.c @@ -1,2 +1,2 @@ // 0xffd83249 -{"addr":"0xffd83249","code":"int sub_FFD83249()\n{\n int n2; // esi\n char *n3_1; // edi\n int v2; // ebx\n int v3; // eax\n int v4; // eax\n int v5; // eax\n int v6; // eax\n unsigned int i; // ebp\n int v8; // eax\n int v9; // ecx\n int v10; // esi\n int v12; // [esp+14h] [ebp-30h]\n int v13; // [esp+1Ch] [ebp-28h]\n int n2_2; // [esp+28h] [ebp-1Ch]\n int v15; // [esp+2Ch] [ebp-18h]\n unsigned int n3; // [esp+30h] [ebp-14h]\n int n2_1; // [esp+34h] [ebp-10h]\n int n4; // [esp+38h] [ebp-Ch]\n int n4_1; // [esp+3Ch] [ebp-8h]\n int n4_2; // [esp+40h] [ebp-4h]\n\n sub_FFD7F9AF(64, (int)\"PchConfigurePsfGrantCountsForPcie() Start\\n\"); /*0xffd83257*/\n n2 = sub_FFD8BE68(); /*0xffd83263*/\n n2_2 = n2; /*0xffd83265*/\n if ( n2 == 2 ) /*0xffd8326c*/\n n3 = 3; /*0xffd8326e*/\n else\n n3 = 5; /*0xffd83288*/\n n3_1 = 0; /*0xffd832a0*/\n v2 = 0; /*0xffd832a2*/\n v15 = 0; /*0xffd832a6*/\n do /*0xffd8341f*/\n {\n v3 = sub_FFD83186(n3_1); /*0xffd832ad*/\n if ( !v3 ) /*0xffd832b5*/\n {\n n2_1 = 1; /*0xffd83325*/\n n4 = 1; /*0xffd83329*/\n goto LABEL_16; /*0xffd83329*/\n }\n v4 = v3 - 1; /*0xffd832b7*/\n if ( !v4 ) /*0xffd832ba*/\n {\n n2_1 = 2; /*0xffd83313*/\n n4 = 4; /*0xffd8331b*/\nLABEL_16:\n n4_2 = 1; /*0xffd8332d*/\n n4_1 = 1; /*0xffd83331*/\n goto LABEL_17; /*0xffd83331*/\n }\n v5 = v4 - 1; /*0xffd832bc*/\n if ( v5 ) /*0xffd832bf*/\n {\n if ( v5 != 1 ) /*0xffd832c4*/\n {\n v6 = sub_FFD7F97E(); /*0xffd832c6*/\n if ( v6 ) /*0xffd832cd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v6 + 4))( /*0xffd832e2*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1230,\n \"((BOOLEAN)(0==1))\");\n goto LABEL_23; /*0xffd832e8*/\n }\n n2_1 = 4; /*0xffd832ed*/\n n4_1 = 4; /*0xffd832f1*/\n }\n else\n {\n n2_1 = 2; /*0xffd832f7*/\n n4_1 = 2; /*0xffd832ff*/\n }\n n4 = 4; /*0xffd83307*/\n n4_2 = 4; /*0xffd8330b*/\nLABEL_17:\n for ( i = 0; i < 4; ++i ) /*0xffd83335*/\n {\n if ( n2 == 2 ) /*0xffd8333a*/\n {\n v8 = (unsigned __int8)byte_FFD93FCC[v2]; /*0xffd83343*/\n v12 = (unsigned __int8)byte_FFD93FCD[v2]; /*0xffd8334a*/\n v9 = (unsigned __int8)byte_FFD93F44[4 * (_DWORD)n3_1 + i]; /*0xffd8334e*/\n }\n else\n {\n v8 = (unsigned __int8)byte_FFD93F8C[v2]; /*0xffd8335f*/\n v12 = (unsigned __int8)byte_FFD93F8D[v2]; /*0xffd83366*/\n v9 = (unsigned __int8)byte_FFD93F5C[4 * (_DWORD)n3_1 + i]; /*0xffd8336a*/\n }\n v10 = *(&n2_1 + i); /*0xffd83372*/\n v13 = v9; /*0xffd8337f*/\n sub_FFD7F9AF(64, (int)\"DGCR%d = %d\\n\", v8, v10); /*0xffd83387*/\n sub_FFD8C578(-32, v10); /*0xffd8339f*/\n sub_FFD7F9AF(64, (int)\"DGCR%d = %d\\n\", v12, v10); /*0xffd833b0*/\n sub_FFD8C578(-32, v10); /*0xffd833c8*/\n sub_FFD7F9AF(64, (int)\"PG1_TGT%d = %d\\n\", v13, v10); /*0xffd833d9*/\n sub_FFD8C578(-32, v10); /*0xffd833f4*/\n n2 = n2_2; /*0xffd833f9*/\n v2 += 2; /*0xffd833ff*/\n }\n v2 = v15; /*0xffd8340c*/\nLABEL_23:\n ++n3_1; /*0xffd83413*/\n v2 += 8; /*0xffd83414*/\n v15 = v2; /*0xffd83417*/\n }\n while ( (unsigned int)n3_1 < n3 ); /*0xffd8341f*/\n return sub_FFD7F9AF(64, (int)\"PchConfigurePsfGrantCountsForPcie() End\\n\"); /*0xffd83433*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9346c","name":"aPchconfigureps","string":"PchConfigurePsfGrantCountsForPcie() Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd83186","name":"sub_FFD83186"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd93fcc","name":"byte_FFD93FCC"},{"addr":"0xffd93fcd","name":"byte_FFD93FCD"},{"addr":"0xffd93f44","name":"byte_FFD93F44"},{"addr":"0xffd93f8c","name":"byte_FFD93F8C"},{"addr":"0xffd93f8d","name":"byte_FFD93F8D"},{"addr":"0xffd93f5c","name":"byte_FFD93F5C"},{"addr":"0xffd93498","name":"aDgcrDD","string":"DGCR%d = %d\n"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd934a8","name":"aPg1TgtDD","string":"PG1_TGT%d = %d\n"},{"addr":"0xffd934b8","name":"aPchconfigureps_0","string":"PchConfigurePsfGrantCountsForPcie() End\n"}]} \ No newline at end of file +{"addr":"0xffd83249","code":"int sub_FFD83249()\n{\n int n2; // esi\n char *n3_1; // edi\n int v2; // ebx\n int v3; // eax\n int v4; // eax\n int v5; // eax\n int v6; // eax\n unsigned int i; // ebp\n int v8; // eax\n int v9; // ecx\n int v10; // esi\n int v12; // [esp+14h] [ebp-30h]\n int v13; // [esp+1Ch] [ebp-28h]\n int n2_2; // [esp+28h] [ebp-1Ch]\n int v15; // [esp+2Ch] [ebp-18h]\n unsigned int n3; // [esp+30h] [ebp-14h]\n int n2_1; // [esp+34h] [ebp-10h]\n int n4; // [esp+38h] [ebp-Ch]\n int n4_1; // [esp+3Ch] [ebp-8h]\n int n4_2; // [esp+40h] [ebp-4h]\n\n DebugPrint(64, (int)\"PchConfigurePsfGrantCountsForPcie() Start\\n\"); /*0xffd83257*/\n n2 = sub_FFD8BE68(); /*0xffd83263*/\n n2_2 = n2; /*0xffd83265*/\n if ( n2 == 2 ) /*0xffd8326c*/\n n3 = 3; /*0xffd8326e*/\n else\n n3 = 5; /*0xffd83288*/\n n3_1 = 0; /*0xffd832a0*/\n v2 = 0; /*0xffd832a2*/\n v15 = 0; /*0xffd832a6*/\n do /*0xffd8341f*/\n {\n v3 = sub_FFD83186(n3_1); /*0xffd832ad*/\n if ( !v3 ) /*0xffd832b5*/\n {\n n2_1 = 1; /*0xffd83325*/\n n4 = 1; /*0xffd83329*/\n goto LABEL_16; /*0xffd83329*/\n }\n v4 = v3 - 1; /*0xffd832b7*/\n if ( !v4 ) /*0xffd832ba*/\n {\n n2_1 = 2; /*0xffd83313*/\n n4 = 4; /*0xffd8331b*/\nLABEL_16:\n n4_2 = 1; /*0xffd8332d*/\n n4_1 = 1; /*0xffd83331*/\n goto LABEL_17; /*0xffd83331*/\n }\n v5 = v4 - 1; /*0xffd832bc*/\n if ( v5 ) /*0xffd832bf*/\n {\n if ( v5 != 1 ) /*0xffd832c4*/\n {\n v6 = GetReportStatusCodePpi(); /*0xffd832c6*/\n if ( v6 ) /*0xffd832cd*/\n (*(void (__cdecl **)(const char *, int, const char *))(v6 + 4))( /*0xffd832e2*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 1230,\n \"((BOOLEAN)(0==1))\");\n goto LABEL_23; /*0xffd832e8*/\n }\n n2_1 = 4; /*0xffd832ed*/\n n4_1 = 4; /*0xffd832f1*/\n }\n else\n {\n n2_1 = 2; /*0xffd832f7*/\n n4_1 = 2; /*0xffd832ff*/\n }\n n4 = 4; /*0xffd83307*/\n n4_2 = 4; /*0xffd8330b*/\nLABEL_17:\n for ( i = 0; i < 4; ++i ) /*0xffd83335*/\n {\n if ( n2 == 2 ) /*0xffd8333a*/\n {\n v8 = (unsigned __int8)byte_FFD93FCC[v2]; /*0xffd83343*/\n v12 = (unsigned __int8)byte_FFD93FCD[v2]; /*0xffd8334a*/\n v9 = (unsigned __int8)byte_FFD93F44[4 * (_DWORD)n3_1 + i]; /*0xffd8334e*/\n }\n else\n {\n v8 = (unsigned __int8)byte_FFD93F8C[v2]; /*0xffd8335f*/\n v12 = (unsigned __int8)byte_FFD93F8D[v2]; /*0xffd83366*/\n v9 = (unsigned __int8)byte_FFD93F5C[4 * (_DWORD)n3_1 + i]; /*0xffd8336a*/\n }\n v10 = *(&n2_1 + i); /*0xffd83372*/\n v13 = v9; /*0xffd8337f*/\n DebugPrint(64, (int)\"DGCR%d = %d\\n\", v8, v10); /*0xffd83387*/\n sub_FFD8C578(-32, v10); /*0xffd8339f*/\n DebugPrint(64, (int)\"DGCR%d = %d\\n\", v12, v10); /*0xffd833b0*/\n sub_FFD8C578(-32, v10); /*0xffd833c8*/\n DebugPrint(64, (int)\"PG1_TGT%d = %d\\n\", v13, v10); /*0xffd833d9*/\n sub_FFD8C578(-32, v10); /*0xffd833f4*/\n n2 = n2_2; /*0xffd833f9*/\n v2 += 2; /*0xffd833ff*/\n }\n v2 = v15; /*0xffd8340c*/\nLABEL_23:\n ++n3_1; /*0xffd83413*/\n v2 += 8; /*0xffd83414*/\n v15 = v2; /*0xffd83417*/\n }\n while ( (unsigned int)n3_1 < n3 ); /*0xffd8341f*/\n return DebugPrint(64, (int)\"PchConfigurePsfGrantCountsForPcie() End\\n\"); /*0xffd83433*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9346c","name":"aPchconfigureps","string":"PchConfigurePsfGrantCountsForPcie() Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd83186","name":"sub_FFD83186"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd93fcc","name":"byte_FFD93FCC"},{"addr":"0xffd93fcd","name":"byte_FFD93FCD"},{"addr":"0xffd93f44","name":"byte_FFD93F44"},{"addr":"0xffd93f8c","name":"byte_FFD93F8C"},{"addr":"0xffd93f8d","name":"byte_FFD93F8D"},{"addr":"0xffd93f5c","name":"byte_FFD93F5C"},{"addr":"0xffd93498","name":"aDgcrDD","string":"DGCR%d = %d\n"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd934a8","name":"aPg1TgtDD","string":"PG1_TGT%d = %d\n"},{"addr":"0xffd934b8","name":"aPchconfigureps_0","string":"PchConfigurePsfGrantCountsForPcie() End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85246.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85246.c index 3123649..43fd830 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85246.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85246.c @@ -1,2 +1,2 @@ // 0xffd85246 -{"addr":"0xffd85246","code":"int __fastcall sub_FFD85246(int a1, int a2, int a3)\n{\n int n15000_6; // edi\n int v5; // ebx\n int n15000_5; // esi\n unsigned __int8 v7; // al\n int v8; // ebp\n _DWORD *n15000_8; // ebp\n int v10; // edi\n int v11; // esi\n unsigned __int8 v12; // al\n int v13; // edi\n unsigned int v14; // eax\n int v15; // ecx\n unsigned __int8 v16; // al\n int v17; // esi\n int v18; // eax\n bool v19; // zf\n unsigned __int16 *i; // ecx\n int v21; // ecx\n _WORD *n15000_7; // esi\n int v23; // edi\n int v24; // edx\n int v25; // ebx\n int v26; // esi\n int v27; // eax\n int j; // ebx\n int n15000_3; // edi\n int v30; // eax\n unsigned int j_1; // ecx\n int v32; // esi\n unsigned int v33; // edx\n int v34; // edx\n char *v35; // edi\n int v36; // ecx\n char v37; // al\n int v38; // ebx\n int v39; // edi\n int v40; // esi\n int n15000_4; // edx\n unsigned int v42; // ecx\n int v43; // eax\n int v44; // eax\n unsigned __int8 v46; // [esp+10h] [ebp-48h]\n unsigned __int8 v47; // [esp+11h] [ebp-47h]\n ... [11197 chars total]","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd93d94","name":"aPchinitrootpor","string":"PchInitRootPorts() Start\n"},{"addr":"0xffd93db0","name":"aDwrPchinitroot","string":"DWR: PchInitRootPorts() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd8d921","name":"sub_FFD8D921"},{"addr":"0xffd834e9","name":"sub_FFD834E9"},{"addr":"0xffd839ac","name":"sub_FFD839AC"}]}Output truncated. Run: curl -o .ida-mcp/0dd08b46-6856-4525-99b0-6ec7e22c3ec6.json http://127.0.0.1:13432/output/0dd08b46-6856-4525-99b0-6ec7e22c3ec6.json \ No newline at end of file +{"addr":"0xffd85246","code":"int __fastcall sub_FFD85246(int a1, int a2, int a3)\n{\n int n15000_6; // edi\n int v5; // ebx\n int n15000_5; // esi\n unsigned __int8 v7; // al\n int v8; // ebp\n _DWORD *n15000_8; // ebp\n int v10; // edi\n int v11; // esi\n unsigned __int8 v12; // al\n int v13; // edi\n unsigned int v14; // eax\n int v15; // ecx\n unsigned __int8 v16; // al\n int v17; // esi\n int v18; // eax\n bool v19; // zf\n unsigned __int16 *i; // ecx\n int v21; // ecx\n _WORD *n15000_7; // esi\n int v23; // edi\n int v24; // edx\n int v25; // ebx\n int v26; // esi\n int v27; // eax\n int j; // ebx\n int n15000_3; // edi\n int v30; // eax\n unsigned int j_1; // ecx\n int v32; // esi\n unsigned int v33; // edx\n int v34; // edx\n char *v35; // edi\n int v36; // ecx\n char v37; // al\n int v38; // ebx\n int v39; // edi\n int v40; // esi\n int n15000_4; // edx\n unsigned int v42; // ecx\n int v43; // eax\n int v44; // eax\n unsigned __int8 v46; // [esp+10h] [ebp-48h]\n unsigned __int8 v47; // [esp+11h] [ebp-47h]\n ... [11197 chars total]","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd93d94","name":"aPchinitrootpor","string":"PchInitRootPorts() Start\n"},{"addr":"0xffd93db0","name":"aDwrPchinitroot","string":"DWR: PchInitRootPorts() End\n"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8bffd","name":"sub_FFD8BFFD"},{"addr":"0xffd8d921","name":"sub_FFD8D921"},{"addr":"0xffd834e9","name":"sub_FFD834E9"},{"addr":"0xffd839ac","name":"sub_FFD839AC"}]}Output truncated. Run: curl -o .ida-mcp/0dd08b46-6856-4525-99b0-6ec7e22c3ec6.json http://127.0.0.1:13432/output/0dd08b46-6856-4525-99b0-6ec7e22c3ec6.json \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85f37.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85f37.c index 0f388c0..125f51e 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85f37.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd85f37.c @@ -1,2 +1,2 @@ // 0xffd85f37 -{"addr":"0xffd85f37","code":"int sub_FFD85F37()\n{\n int v0; // eax\n int v1; // eax\n int v2; // esi\n int v3; // eax\n _DWORD v5[2]; // [esp+8h] [ebp-8h] BYREF\n\n v0 = sub_FFD8AD54(); /*0xffd85f3e*/\n v1 = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, _DWORD *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD97EEC, 0, 0, v5); /*0xffd85f53*/\n v2 = v1; /*0xffd85f56*/\n if ( v1 < 0 )\n {\n sub_FFD7F9AF(0x80000000, (int)\"ERROR: DWR Can't find PCH Policy (Status: %r)\\n\", v1);\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd85f78*/\n v3 = sub_FFD7F97E(); /*0xffd85f80*/\n if ( v3 ) /*0xffd85f88*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd85f99*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 4100,\n \"!EFI_ERROR (Status)\");\n v5[1] = 0; /*0xffd85f9f*/\n while ( 1 ) /*0xffd85fa2*/\n ; /*0xffd85fa2*/\n }\n return (unsigned __int8)(*(_DWORD *)(v5[0] + 2975) >> 18); /*0xffd85faa*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97eec","name":"unk_FFD97EEC"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd93f14","name":"aErrorDwrCanTFi","string":"ERROR: DWR Can't find PCH Policy (Status: %r)\n"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file +{"addr":"0xffd85f37","code":"int sub_FFD85F37()\n{\n int v0; // eax\n int v1; // eax\n int v2; // esi\n int v3; // eax\n _DWORD v5[2]; // [esp+8h] [ebp-8h] BYREF\n\n v0 = sub_FFD8AD54(); /*0xffd85f3e*/\n v1 = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, _DWORD *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD97EEC, 0, 0, v5); /*0xffd85f53*/\n v2 = v1; /*0xffd85f56*/\n if ( v1 < 0 )\n {\n DebugPrint(0x80000000, (int)\"ERROR: DWR Can't find PCH Policy (Status: %r)\\n\", v1);\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd85f78*/\n v3 = GetReportStatusCodePpi(); /*0xffd85f80*/\n if ( v3 ) /*0xffd85f88*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd85f99*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchRootPorts.c\",\n 4100,\n \"!EFI_ERROR (Status)\");\n v5[1] = 0; /*0xffd85f9f*/\n while ( 1 ) /*0xffd85fa2*/\n ; /*0xffd85fa2*/\n }\n return (unsigned __int8)(*(_DWORD *)(v5[0] + 2975) >> 18); /*0xffd85faa*/\n}","refs":[{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97eec","name":"unk_FFD97EEC"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd93f14","name":"aErrorDwrCanTFi","string":"ERROR: DWR Can't find PCH Policy (Status: %r)\n"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd9318c","name":"aEHsPurleysktpk_5","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchRootPorts.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd860b8.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd860b8.c index 5392a70..d7b4203 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd860b8.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd860b8.c @@ -1,2 +1,2 @@ // 0xffd860b8 -{"addr":"0xffd860b8","code":"int __thiscall sub_FFD860B8(int this)\n{\n int v2; // esi\n int v3; // edi\n int v4; // eax\n _DWORD *v5; // eax\n int n8; // edx\n int v8; // [esp+14h] [ebp-8h] BYREF\n int n17; // [esp+18h] [ebp-4h] BYREF\n\n sub_FFD7F9AF(64, (int)\"ConfigureXhci() - Start\\n\"); /*0xffd860c8*/\n v2 = *(_DWORD *)(this + 3510); /*0xffd860cd*/\n sub_FFD8BE68(); /*0xffd860d9*/\n v3 = sub_FFD8CBBA(0, 20, 0); /*0xffd860f1*/\n sub_FFD8C76F(&v8); /*0xffd860f3*/\n *(_DWORD *)(v3 + 16) = v2; /*0xffd860fd*/\n sub_FFD8CC4F(v3 + 4, 6); /*0xffd86101*/\n if ( (*(_BYTE *)(this + 2263) & 2) != 0 ) /*0xffd86109*/\n *(_DWORD *)(v2 + 33004) |= 1u; /*0xffd86114*/\n v4 = sub_FFD8AD54(); /*0xffd8611a*/\n (*(void (__cdecl **)(int, int *))(*(_DWORD *)v4 + 40))(v4, &n17); /*0xffd86127*/\n if ( n17 == 17 ) /*0xffd86133*/\n sub_FFD86747(this + 2263); /*0xffd86137*/\n else\n sub_FFD85FBC(); /*0xffd8613e*/\n sub_FFD861FF(this, v2, v3); /*0xffd86148*/\n sub_FFD8701A(this, v2); /*0xffd86151*/\n sub_FFD7F9AF(64, (int)\"xHCI: XhciPostInitDone Start\\n\");\n *(_DWORD *)(v2 + 32992) &= ~0x10000u; /*0xffd86174*/\n *(_DWORD *)(v3 + 80) = 265186911; /*0xffd8617c*/\n sub_FFD7F9AF(64, (int)\"xHCI: XhciPostInitDone End\\n\");\n if ( (*(_BYTE *)(this + 2263) & 4) != 0 ) /*0xffd8618e*/\n {\n sub_FFD86E37(this + 2263, v3); /*0xffd86194*/\n }\n else\n {\n sub_FFD7F9AF(0x80000000, (int)\"Clear Over-Current registers\\n\"); /*0xffd861a5*/\n v5 = (_DWORD *)(v3 + 208); /*0xffd861ae*/\n n8 = 8; /*0xffd861b4*/\n do /*0xffd861c8*/\n {\n *(v5 - 8) = 0; /*0xffd861b5*/\n *v5++ = 0; /*0xffd861bc*/\n --n8; /*0xffd861c5*/\n }\n while ( n8 ); /*0xffd861c8*/\n }\n sub_FFD8687F(this + 2263, v2); /*0xffd861ce*/\n sub_FFD8CC6A(v3 + 4, 65529); /*0xffd861db*/\n *(_DWORD *)(v3 + 16) = 0; /*0xffd861e7*/\n sub_FFD7F9AF(64, (int)\"ConfigureXhciPreMem () - End\\n\"); /*0xffd861ee*/\n return 0; /*0xffd861f5*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd94008","name":"aConfigurexhciS","string":"ConfigureXhci() - Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd86747","name":"sub_FFD86747"},{"addr":"0xffd85fbc","name":"sub_FFD85FBC"},{"addr":"0xffd861ff","name":"sub_FFD861FF"},{"addr":"0xffd8701a","name":"sub_FFD8701A"},{"addr":"0xffd94420","name":"aXhciXhcipostin","string":"xHCI: XhciPostInitDone Start\n"},{"addr":"0xffd94440","name":"aXhciXhcipostin_0","string":"xHCI: XhciPostInitDone End\n"},{"addr":"0xffd86e37","name":"sub_FFD86E37"},{"addr":"0xffd94024","name":"aClearOverCurre","string":"Clear Over-Current registers\n"},{"addr":"0xffd8687f","name":"sub_FFD8687F"},{"addr":"0xffd8cc6a","name":"sub_FFD8CC6A"},{"addr":"0xffd94044","name":"aConfigurexhcip","string":"ConfigureXhciPreMem () - End\n"}]} \ No newline at end of file +{"addr":"0xffd860b8","code":"int __thiscall sub_FFD860B8(int this)\n{\n int v2; // esi\n int v3; // edi\n int v4; // eax\n _DWORD *v5; // eax\n int n8; // edx\n int v8; // [esp+14h] [ebp-8h] BYREF\n int n17; // [esp+18h] [ebp-4h] BYREF\n\n DebugPrint(64, (int)\"ConfigureXhci() - Start\\n\"); /*0xffd860c8*/\n v2 = *(_DWORD *)(this + 3510); /*0xffd860cd*/\n sub_FFD8BE68(); /*0xffd860d9*/\n v3 = sub_FFD8CBBA(0, 20, 0); /*0xffd860f1*/\n sub_FFD8C76F(&v8); /*0xffd860f3*/\n *(_DWORD *)(v3 + 16) = v2; /*0xffd860fd*/\n sub_FFD8CC4F(v3 + 4, 6); /*0xffd86101*/\n if ( (*(_BYTE *)(this + 2263) & 2) != 0 ) /*0xffd86109*/\n *(_DWORD *)(v2 + 33004) |= 1u; /*0xffd86114*/\n v4 = sub_FFD8AD54(); /*0xffd8611a*/\n (*(void (__cdecl **)(int, int *))(*(_DWORD *)v4 + 40))(v4, &n17); /*0xffd86127*/\n if ( n17 == 17 ) /*0xffd86133*/\n sub_FFD86747(this + 2263); /*0xffd86137*/\n else\n sub_FFD85FBC(); /*0xffd8613e*/\n sub_FFD861FF(this, v2, v3); /*0xffd86148*/\n sub_FFD8701A(this, v2); /*0xffd86151*/\n DebugPrint(64, (int)\"xHCI: XhciPostInitDone Start\\n\");\n *(_DWORD *)(v2 + 32992) &= ~0x10000u; /*0xffd86174*/\n *(_DWORD *)(v3 + 80) = 265186911; /*0xffd8617c*/\n DebugPrint(64, (int)\"xHCI: XhciPostInitDone End\\n\");\n if ( (*(_BYTE *)(this + 2263) & 4) != 0 ) /*0xffd8618e*/\n {\n sub_FFD86E37(this + 2263, v3); /*0xffd86194*/\n }\n else\n {\n DebugPrint(0x80000000, (int)\"Clear Over-Current registers\\n\"); /*0xffd861a5*/\n v5 = (_DWORD *)(v3 + 208); /*0xffd861ae*/\n n8 = 8; /*0xffd861b4*/\n do /*0xffd861c8*/\n {\n *(v5 - 8) = 0; /*0xffd861b5*/\n *v5++ = 0; /*0xffd861bc*/\n --n8; /*0xffd861c5*/\n }\n while ( n8 ); /*0xffd861c8*/\n }\n sub_FFD8687F(this + 2263, v2); /*0xffd861ce*/\n sub_FFD8CC6A(v3 + 4, 65529); /*0xffd861db*/\n *(_DWORD *)(v3 + 16) = 0; /*0xffd861e7*/\n DebugPrint(64, (int)\"ConfigureXhciPreMem () - End\\n\"); /*0xffd861ee*/\n return 0; /*0xffd861f5*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd94008","name":"aConfigurexhciS","string":"ConfigureXhci() - Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd86747","name":"sub_FFD86747"},{"addr":"0xffd85fbc","name":"sub_FFD85FBC"},{"addr":"0xffd861ff","name":"sub_FFD861FF"},{"addr":"0xffd8701a","name":"sub_FFD8701A"},{"addr":"0xffd94420","name":"aXhciXhcipostin","string":"xHCI: XhciPostInitDone Start\n"},{"addr":"0xffd94440","name":"aXhciXhcipostin_0","string":"xHCI: XhciPostInitDone End\n"},{"addr":"0xffd86e37","name":"sub_FFD86E37"},{"addr":"0xffd94024","name":"aClearOverCurre","string":"Clear Over-Current registers\n"},{"addr":"0xffd8687f","name":"sub_FFD8687F"},{"addr":"0xffd8cc6a","name":"sub_FFD8CC6A"},{"addr":"0xffd94044","name":"aConfigurexhcip","string":"ConfigureXhciPreMem () - End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8690c.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8690c.c index 855f4d6..2646e0a 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8690c.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8690c.c @@ -1,2 +1,2 @@ // 0xffd8690c -{"addr":"0xffd8690c","code":"int __fastcall sub_FFD8690C(int a1, int a2)\n{\n int v2; // ebp\n int n15_1; // ebx\n unsigned __int8 i_4; // cl\n unsigned __int8 i_1; // al\n unsigned __int64 v6; // rdi\n int v7; // ebx\n int v8; // ebp\n _DWORD *v9; // eax\n _DWORD *v10; // esi\n unsigned int v11; // ecx\n int result; // eax\n int v13; // [esp-8h] [ebp-34h]\n char v14; // [esp+11h] [ebp-1Bh] BYREF\n unsigned __int8 i; // [esp+12h] [ebp-1Ah]\n unsigned __int8 i_3; // [esp+13h] [ebp-19h]\n unsigned int n1342177280; // [esp+14h] [ebp-18h] BYREF\n int v18; // [esp+18h] [ebp-14h]\n int v19; // [esp+1Ch] [ebp-10h]\n int n15; // [esp+20h] [ebp-Ch] BYREF\n unsigned int i_2; // [esp+24h] [ebp-8h] BYREF\n unsigned int v22; // [esp+28h] [ebp-4h] BYREF\n\n v2 = a2; /*0xffd86913*/\n v19 = a1; /*0xffd86915*/\n v18 = a2; /*0xffd86920*/\n sub_FFD7F9AF(64, (int)\"xHCI: Usb2AfeProgramming Start\\n\");\n sub_FFD8BE68(); /*0xffd86929*/\n sub_FFD8BB3A(v13); /*0xffd8692e*/\n sub_FFD8C909(&v22); /*0xffd86937*/\n n15_1 = sub_FFD8CBBA(0, 31, 2); /*0xffd8694b*/\n n15 = n15_1; /*0xffd86951*/\n sub_FFD8ADCC(202, 6, 16427, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd86970*/\n n1342177280 |= 0x400000u; /*0xffd86975*/\n sub_FFD8ADCC(202, 7, 16427, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86999*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd869a9*/\n sub_FFD8ADCC(202, 6, 16385, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd869cc*/\n n1342177280 |= 0x3000000u; /*0xffd869d8*/\n sub_FFD8ADCC(202, 7, 16385, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd869f5*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86a05*/\n sub_FFD8ADCC(202, 6, 28672, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd86a2a*/\n n1342177280 = (unsigned __int16)n1342177280 | 0x50500000; /*0xffd86a41*/\n sub_FFD8ADCC(202, 7, 28672, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86a59*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86a69*/\n n1342177280 = 1342177280; /*0xffd86a71*/\n sub_FFD8ADCC(202, 7, 28724, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86a95*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86aa5*/\n n1342177280 = 175176950; /*0xffd86aad*/\n sub_FFD8ADCC(202, 7, 28728, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86ad3*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86ae3*/\n n1342177280 = 532398080; /*0xffd86aeb*/\n sub_FFD8ADCC(202, 7, 28732, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b0f*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b1f*/\n n1342177280 = 34432; /*0xffd86b27*/\n sub_FFD8ADCC(202, 7, 32516, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b4d*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b5d*/\n n1342177280 = 67251212; /*0xffd86b65*/\n sub_FFD8ADCC(202, 7, 28712, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b8b*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b9b*/\n n1342177280 = 184552192; /*0xffd86ba9*/\n sub_FFD8ADCC(202, 7, 32515, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86bc9*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86bd9*/\n i_4 = sub_FFD8C035(); /*0xffd86be6*/\n i_1 = 1; /*0xffd86be8*/\n i_3 = i_4; /*0xffd86bea*/\n for ( i = 1; i_1 <= i_3; i = i_1 ) /*0xffd86bf4*/\n {\n i_2 = i_1; /*0xffd86c07*/\n v6 = (unsigned __int64)(i_1 | 0x40u) << 8; /*0xffd86c25*/\n sub_FFD8ADCC(202, 6, v6, SHIDWORD(v6), 0, 0, &n1342177280, &v14, 6); /*0xffd86c2c*/\n v7 = 2 * i; /*0xffd86c3d*/\n n1342177280 = n1342177280 & 0xFFFF80FF /*0xffd86c87*/\n | ((*(_BYTE *)(v19 + 16 * i - 3) & 7\n | (8 * (*(_BYTE *)(v19 + 16 * i - 4) & 7 | (8 * (*(_BYTE *)(v19 + 16 * i - 1) & 1))))) << 8)\n | 0xFC000010;\n sub_FFD8ADCC(202, 7, v6, SHIDWORD(v6), 1u, 0, &n1342177280, &v14, 7); /*0xffd86c93*/\n sub_FFD8A1DE(n1342177280, v18, n15); /*0xffd86ca9*/\n v8 = (unsigned __int64)i_2 >> 24; /*0xffd86cb9*/\n LODWORD(v6) = i_2 << 8; /*0xffd86cbd*/\n HIDWORD(v6) = (i_2 << 8) | 0x4026; /*0xffd86cca*/\n n1342177280 = 0; /*0xffd86cd8*/\n sub_FFD8ADCC(202, 6, SHIDWORD(v6), v8, 0, 0, &n1342177280, &v14, 6); /*0xffd86ce2*/\n n1342177280 ^= (n1342177280 ^ (*(unsigned __int8 *)(v19 + 8 * v7 - 2) << 23)) & 0x1800000; /*0xffd86d0b*/\n sub_FFD8ADCC(202, 7, SHIDWORD(v6), v8, 1u, 0, &n1342177280, &v14, 7); /*0xffd86d22*/\n n15_1 = n15; /*0xffd86d27*/\n sub_FFD8A1DE(n1342177280, v18, n15); /*0xffd86d39*/\n LODWORD(v6) = v6 | 0x4008; /*0xffd86d47*/\n sub_FFD8ADCC(202, 6, v6, v8, 0, 0, &n1342177280, &v14, 6); /*0xffd86d61*/\n n1342177280 = n1342177280 & 0xFFFFC17F | 0x1A80; /*0xffd86d7c*/\n sub_FFD8ADCC(202, 7, v6, v8, 1u, 0, &n1342177280, &v14, 7); /*0xffd86d94*/\n v2 = v18; /*0xffd86d99*/\n sub_FFD8A1DE(n1342177280, v18, n15_1); /*0xffd86da8*/\n i_1 = i + 1; /*0xffd86db4*/\n }\n if ( sub_FFD8BE68() == 2 ) /*0xffd86dcc*/\n {\n i_3 = sub_FFD89FDC(&i_2); /*0xffd86ddd*/\n v9 = (_DWORD *)sub_FFD8A048(); /*0xffd86de1*/\n v10 = v9; /*0xffd86de6*/\n if ( v9 ) /*0xffd86dea*/\n {\n v11 = i_2 + *v9; /*0xffd86df2*/\n n15 = 15; /*0xffd86df8*/\n sub_FFD8D51B(v11, &n15, 4); /*0xffd86e00*/\n *v10 += 4; /*0xffd86e05*/\n if ( i_3 == 1 ) /*0xffd86e0e*/\n sub_FFD8A02F(n15_1); /*0xffd86e12*/\n }\n }\n sub_FFD8A2C4(v2, n15_1); /*0xffd86e1b*/\n result = *(_DWORD *)(v22 + 24) | 0x20000000; /*0xffd86e2a*/\n *(_DWORD *)(v22 + 24) = result; /*0xffd86e2f*/\n return result; /*0xffd86e24*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd94328","name":"aXhciUsb2afepro","string":"xHCI: Usb2AfeProgramming Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8adcc","name":"sub_FFD8ADCC"},{"addr":"0xffd8a1de","name":"sub_FFD8A1DE"},{"addr":"0xffd8c035","name":"sub_FFD8C035"},{"addr":"0xffd89fdc","name":"sub_FFD89FDC"},{"addr":"0xffd8a048","name":"sub_FFD8A048"},{"addr":"0xffd8d51b","name":"sub_FFD8D51B"},{"addr":"0xffd8a02f","name":"sub_FFD8A02F"},{"addr":"0xffd8a2c4","name":"sub_FFD8A2C4"}]} \ No newline at end of file +{"addr":"0xffd8690c","code":"int __fastcall sub_FFD8690C(int a1, int a2)\n{\n int v2; // ebp\n int n15_1; // ebx\n unsigned __int8 i_4; // cl\n unsigned __int8 i_1; // al\n unsigned __int64 v6; // rdi\n int v7; // ebx\n int v8; // ebp\n _DWORD *v9; // eax\n _DWORD *v10; // esi\n unsigned int v11; // ecx\n int result; // eax\n int v13; // [esp-8h] [ebp-34h]\n char v14; // [esp+11h] [ebp-1Bh] BYREF\n unsigned __int8 i; // [esp+12h] [ebp-1Ah]\n unsigned __int8 i_3; // [esp+13h] [ebp-19h]\n unsigned int n1342177280; // [esp+14h] [ebp-18h] BYREF\n int v18; // [esp+18h] [ebp-14h]\n int v19; // [esp+1Ch] [ebp-10h]\n int n15; // [esp+20h] [ebp-Ch] BYREF\n unsigned int i_2; // [esp+24h] [ebp-8h] BYREF\n unsigned int v22; // [esp+28h] [ebp-4h] BYREF\n\n v2 = a2; /*0xffd86913*/\n v19 = a1; /*0xffd86915*/\n v18 = a2; /*0xffd86920*/\n DebugPrint(64, (int)\"xHCI: Usb2AfeProgramming Start\\n\");\n sub_FFD8BE68(); /*0xffd86929*/\n sub_FFD8BB3A(v13); /*0xffd8692e*/\n sub_FFD8C909(&v22); /*0xffd86937*/\n n15_1 = sub_FFD8CBBA(0, 31, 2); /*0xffd8694b*/\n n15 = n15_1; /*0xffd86951*/\n sub_FFD8ADCC(202, 6, 16427, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd86970*/\n n1342177280 |= 0x400000u; /*0xffd86975*/\n sub_FFD8ADCC(202, 7, 16427, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86999*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd869a9*/\n sub_FFD8ADCC(202, 6, 16385, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd869cc*/\n n1342177280 |= 0x3000000u; /*0xffd869d8*/\n sub_FFD8ADCC(202, 7, 16385, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd869f5*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86a05*/\n sub_FFD8ADCC(202, 6, 28672, 0, 0, 0, &n1342177280, &v14, 6); /*0xffd86a2a*/\n n1342177280 = (unsigned __int16)n1342177280 | 0x50500000; /*0xffd86a41*/\n sub_FFD8ADCC(202, 7, 28672, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86a59*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86a69*/\n n1342177280 = 1342177280; /*0xffd86a71*/\n sub_FFD8ADCC(202, 7, 28724, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86a95*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86aa5*/\n n1342177280 = 175176950; /*0xffd86aad*/\n sub_FFD8ADCC(202, 7, 28728, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86ad3*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86ae3*/\n n1342177280 = 532398080; /*0xffd86aeb*/\n sub_FFD8ADCC(202, 7, 28732, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b0f*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b1f*/\n n1342177280 = 34432; /*0xffd86b27*/\n sub_FFD8ADCC(202, 7, 32516, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b4d*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b5d*/\n n1342177280 = 67251212; /*0xffd86b65*/\n sub_FFD8ADCC(202, 7, 28712, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86b8b*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86b9b*/\n n1342177280 = 184552192; /*0xffd86ba9*/\n sub_FFD8ADCC(202, 7, 32515, 0, 1u, 0, &n1342177280, &v14, 7); /*0xffd86bc9*/\n sub_FFD8A1DE(n1342177280, v2, n15_1); /*0xffd86bd9*/\n i_4 = sub_FFD8C035(); /*0xffd86be6*/\n i_1 = 1; /*0xffd86be8*/\n i_3 = i_4; /*0xffd86bea*/\n for ( i = 1; i_1 <= i_3; i = i_1 ) /*0xffd86bf4*/\n {\n i_2 = i_1; /*0xffd86c07*/\n v6 = (unsigned __int64)(i_1 | 0x40u) << 8; /*0xffd86c25*/\n sub_FFD8ADCC(202, 6, v6, SHIDWORD(v6), 0, 0, &n1342177280, &v14, 6); /*0xffd86c2c*/\n v7 = 2 * i; /*0xffd86c3d*/\n n1342177280 = n1342177280 & 0xFFFF80FF /*0xffd86c87*/\n | ((*(_BYTE *)(v19 + 16 * i - 3) & 7\n | (8 * (*(_BYTE *)(v19 + 16 * i - 4) & 7 | (8 * (*(_BYTE *)(v19 + 16 * i - 1) & 1))))) << 8)\n | 0xFC000010;\n sub_FFD8ADCC(202, 7, v6, SHIDWORD(v6), 1u, 0, &n1342177280, &v14, 7); /*0xffd86c93*/\n sub_FFD8A1DE(n1342177280, v18, n15); /*0xffd86ca9*/\n v8 = (unsigned __int64)i_2 >> 24; /*0xffd86cb9*/\n LODWORD(v6) = i_2 << 8; /*0xffd86cbd*/\n HIDWORD(v6) = (i_2 << 8) | 0x4026; /*0xffd86cca*/\n n1342177280 = 0; /*0xffd86cd8*/\n sub_FFD8ADCC(202, 6, SHIDWORD(v6), v8, 0, 0, &n1342177280, &v14, 6); /*0xffd86ce2*/\n n1342177280 ^= (n1342177280 ^ (*(unsigned __int8 *)(v19 + 8 * v7 - 2) << 23)) & 0x1800000; /*0xffd86d0b*/\n sub_FFD8ADCC(202, 7, SHIDWORD(v6), v8, 1u, 0, &n1342177280, &v14, 7); /*0xffd86d22*/\n n15_1 = n15; /*0xffd86d27*/\n sub_FFD8A1DE(n1342177280, v18, n15); /*0xffd86d39*/\n LODWORD(v6) = v6 | 0x4008; /*0xffd86d47*/\n sub_FFD8ADCC(202, 6, v6, v8, 0, 0, &n1342177280, &v14, 6); /*0xffd86d61*/\n n1342177280 = n1342177280 & 0xFFFFC17F | 0x1A80; /*0xffd86d7c*/\n sub_FFD8ADCC(202, 7, v6, v8, 1u, 0, &n1342177280, &v14, 7); /*0xffd86d94*/\n v2 = v18; /*0xffd86d99*/\n sub_FFD8A1DE(n1342177280, v18, n15_1); /*0xffd86da8*/\n i_1 = i + 1; /*0xffd86db4*/\n }\n if ( sub_FFD8BE68() == 2 ) /*0xffd86dcc*/\n {\n i_3 = sub_FFD89FDC(&i_2); /*0xffd86ddd*/\n v9 = (_DWORD *)sub_FFD8A048(); /*0xffd86de1*/\n v10 = v9; /*0xffd86de6*/\n if ( v9 ) /*0xffd86dea*/\n {\n v11 = i_2 + *v9; /*0xffd86df2*/\n n15 = 15; /*0xffd86df8*/\n sub_FFD8D51B(v11, &n15, 4); /*0xffd86e00*/\n *v10 += 4; /*0xffd86e05*/\n if ( i_3 == 1 ) /*0xffd86e0e*/\n sub_FFD8A02F(n15_1); /*0xffd86e12*/\n }\n }\n sub_FFD8A2C4(v2, n15_1); /*0xffd86e1b*/\n result = *(_DWORD *)(v22 + 24) | 0x20000000; /*0xffd86e2a*/\n *(_DWORD *)(v22 + 24) = result; /*0xffd86e2f*/\n return result; /*0xffd86e24*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd94328","name":"aXhciUsb2afepro","string":"xHCI: Usb2AfeProgramming Start\n"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8adcc","name":"sub_FFD8ADCC"},{"addr":"0xffd8a1de","name":"sub_FFD8A1DE"},{"addr":"0xffd8c035","name":"sub_FFD8C035"},{"addr":"0xffd89fdc","name":"sub_FFD89FDC"},{"addr":"0xffd8a048","name":"sub_FFD8A048"},{"addr":"0xffd8d51b","name":"sub_FFD8D51B"},{"addr":"0xffd8a02f","name":"sub_FFD8A02F"},{"addr":"0xffd8a2c4","name":"sub_FFD8A2C4"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd86e4d.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd86e4d.c index 6fc9a5e..4ef8e62 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd86e4d.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd86e4d.c @@ -1,2 +1,2 @@ // 0xffd86e4d -{"addr":"0xffd86e4d","code":"int __usercall sub_FFD86E37@(int a1@, int a2@, int a3, int a4, int a5, int a6, int a7, ...)\n{\n int v7; // ebx\n unsigned int n8_3; // esi\n unsigned int v9; // edi\n unsigned __int8 *v10; // ebx\n unsigned __int8 n8; // al\n int n8_4; // ebp\n int v13; // eax\n unsigned int n8_1; // ecx\n _DWORD *v15; // edx\n int v16; // eax\n unsigned int v17; // edi\n unsigned __int8 *v18; // ebp\n unsigned __int8 n8_2; // al\n int n8_5; // ebx\n int v21; // eax\n _DWORD *v22; // ecx\n int result; // eax\n unsigned int retaddr; // [esp+5Ch] [ebp+0h]\n int v27; // [esp+74h] [ebp+18h] BYREF\n va_list va; // [esp+74h] [ebp+18h]\n int v29; // [esp+78h] [ebp+1Ch]\n int v30; // [esp+7Ch] [ebp+20h]\n int v31; // [esp+80h] [ebp+24h]\n int v32; // [esp+84h] [ebp+28h]\n int v33; // [esp+88h] [ebp+2Ch]\n int v34; // [esp+8Ch] [ebp+30h]\n int v35; // [esp+90h] [ebp+34h]\n va_list va1; // [esp+94h] [ebp+38h] BYREF\n\n va_start(va1, a7);\n va_start(va, a7);\n v27 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v29 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v30 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v31 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v32 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v33 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v34 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v35 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v7 = a2; /*0xffd86e3e*/\n sub_FFD8D4C8(va1, retaddr); /*0xffd86e4f*/\n sub_FFD8D4C8((int *)va, retaddr); /*0xffd86e5b*/\n sub_FFD8BF54(); /*0xffd86e60*/\n n8_3 = 0; /*0xffd86e65*/\n v9 = 0; /*0xffd86e67*/\n if ( (unsigned __int8)sub_FFD8C051() ) /*0xffd86e69*/\n {\n v10 = (unsigned __int8 *)(v7 + 264); /*0xffd86e72*/\n do /*0xffd86ebd*/\n {\n n8 = *v10; /*0xffd86e78*/\n if ( *v10 != 8 ) /*0xffd86e7c*/\n {\n n8_4 = n8; /*0xffd86e7e*/\n if ( n8 >= 8u ) /*0xffd86e84*/\n {\n v13 = sub_FFD7F97E(); /*0xffd86e86*/\n if ( v13 ) /*0xffd86e8d*/\n (*(void (**)(void))(v13 + 4))(); /*0xffd86e9e*/\n }\n *((int *)va + n8_4) |= 1 << v9; /*0xffd86eab*/\n }\n ++v9; /*0xffd86eaf*/\n v10 += 16; /*0xffd86eb0*/\n }\n while ( v9 < (unsigned __int8)sub_FFD8C051() ); /*0xffd86ebd*/\n v7 = a2; /*0xffd86ebf*/\n }\n n8_1 = 0; /*0xffd86ec7*/\n v15 = (_DWORD *)(a1 + 208); /*0xffd86ec9*/\n do /*0xffd86edc*/\n {\n v16 = *((int *)va + n8_1++); /*0xffd86ecf*/\n *v15++ = v16; /*0xffd86ed4*/\n }\n while ( n8_1 < 8 ); /*0xffd86edc*/\n v17 = 0; /*0xffd86ede*/\n v18 = (unsigned __int8 *)(v7 + 8); /*0xffd86ee0*/\n while ( (unsigned int)(sub_FFD8BE68() - 1) <= 1 && v17 < retaddr ) /*0xffd86efb*/\n {\n n8_2 = *v18; /*0xffd86efd*/\n if ( *v18 != 8 ) /*0xffd86f02*/\n {\n n8_5 = n8_2; /*0xffd86f04*/\n if ( n8_2 >= 8u ) /*0xffd86f0a*/\n {\n v21 = sub_FFD7F97E(); /*0xffd86f0c*/\n if ( v21 ) /*0xffd86f13*/\n (*(void (**)(void))(v21 + 4))(); /*0xffd86f24*/\n }\n va1[n8_5] = (void *)((unsigned int)va1[n8_5] | (1 << v17)); /*0xffd86f31*/\n }\n ++v17; /*0xffd86f35*/\n v18 += 16; /*0xffd86f36*/\n }\n v22 = (_DWORD *)(a1 + 176); /*0xffd86f3f*/\n do /*0xffd86f52*/\n {\n result = (int)va1[n8_3++]; /*0xffd86f45*/\n *v22++ = result; /*0xffd86f4a*/\n }\n while ( n8_3 < 8 ); /*0xffd86f52*/\n return result; /*0xffd86f54*/\n}","refs":[{"addr":"0xffd8d4c8","name":"sub_FFD8D4C8"},{"addr":"0xffd8bf54","name":"sub_FFD8BF54"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd8c051","name":"sub_FFD8C051"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"}]} \ No newline at end of file +{"addr":"0xffd86e4d","code":"int __usercall sub_FFD86E37@(int a1@, int a2@, int a3, int a4, int a5, int a6, int a7, ...)\n{\n int v7; // ebx\n unsigned int n8_3; // esi\n unsigned int v9; // edi\n unsigned __int8 *v10; // ebx\n unsigned __int8 n8; // al\n int n8_4; // ebp\n int v13; // eax\n unsigned int n8_1; // ecx\n _DWORD *v15; // edx\n int v16; // eax\n unsigned int v17; // edi\n unsigned __int8 *v18; // ebp\n unsigned __int8 n8_2; // al\n int n8_5; // ebx\n int v21; // eax\n _DWORD *v22; // ecx\n int result; // eax\n unsigned int retaddr; // [esp+5Ch] [ebp+0h]\n int v27; // [esp+74h] [ebp+18h] BYREF\n va_list va; // [esp+74h] [ebp+18h]\n int v29; // [esp+78h] [ebp+1Ch]\n int v30; // [esp+7Ch] [ebp+20h]\n int v31; // [esp+80h] [ebp+24h]\n int v32; // [esp+84h] [ebp+28h]\n int v33; // [esp+88h] [ebp+2Ch]\n int v34; // [esp+8Ch] [ebp+30h]\n int v35; // [esp+90h] [ebp+34h]\n va_list va1; // [esp+94h] [ebp+38h] BYREF\n\n va_start(va1, a7);\n va_start(va, a7);\n v27 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v29 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v30 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v31 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v32 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v33 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v34 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v35 = va_arg(va1, _DWORD); /*0xffd86e37*/\n v7 = a2; /*0xffd86e3e*/\n sub_FFD8D4C8(va1, retaddr); /*0xffd86e4f*/\n sub_FFD8D4C8((int *)va, retaddr); /*0xffd86e5b*/\n sub_FFD8BF54(); /*0xffd86e60*/\n n8_3 = 0; /*0xffd86e65*/\n v9 = 0; /*0xffd86e67*/\n if ( (unsigned __int8)sub_FFD8C051() ) /*0xffd86e69*/\n {\n v10 = (unsigned __int8 *)(v7 + 264); /*0xffd86e72*/\n do /*0xffd86ebd*/\n {\n n8 = *v10; /*0xffd86e78*/\n if ( *v10 != 8 ) /*0xffd86e7c*/\n {\n n8_4 = n8; /*0xffd86e7e*/\n if ( n8 >= 8u ) /*0xffd86e84*/\n {\n v13 = GetReportStatusCodePpi(); /*0xffd86e86*/\n if ( v13 ) /*0xffd86e8d*/\n (*(void (**)(void))(v13 + 4))(); /*0xffd86e9e*/\n }\n *((int *)va + n8_4) |= 1 << v9; /*0xffd86eab*/\n }\n ++v9; /*0xffd86eaf*/\n v10 += 16; /*0xffd86eb0*/\n }\n while ( v9 < (unsigned __int8)sub_FFD8C051() ); /*0xffd86ebd*/\n v7 = a2; /*0xffd86ebf*/\n }\n n8_1 = 0; /*0xffd86ec7*/\n v15 = (_DWORD *)(a1 + 208); /*0xffd86ec9*/\n do /*0xffd86edc*/\n {\n v16 = *((int *)va + n8_1++); /*0xffd86ecf*/\n *v15++ = v16; /*0xffd86ed4*/\n }\n while ( n8_1 < 8 ); /*0xffd86edc*/\n v17 = 0; /*0xffd86ede*/\n v18 = (unsigned __int8 *)(v7 + 8); /*0xffd86ee0*/\n while ( (unsigned int)(sub_FFD8BE68() - 1) <= 1 && v17 < retaddr ) /*0xffd86efb*/\n {\n n8_2 = *v18; /*0xffd86efd*/\n if ( *v18 != 8 ) /*0xffd86f02*/\n {\n n8_5 = n8_2; /*0xffd86f04*/\n if ( n8_2 >= 8u ) /*0xffd86f0a*/\n {\n v21 = GetReportStatusCodePpi(); /*0xffd86f0c*/\n if ( v21 ) /*0xffd86f13*/\n (*(void (**)(void))(v21 + 4))(); /*0xffd86f24*/\n }\n va1[n8_5] = (void *)((unsigned int)va1[n8_5] | (1 << v17)); /*0xffd86f31*/\n }\n ++v17; /*0xffd86f35*/\n v18 += 16; /*0xffd86f36*/\n }\n v22 = (_DWORD *)(a1 + 176); /*0xffd86f3f*/\n do /*0xffd86f52*/\n {\n result = (int)va1[n8_3++]; /*0xffd86f45*/\n *v22++ = result; /*0xffd86f4a*/\n }\n while ( n8_3 < 8 ); /*0xffd86f52*/\n return result; /*0xffd86f54*/\n}","refs":[{"addr":"0xffd8d4c8","name":"sub_FFD8D4C8"},{"addr":"0xffd8bf54","name":"sub_FFD8BF54"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd8c051","name":"sub_FFD8C051"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd879ed.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd879ed.c index cba5c4e..cfdbe00 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd879ed.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd879ed.c @@ -1,2 +1,2 @@ // 0xffd879ed -{"addr":"0xffd879ed","code":"int __thiscall sub_FFD879ED(_DWORD *this)\n{\n unsigned __int8 i; // bl\n int v3; // ecx\n int v5; // [esp-4h] [ebp-20h]\n unsigned __int8 v6; // [esp+11h] [ebp-Bh]\n char v7; // [esp+12h] [ebp-Ah] BYREF\n char v8; // [esp+13h] [ebp-9h] BYREF\n _BYTE v9[2]; // [esp+14h] [ebp-8h] BYREF\n\n sub_FFD7F9AF(64, (int)\"XhciUsb3Tune() Start\\n\"); /*0xffd879fd*/\n for ( i = 0; i < (unsigned __int8)sub_FFD8C051(); ++i ) /*0xffd87a06*/\n {\n if ( (*(_BYTE *)(this + 4 * i + 67) & 0x81) != 0 ) /*0xffd87a22*/\n {\n sub_FFD8E3BE(); /*0xffd87a2c*/\n sub_FFD8E062(v6, &v8, &v7); /*0xffd87a41*/\n v3 = v5; /*0xffd87a4b*/\n if ( v7 == 1 ) /*0xffd87a4c*/\n {\n LOBYTE(v3) = v6; /*0xffd87a56*/\n sub_FFD8EBC8(v3, v9); /*0xffd87a58*/\n if ( (*(this + 4 * i + 67) & 1) != 0 ) /*0xffd87a6e*/\n sub_FFD8C578(-4128769, (*(this + 4 * i + 67) & 0x7E) << 15); /*0xffd87a85*/\n if ( (*(this + 4 * i + 67) & 0x80u) != 0 ) /*0xffd87a95*/\n sub_FFD8C578(-4128769, (*(this + 4 * i + 67) & 0x3F00) << 8); /*0xffd87aae*/\n sub_FFD8C578(-3, 0); /*0xffd87ac9*/\n sub_FFD8C578(-1, 2); /*0xffd87ad6*/\n }\n }\n }\n return sub_FFD7F9AF(64, (int)\"XhciUsb3Tune() End\\n\"); /*0xffd87afb*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9445c","name":"aXhciusb3tuneSt","string":"XhciUsb3Tune() Start\n"},{"addr":"0xffd8e3be","name":"sub_FFD8E3BE"},{"addr":"0xffd8e062","name":"sub_FFD8E062"},{"addr":"0xffd8ebc8","name":"sub_FFD8EBC8"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8c051","name":"sub_FFD8C051"},{"addr":"0xffd94474","name":"aXhciusb3tuneEn","string":"XhciUsb3Tune() End\n"}]} \ No newline at end of file +{"addr":"0xffd879ed","code":"int __thiscall sub_FFD879ED(_DWORD *this)\n{\n unsigned __int8 i; // bl\n int v3; // ecx\n int v5; // [esp-4h] [ebp-20h]\n unsigned __int8 v6; // [esp+11h] [ebp-Bh]\n char v7; // [esp+12h] [ebp-Ah] BYREF\n char v8; // [esp+13h] [ebp-9h] BYREF\n _BYTE v9[2]; // [esp+14h] [ebp-8h] BYREF\n\n DebugPrint(64, (int)\"XhciUsb3Tune() Start\\n\"); /*0xffd879fd*/\n for ( i = 0; i < (unsigned __int8)sub_FFD8C051(); ++i ) /*0xffd87a06*/\n {\n if ( (*(_BYTE *)(this + 4 * i + 67) & 0x81) != 0 ) /*0xffd87a22*/\n {\n sub_FFD8E3BE(); /*0xffd87a2c*/\n sub_FFD8E062(v6, &v8, &v7); /*0xffd87a41*/\n v3 = v5; /*0xffd87a4b*/\n if ( v7 == 1 ) /*0xffd87a4c*/\n {\n LOBYTE(v3) = v6; /*0xffd87a56*/\n sub_FFD8EBC8(v3, v9); /*0xffd87a58*/\n if ( (*(this + 4 * i + 67) & 1) != 0 ) /*0xffd87a6e*/\n sub_FFD8C578(-4128769, (*(this + 4 * i + 67) & 0x7E) << 15); /*0xffd87a85*/\n if ( (*(this + 4 * i + 67) & 0x80u) != 0 ) /*0xffd87a95*/\n sub_FFD8C578(-4128769, (*(this + 4 * i + 67) & 0x3F00) << 8); /*0xffd87aae*/\n sub_FFD8C578(-3, 0); /*0xffd87ac9*/\n sub_FFD8C578(-1, 2); /*0xffd87ad6*/\n }\n }\n }\n return DebugPrint(64, (int)\"XhciUsb3Tune() End\\n\"); /*0xffd87afb*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9445c","name":"aXhciusb3tuneSt","string":"XhciUsb3Tune() Start\n"},{"addr":"0xffd8e3be","name":"sub_FFD8E3BE"},{"addr":"0xffd8e062","name":"sub_FFD8E062"},{"addr":"0xffd8ebc8","name":"sub_FFD8EBC8"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8c051","name":"sub_FFD8C051"},{"addr":"0xffd94474","name":"aXhciusb3tuneEn","string":"XhciUsb3Tune() End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87b03.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87b03.c index c21e50b..9773899 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87b03.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87b03.c @@ -1,2 +1,2 @@ // 0xffd87b03 -{"addr":"0xffd87b03","code":"int __thiscall sub_FFD87B03(int this)\n{\n int v2; // edi\n int v3; // ebx\n int v5; // ebp\n unsigned int n0x3E8; // esi\n unsigned int i; // ebp\n int n2; // esi\n int n35; // edi\n unsigned int v10; // [esp+10h] [ebp-4h] BYREF\n\n v2 = *(_DWORD *)(this + 3510); /*0xffd87b11*/\n v3 = sub_FFD8CBBA(0, 20, 1); /*0xffd87b1d*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v3) == 0xFFFF )\n {\n sub_FFD7F9AF(64, (int)\"xDCI: Pci device NOT found\\n\");\n return -2147483634; /*0xffd87b3e*/\n }\n else\n {\n v5 = sub_FFD8CBBA(0, 20, 0); /*0xffd87b63*/\n sub_FFD8C578(-1, 63); /*0xffd87b65*/\n sub_FFD8C5B5(); /*0xffd87b6a*/\n if ( (*(_BYTE *)(this + 2683) & 1) != 0 )\n {\n *(_DWORD *)(v5 + 16) = v2; /*0xffd87cfb*/\n sub_FFD8CC4F(v5 + 4, 2); /*0xffd87cfe*/\n *(_DWORD *)(v2 + 32984) &= 0xFFCFFFFF; /*0xffd87d11*/\n sub_FFD8CC6A(v5 + 4, 65533); /*0xffd87d1e*/\n *(_DWORD *)(v5 + 16) = 0; /*0xffd87d2b*/\n sub_FFD8CC85(4); /*0xffd87d34*/\n }\n else\n {\n sub_FFD7F9AF(64, (int)\"xDCI: Device disabled\\n\");\n *(_DWORD *)(v5 + 16) = v2; /*0xffd87b91*/\n sub_FFD8CC4F(v5 + 4, 2); /*0xffd87b95*/\n *(_DWORD *)(v2 + 32984) |= 0x200000u; /*0xffd87ba5*/\n n0x3E8 = 0; /*0xffd87bb6*/\n *(_DWORD *)(v2 + 32984) &= ~0x100000u; /*0xffd87bb8*/\n while ( (*(_DWORD *)(v2 + 32988) & 0x20000000) == 0 && n0x3E8 < 0x3E8 ) /*0xffd87bc6*/\n {\n sub_FFD7FA46(0x64u); /*0xffd87bcb*/\n ++n0x3E8; /*0xffd87bd0*/\n }\n *(_DWORD *)(v2 + 32984) = *(_DWORD *)(v2 + 32984) & 0xFFFFFFFC | 1; /*0xffd87bf4*/\n sub_FFD8CC6A(v5 + 4, 65533); /*0xffd87bfa*/\n *(_DWORD *)(v5 + 16) = 0; /*0xffd87c01*/\n *(_DWORD *)(v3 + 16) = v2; /*0xffd87c0c*/\n sub_FFD8CC4F(v3 + 4, 2); /*0xffd87c0f*/\n *(_DWORD *)(v2 + 49424) |= 2u; /*0xffd87c23*/\n *(_DWORD *)(v2 + 49664) |= 0x40u; /*0xffd87c32*/\n *(_DWORD *)(v2 + 49856) |= 0x8000000u; /*0xffd87c46*/\n sub_FFD8CC4F(v2 + 1112088, 3); /*0xffd87c4c*/\n for ( i = 0; (sub_FFD8CCA5((unsigned __int16 *)(v2 + 1112080)) & 0xF00) == 0 && i < 0x3E8; ++i ) /*0xffd87c51*/\n sub_FFD7FA46(0x64u); /*0xffd87c60*/\n sub_FFD8CC6A(v3 + 4, 65533); /*0xffd87c80*/\n *(_DWORD *)(v3 + 16) = 0; /*0xffd87c85*/\n *(_DWORD *)(v3 + 132) |= 3u; /*0xffd87c95*/\n n2 = sub_FFD8BE68(); /*0xffd87ca0*/\n n35 = sub_FFD8BB3A(); /*0xffd87ca7*/\n sub_FFD8C578(-1, 256); /*0xffd87cc4*/\n sub_FFD8C909(&v10); /*0xffd87ccf*/\n if ( n2 == 2 && n35 >= 35 ) /*0xffd87cdc*/\n *(_DWORD *)(v10 + 1576) |= 0x1000000u; /*0xffd87ced*/\n }\n return 0; /*0xffd87d3a*/\n }\n}","refs":[{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd94488","name":"aXdciPciDeviceN","string":"xDCI: Pci device NOT found\n"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8c5b5","name":"sub_FFD8C5B5"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8cc6a","name":"sub_FFD8CC6A"},{"addr":"0xffd8cc85","name":"sub_FFD8CC85"},{"addr":"0xffd944a4","name":"aXdciDeviceDisa","string":"xDCI: Device disabled\n"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c909","name":"sub_FFD8C909"}]} \ No newline at end of file +{"addr":"0xffd87b03","code":"int __thiscall sub_FFD87B03(int this)\n{\n int v2; // edi\n int v3; // ebx\n int v5; // ebp\n unsigned int n0x3E8; // esi\n unsigned int i; // ebp\n int n2; // esi\n int n35; // edi\n unsigned int v10; // [esp+10h] [ebp-4h] BYREF\n\n v2 = *(_DWORD *)(this + 3510); /*0xffd87b11*/\n v3 = sub_FFD8CBBA(0, 20, 1); /*0xffd87b1d*/\n if ( (unsigned __int16)sub_FFD8CCA5((unsigned __int16 *)v3) == 0xFFFF )\n {\n DebugPrint(64, (int)\"xDCI: Pci device NOT found\\n\");\n return -2147483634; /*0xffd87b3e*/\n }\n else\n {\n v5 = sub_FFD8CBBA(0, 20, 0); /*0xffd87b63*/\n sub_FFD8C578(-1, 63); /*0xffd87b65*/\n sub_FFD8C5B5(); /*0xffd87b6a*/\n if ( (*(_BYTE *)(this + 2683) & 1) != 0 )\n {\n *(_DWORD *)(v5 + 16) = v2; /*0xffd87cfb*/\n sub_FFD8CC4F(v5 + 4, 2); /*0xffd87cfe*/\n *(_DWORD *)(v2 + 32984) &= 0xFFCFFFFF; /*0xffd87d11*/\n sub_FFD8CC6A(v5 + 4, 65533); /*0xffd87d1e*/\n *(_DWORD *)(v5 + 16) = 0; /*0xffd87d2b*/\n sub_FFD8CC85(4); /*0xffd87d34*/\n }\n else\n {\n DebugPrint(64, (int)\"xDCI: Device disabled\\n\");\n *(_DWORD *)(v5 + 16) = v2; /*0xffd87b91*/\n sub_FFD8CC4F(v5 + 4, 2); /*0xffd87b95*/\n *(_DWORD *)(v2 + 32984) |= 0x200000u; /*0xffd87ba5*/\n n0x3E8 = 0; /*0xffd87bb6*/\n *(_DWORD *)(v2 + 32984) &= ~0x100000u; /*0xffd87bb8*/\n while ( (*(_DWORD *)(v2 + 32988) & 0x20000000) == 0 && n0x3E8 < 0x3E8 ) /*0xffd87bc6*/\n {\n sub_FFD7FA46(0x64u); /*0xffd87bcb*/\n ++n0x3E8; /*0xffd87bd0*/\n }\n *(_DWORD *)(v2 + 32984) = *(_DWORD *)(v2 + 32984) & 0xFFFFFFFC | 1; /*0xffd87bf4*/\n sub_FFD8CC6A(v5 + 4, 65533); /*0xffd87bfa*/\n *(_DWORD *)(v5 + 16) = 0; /*0xffd87c01*/\n *(_DWORD *)(v3 + 16) = v2; /*0xffd87c0c*/\n sub_FFD8CC4F(v3 + 4, 2); /*0xffd87c0f*/\n *(_DWORD *)(v2 + 49424) |= 2u; /*0xffd87c23*/\n *(_DWORD *)(v2 + 49664) |= 0x40u; /*0xffd87c32*/\n *(_DWORD *)(v2 + 49856) |= 0x8000000u; /*0xffd87c46*/\n sub_FFD8CC4F(v2 + 1112088, 3); /*0xffd87c4c*/\n for ( i = 0; (sub_FFD8CCA5((unsigned __int16 *)(v2 + 1112080)) & 0xF00) == 0 && i < 0x3E8; ++i ) /*0xffd87c51*/\n sub_FFD7FA46(0x64u); /*0xffd87c60*/\n sub_FFD8CC6A(v3 + 4, 65533); /*0xffd87c80*/\n *(_DWORD *)(v3 + 16) = 0; /*0xffd87c85*/\n *(_DWORD *)(v3 + 132) |= 3u; /*0xffd87c95*/\n n2 = sub_FFD8BE68(); /*0xffd87ca0*/\n n35 = sub_FFD8BB3A(); /*0xffd87ca7*/\n sub_FFD8C578(-1, 256); /*0xffd87cc4*/\n sub_FFD8C909(&v10); /*0xffd87ccf*/\n if ( n2 == 2 && n35 >= 35 ) /*0xffd87cdc*/\n *(_DWORD *)(v10 + 1576) |= 0x1000000u; /*0xffd87ced*/\n }\n return 0; /*0xffd87d3a*/\n }\n}","refs":[{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd94488","name":"aXdciPciDeviceN","string":"xDCI: Pci device NOT found\n"},{"addr":"0xffd8c578","name":"sub_FFD8C578"},{"addr":"0xffd8c5b5","name":"sub_FFD8C5B5"},{"addr":"0xffd8cc4f","name":"sub_FFD8CC4F"},{"addr":"0xffd8cc6a","name":"sub_FFD8CC6A"},{"addr":"0xffd8cc85","name":"sub_FFD8CC85"},{"addr":"0xffd944a4","name":"aXdciDeviceDisa","string":"xDCI: Device disabled\n"},{"addr":"0xffd7fa46","name":"sub_FFD7FA46"},{"addr":"0xffd8cca5","name":"sub_FFD8CCA5"},{"addr":"0xffd8be68","name":"sub_FFD8BE68"},{"addr":"0xffd8bb3a","name":"sub_FFD8BB3A"},{"addr":"0xffd8c909","name":"sub_FFD8C909"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87d42.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87d42.c index 11d4972..b45935f 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87d42.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87d42.c @@ -1,2 +1,2 @@ // 0xffd87d42 -{"addr":"0xffd87d42","code":"int sub_FFD87D42()\n{\n int v0; // eax\n int v1; // eax\n _DWORD *v2; // edi\n int v4; // eax\n int v5; // esi\n int v6; // eax\n\n sub_FFD7F9AF(64, (int)\"InstallPchSpi() Start\\n\"); /*0xffd87d4c*/\n v0 = sub_FFD8CBBA(0, 31, 5); /*0xffd87d58*/\n *(_DWORD *)(v0 + 16) = -33488896; /*0xffd87d60*/\n *(_DWORD *)(v0 + 4) |= 2u; /*0xffd87d6d*/\n v1 = sub_FFD8ADB0(104); /*0xffd87d73*/\n v2 = (_DWORD *)v1; /*0xffd87d78*/\n if ( !v1 ) /*0xffd87d7c*/\n return -2147483639; /*0xffd87d7e*/\n sub_FFD8F09A((_DWORD *)(v1 + 12)); /*0xffd87d88*/\n *v2 = -2147483632; /*0xffd87d90*/\n v2[1] = &unk_FFD97EBC; /*0xffd87d98*/\n v2[2] = v2 + 5; /*0xffd87d9f*/\n v4 = sub_FFD7F948(v2); /*0xffd87da2*/\n v5 = v4; /*0xffd87da7*/\n if ( v4 < 0 ) /*0xffd87dab*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v4); /*0xffd87db8*/\n v6 = sub_FFD7F97E(); /*0xffd87dc0*/\n if ( v6 ) /*0xffd87dc7*/\n (*(void (__cdecl **)(const char *, int, const char *))(v6 + 4))( /*0xffd87dd8*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchSpi.c\",\n 130,\n \"!EFI_ERROR (Status)\");\n }\n sub_FFD7F9AF(64, (int)\"SPI PPI Installed\\n\"); /*0xffd87de5*/\n sub_FFD7F9AF(64, (int)\"InstallPchSpi() End\\n\"); /*0xffd87df1*/\n return v5; /*0xffd87dfb*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd944bc","name":"aInstallpchspiS","string":"InstallPchSpi() Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8adb0","name":"sub_FFD8ADB0"},{"addr":"0xffd8f09a","name":"sub_FFD8F09A"},{"addr":"0xffd97ebc","name":"unk_FFD97EBC"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd944d4","name":"aEHsPurleysktpk_7","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchSpi.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd94520","name":"aSpiPpiInstalle","string":"SPI PPI Installed\n"},{"addr":"0xffd94534","name":"aInstallpchspiE","string":"InstallPchSpi() End\n"}]} \ No newline at end of file +{"addr":"0xffd87d42","code":"int InstallPchSpiPpi()\n{\n int v0; // eax\n int v1; // eax\n _DWORD *v2; // edi\n int v4; // eax\n int v5; // esi\n int v6; // eax\n\n DebugPrint(64, (int)\"InstallPchSpi() Start\\n\"); /*0xffd87d4c*/\n v0 = sub_FFD8CBBA(0, 31, 5); /*0xffd87d58*/\n *(_DWORD *)(v0 + 16) = -33488896; /*0xffd87d60*/\n *(_DWORD *)(v0 + 4) |= 2u; /*0xffd87d6d*/\n v1 = sub_FFD8ADB0(104); /*0xffd87d73*/\n v2 = (_DWORD *)v1; /*0xffd87d78*/\n if ( !v1 ) /*0xffd87d7c*/\n return -2147483639; /*0xffd87d7e*/\n sub_FFD8F09A((_DWORD *)(v1 + 12)); /*0xffd87d88*/\n *v2 = -2147483632; /*0xffd87d90*/\n v2[1] = &unk_FFD97EBC; /*0xffd87d98*/\n v2[2] = v2 + 5; /*0xffd87d9f*/\n v4 = InstallPpi(v2); /*0xffd87da2*/\n v5 = v4; /*0xffd87da7*/\n if ( v4 < 0 ) /*0xffd87dab*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v4); /*0xffd87db8*/\n v6 = GetReportStatusCodePpi(); /*0xffd87dc0*/\n if ( v6 ) /*0xffd87dc7*/\n (*(void (__cdecl **)(const char *, int, const char *))(v6 + 4))( /*0xffd87dd8*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchSpi.c\",\n 130,\n \"!EFI_ERROR (Status)\");\n }\n DebugPrint(64, (int)\"SPI PPI Installed\\n\"); /*0xffd87de5*/\n DebugPrint(64, (int)\"InstallPchSpi() End\\n\"); /*0xffd87df1*/\n return v5; /*0xffd87dfb*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd944bc","name":"aInstallpchspiS","string":"InstallPchSpi() Start\n"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8adb0","name":"sub_FFD8ADB0"},{"addr":"0xffd8f09a","name":"sub_FFD8F09A"},{"addr":"0xffd97ebc","name":"unk_FFD97EBC"},{"addr":"0xffd7f948","name":"InstallPpi"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd944d4","name":"aEHsPurleysktpk_7","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchSpi.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd94520","name":"aSpiPpiInstalle","string":"SPI PPI Installed\n"},{"addr":"0xffd94534","name":"aInstallpchspiE","string":"InstallPchSpi() End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87dff.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87dff.c index 33614b6..2e615a6 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87dff.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87dff.c @@ -1,2 +1,2 @@ // 0xffd87dff -{"addr":"0xffd87dff","code":"int __thiscall sub_FFD87DFF(_BYTE *this)\n{\n int result; // eax\n int v3; // esi\n int n128; // ecx\n _DWORD v5[4]; // [esp+8h] [ebp-10h] BYREF\n\n result = sub_FFD7F9AF(64, (int)\"ConfigureLpcOnPolicy()\\n\"); /*0xffd87e0f*/\n if ( (*(this + 3514) & 1) == 0 ) /*0xffd87e1d*/\n {\n sub_FFD7F9AF(64, (int)\"Disable EnhancePort8xhDecoding\\n\"); /*0xffd87e26*/\n sub_FFD8D48A(v5, 16); /*0xffd87e33*/\n result = sub_FFD8CA98(v5); /*0xffd87e3b*/\n v3 = 0; /*0xffd87e40*/\n while ( 1 ) /*0xffd87e42*/\n {\n n128 = v5[v3]; /*0xffd87e42*/\n if ( (_WORD)n128 == 128 && (n128 & 0x7FFF0000) == 0x100000 ) /*0xffd87e59*/\n break; /*0xffd87e59*/\n if ( (unsigned int)++v3 >= 4 ) /*0xffd87e5f*/\n return result; /*0xffd87e5f*/\n }\n *(_DWORD *)(sub_FFD8CBBA(0, 31, 0) + 4 * v3 + 132) = 0; /*0xffd87e83*/\n return sub_FFD8C497(4, 0); /*0xffd87e8d*/\n }\n return result; /*0xffd87e94*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9454c","name":"aConfigurelpcon","string":"ConfigureLpcOnPolicy()\n"},{"addr":"0xffd94564","name":"aDisableEnhance","string":"Disable EnhancePort8xhDecoding\n"},{"addr":"0xffd8d48a","name":"sub_FFD8D48A"},{"addr":"0xffd8ca98","name":"sub_FFD8CA98"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c497","name":"sub_FFD8C497"}]} \ No newline at end of file +{"addr":"0xffd87dff","code":"int __thiscall ConfigureLpcOnPolicy(_BYTE *this)\n{\n int result; // eax\n int v3; // esi\n int n128; // ecx\n _DWORD v5[4]; // [esp+8h] [ebp-10h] BYREF\n\n result = DebugPrint(64, (int)\"ConfigureLpcOnPolicy()\\n\"); /*0xffd87e0f*/\n if ( (*(this + 3514) & 1) == 0 ) /*0xffd87e1d*/\n {\n DebugPrint(64, (int)\"Disable EnhancePort8xhDecoding\\n\"); /*0xffd87e26*/\n sub_FFD8D48A(v5, 16); /*0xffd87e33*/\n result = sub_FFD8CA98(v5); /*0xffd87e3b*/\n v3 = 0; /*0xffd87e40*/\n while ( 1 ) /*0xffd87e42*/\n {\n n128 = v5[v3]; /*0xffd87e42*/\n if ( (_WORD)n128 == 128 && (n128 & 0x7FFF0000) == 0x100000 ) /*0xffd87e59*/\n break; /*0xffd87e59*/\n if ( (unsigned int)++v3 >= 4 ) /*0xffd87e5f*/\n return result; /*0xffd87e5f*/\n }\n *(_DWORD *)(sub_FFD8CBBA(0, 31, 0) + 4 * v3 + 132) = 0; /*0xffd87e83*/\n return sub_FFD8C497(4, 0); /*0xffd87e8d*/\n }\n return result; /*0xffd87e94*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9454c","name":"aConfigurelpcon","string":"ConfigureLpcOnPolicy()\n"},{"addr":"0xffd94564","name":"aDisableEnhance","string":"Disable EnhancePort8xhDecoding\n"},{"addr":"0xffd8d48a","name":"sub_FFD8D48A"},{"addr":"0xffd8ca98","name":"sub_FFD8CA98"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd8c497","name":"sub_FFD8C497"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87e99.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87e99.c index b8a7721..330c2d8 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87e99.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87e99.c @@ -1,2 +1,2 @@ // 0xffd87e99 -{"addr":"0xffd87e99","code":"bool sub_FFD87E99()\n{\n int v0; // esi\n int n5120; // eax\n bool result; // al\n unsigned __int16 v3; // [esp+4h] [ebp-4h] BYREF\n\n sub_FFD8C76F(&v3); /*0xffd87ea1*/\n v0 = v3; /*0xffd87ea6*/\n result = 0; /*0xffd87ee2*/\n if ( (sub_FFD8CD06(v3) & 0x8000u) != 0 ) /*0xffd87eb9*/\n {\n n5120 = sub_FFD8CD06(v0 + 4) & 0x1C00; /*0xffd87ed0*/\n if ( (_WORD)n5120 == 5120 || (_WORD)n5120 == 6144 ) /*0xffd87ee0*/\n return 1; /*0xffd87eb9*/\n }\n return result; /*0xffd87ee8*/\n}","refs":[{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8cd06","name":"sub_FFD8CD06"}]} \ No newline at end of file +{"addr":"0xffd87e99","code":"bool PchWdtIsUnexpectedReset()\n{\n int v0; // esi\n int n5120; // eax\n bool result; // al\n unsigned __int16 v3; // [esp+4h] [ebp-4h] BYREF\n\n sub_FFD8C76F(&v3); /*0xffd87ea1*/\n v0 = v3; /*0xffd87ea6*/\n result = 0; /*0xffd87ee2*/\n if ( (sub_FFD8CD06(v3) & 0x8000u) != 0 ) /*0xffd87eb9*/\n {\n n5120 = sub_FFD8CD06(v0 + 4) & 0x1C00; /*0xffd87ed0*/\n if ( (_WORD)n5120 == 5120 || (_WORD)n5120 == 6144 ) /*0xffd87ee0*/\n return 1; /*0xffd87eb9*/\n }\n return result; /*0xffd87ee8*/\n}","refs":[{"addr":"0xffd8c76f","name":"sub_FFD8C76F"},{"addr":"0xffd8cd06","name":"sub_FFD8CD06"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87eed.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87eed.c index 065ddc6..fd47ec2 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87eed.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd87eed.c @@ -1,2 +1,2 @@ // 0xffd87eed -{"addr":"0xffd87eed","code":"int sub_FFD87EED()\n{\n int v0; // eax\n int v1; // ebx\n __int16 v2; // bp\n int v3; // eax\n int result; // eax\n char v5; // cl\n _DWORD *v6; // edi\n unsigned int v7; // ebx\n unsigned int v8; // ebx\n int v9; // eax\n int v10; // eax\n int v11; // esi\n int v12; // eax\n int v13; // [esp+14h] [ebp-8h] BYREF\n int v14; // [esp+18h] [ebp-4h]\n\n v0 = sub_FFD8EEB6(); /*0xffd87ef4*/\n v1 = sub_FFD8CD6B(v0); /*0xffd87f00*/\n sub_FFD7F9AF(64, (int)\"(WDT) Readback = 0x%08x\\n\", v1); /*0xffd87f0a*/\n if ( (v1 & 0x4000) != 0 ) /*0xffd87f18*/\n {\n LOBYTE(v14) = 1; /*0xffd87f1c*/\n v2 = (v1 & 0x3FF) + 1; /*0xffd87f27*/\n }\n else\n {\n v14 = 0; /*0xffd87f2e*/\n v2 = 0; /*0xffd87f32*/\n }\n v3 = sub_FFD8AD54(); /*0xffd87f34*/\n result = (*(int (__cdecl **)(int, int, int, int *))(*(_DWORD *)v3 + 52))(v3, 4, 28, &v13); /*0xffd87f45*/\n if ( result >= 0 ) /*0xffd87f4d*/\n {\n v5 = v14; /*0xffd87f5c*/\n v6 = (_DWORD *)(v13 + 8); /*0xffd87f60*/\n *(_DWORD *)(v13 + 8) = unk_FFD97F0C; /*0xffd87f63*/\n *++v6 = unk_FFD97F10; /*0xffd87f64*/\n *++v6 = unk_FFD97F14; /*0xffd87f65*/\n v6[1] = unk_FFD97F18; /*0xffd87f66*/\n *(_BYTE *)(v13 + 26) = v5; /*0xffd87f75*/\n *(_WORD *)(v13 + 24) = v2; /*0xffd87f7c*/\n if ( (v1 & 0x3000000) != 0 ) /*0xffd87f82*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"(WDT) Expiration detected.\\n\", v1); /*0xffd87f8b*/\n v7 = v1 & 0xFC3FFFFF | 0x3800000; /*0xffd87f99*/\n }\n else\n {\n if ( (v1 & 0x400000) == 0 || sub_FFD87E99() ) /*0xffd87fa9*/\n {\n sub_FFD7F9AF(64, (int)\"(WDT) Status OK.\\n\", v1); /*0xffd87fcf*/\n v8 = v1 & 0xFF7FFFFF; /*0xffd87fd7*/\n }\n else\n {\n sub_FFD7F9AF(0x80000000, (int)\"(WDT) Unexpected reset detected and ignored.\\n\"); /*0xffd87fb8*/\n v8 = v1 & 0xFF3FFFFF; /*0xffd87fbf*/\n }\n v7 = v8 | 0x3000000; /*0xffd87fdd*/\n }\n v9 = sub_FFD8EEB6(); /*0xffd87fdf*/\n sub_FFD8CD97(v9, v7); /*0xffd87fe8*/\n sub_FFD7F948(&unk_FFD9816C); /*0xffd87ff2*/\n v10 = sub_FFD7F948(&unk_FFD98144); /*0xffd87ffc*/\n v11 = v10; /*0xffd88001*/\n if ( v10 < 0 ) /*0xffd88005*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v10); /*0xffd8800e*/\n v12 = sub_FFD7F97E(); /*0xffd88016*/\n if ( v12 ) /*0xffd8801d*/\n (*(void (__cdecl **)(const char *, int, const char *))(v12 + 4))( /*0xffd8802e*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\Wdt.c\",\n 216,\n \"!EFI_ERROR (Status)\");\n }\n return v11; /*0xffd88034*/\n }\n return result; /*0xffd88036*/\n}","refs":[{"addr":"0xffd8eeb6","name":"sub_FFD8EEB6"},{"addr":"0xffd8cd6b","name":"sub_FFD8CD6B"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd945a8","name":"aWdtReadback0x0","string":"(WDT) Readback = 0x%08x\n"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97f0c","name":"unk_FFD97F0C"},{"addr":"0xffd97f10","name":"unk_FFD97F10"},{"addr":"0xffd97f14","name":"unk_FFD97F14"},{"addr":"0xffd97f18","name":"unk_FFD97F18"},{"addr":"0xffd945c4","name":"aWdtExpirationD","string":"(WDT) Expiration detected.\n"},{"addr":"0xffd94610","name":"aWdtStatusOk","string":"(WDT) Status OK.\n"},{"addr":"0xffd945e0","name":"aWdtUnexpectedR","string":"(WDT) Unexpected reset detected and ignored.\n"},{"addr":"0xffd87e99","name":"sub_FFD87E99"},{"addr":"0xffd8cd97","name":"sub_FFD8CD97"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd9816c","name":"unk_FFD9816C"},{"addr":"0xffd98144","name":"unk_FFD98144"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd94624","name":"aEHsPurleysktpk_8","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\Wdt.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file +{"addr":"0xffd87eed","code":"int PchWdtInit()\n{\n int v0; // eax\n int v1; // ebx\n __int16 v2; // bp\n int v3; // eax\n int result; // eax\n char v5; // cl\n _DWORD *v6; // edi\n unsigned int v7; // ebx\n unsigned int v8; // ebx\n int v9; // eax\n int v10; // eax\n int v11; // esi\n int v12; // eax\n int v13; // [esp+14h] [ebp-8h] BYREF\n int v14; // [esp+18h] [ebp-4h]\n\n v0 = sub_FFD8EEB6(); /*0xffd87ef4*/\n v1 = sub_FFD8CD6B(v0); /*0xffd87f00*/\n DebugPrint(64, (int)\"(WDT) Readback = 0x%08x\\n\", v1); /*0xffd87f0a*/\n if ( (v1 & 0x4000) != 0 ) /*0xffd87f18*/\n {\n LOBYTE(v14) = 1; /*0xffd87f1c*/\n v2 = (v1 & 0x3FF) + 1; /*0xffd87f27*/\n }\n else\n {\n v14 = 0; /*0xffd87f2e*/\n v2 = 0; /*0xffd87f32*/\n }\n v3 = sub_FFD8AD54(); /*0xffd87f34*/\n result = (*(int (__cdecl **)(int, int, int, int *))(*(_DWORD *)v3 + 52))(v3, 4, 28, &v13); /*0xffd87f45*/\n if ( result >= 0 ) /*0xffd87f4d*/\n {\n v5 = v14; /*0xffd87f5c*/\n v6 = (_DWORD *)(v13 + 8); /*0xffd87f60*/\n *(_DWORD *)(v13 + 8) = unk_FFD97F0C; /*0xffd87f63*/\n *++v6 = unk_FFD97F10; /*0xffd87f64*/\n *++v6 = unk_FFD97F14; /*0xffd87f65*/\n v6[1] = unk_FFD97F18; /*0xffd87f66*/\n *(_BYTE *)(v13 + 26) = v5; /*0xffd87f75*/\n *(_WORD *)(v13 + 24) = v2; /*0xffd87f7c*/\n if ( (v1 & 0x3000000) != 0 ) /*0xffd87f82*/\n {\n DebugPrint(0x80000000, (int)\"(WDT) Expiration detected.\\n\", v1); /*0xffd87f8b*/\n v7 = v1 & 0xFC3FFFFF | 0x3800000; /*0xffd87f99*/\n }\n else\n {\n if ( (v1 & 0x400000) == 0 || PchWdtIsUnexpectedReset() ) /*0xffd87fa9*/\n {\n DebugPrint(64, (int)\"(WDT) Status OK.\\n\", v1); /*0xffd87fcf*/\n v8 = v1 & 0xFF7FFFFF; /*0xffd87fd7*/\n }\n else\n {\n DebugPrint(0x80000000, (int)\"(WDT) Unexpected reset detected and ignored.\\n\"); /*0xffd87fb8*/\n v8 = v1 & 0xFF3FFFFF; /*0xffd87fbf*/\n }\n v7 = v8 | 0x3000000; /*0xffd87fdd*/\n }\n v9 = sub_FFD8EEB6(); /*0xffd87fdf*/\n sub_FFD8CD97(v9, v7); /*0xffd87fe8*/\n InstallPpi(&unk_FFD9816C); /*0xffd87ff2*/\n v10 = InstallPpi(&unk_FFD98144); /*0xffd87ffc*/\n v11 = v10; /*0xffd88001*/\n if ( v10 < 0 ) /*0xffd88005*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v10); /*0xffd8800e*/\n v12 = GetReportStatusCodePpi(); /*0xffd88016*/\n if ( v12 ) /*0xffd8801d*/\n (*(void (__cdecl **)(const char *, int, const char *))(v12 + 4))( /*0xffd8802e*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\Wdt.c\",\n 216,\n \"!EFI_ERROR (Status)\");\n }\n return v11; /*0xffd88034*/\n }\n return result; /*0xffd88036*/\n}","refs":[{"addr":"0xffd8eeb6","name":"sub_FFD8EEB6"},{"addr":"0xffd8cd6b","name":"sub_FFD8CD6B"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd945a8","name":"aWdtReadback0x0","string":"(WDT) Readback = 0x%08x\n"},{"addr":"0xffd8ad54","name":"sub_FFD8AD54"},{"addr":"0xffd97f0c","name":"unk_FFD97F0C"},{"addr":"0xffd97f10","name":"unk_FFD97F10"},{"addr":"0xffd97f14","name":"unk_FFD97F14"},{"addr":"0xffd97f18","name":"unk_FFD97F18"},{"addr":"0xffd945c4","name":"aWdtExpirationD","string":"(WDT) Expiration detected.\n"},{"addr":"0xffd94610","name":"aWdtStatusOk","string":"(WDT) Status OK.\n"},{"addr":"0xffd945e0","name":"aWdtUnexpectedR","string":"(WDT) Unexpected reset detected and ignored.\n"},{"addr":"0xffd87e99","name":"PchWdtIsUnexpectedReset"},{"addr":"0xffd8cd97","name":"sub_FFD8CD97"},{"addr":"0xffd7f948","name":"InstallPpi"},{"addr":"0xffd9816c","name":"unk_FFD9816C"},{"addr":"0xffd98144","name":"unk_FFD98144"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd94624","name":"aEHsPurleysktpk_8","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\Wdt.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd880d2.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd880d2.c index c0e6253..316c19c 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd880d2.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd880d2.c @@ -1,2 +1,2 @@ // 0xffd880d2 -{"addr":"0xffd880d2","code":"int sub_FFD880D2()\n{\n int v0; // eax\n _DWORD *v1; // edi\n int v2; // eax\n int v3; // eax\n _DWORD *v4; // esi\n _DWORD *v5; // eax\n int v6; // eax\n int v7; // esi\n int v8; // eax\n int v10; // eax\n\n sub_FFD7F9AF(64, (int)\"InstallPchReset() Start\\n\"); /*0xffd880de*/\n v0 = sub_FFD8ADB0(40); /*0xffd880e8*/\n v1 = (_DWORD *)v0; /*0xffd880ed*/\n if ( !v0 ) /*0xffd880f1*/\n return -2147483639; /*0xffd881e7*/\n sub_FFD90233(v0 + 12); /*0xffd880fc*/\n v1[5] = sub_FFD88046; /*0xffd88106*/\n *v1 = -2147483632; /*0xffd8810c*/\n v1[1] = &unk_FFD97FAC; /*0xffd88112*/\n v1[2] = v1 + 5; /*0xffd88119*/\n v2 = sub_FFD7F948(v1); /*0xffd8811c*/\n if ( v2 < 0 ) /*0xffd88132*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd8813b*/\n v3 = sub_FFD7F97E(); /*0xffd88143*/\n if ( v3 ) /*0xffd8814a*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd88153*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 132,\n \"!EFI_ERROR (Status)\");\n }\n v4 = (_DWORD *)sub_FFD8ADB0(12); /*0xffd88164*/\n v5 = (_DWORD *)sub_FFD8ADB0(4); /*0xffd88166*/\n if ( !v4 || !v5 ) /*0xffd88171*/\n {\n v10 = sub_FFD7F97E(); /*0xffd881cd*/\n if ( v10 ) /*0xffd881d4*/\n (*(void (__cdecl **)(const char *, int, const char *))(v10 + 4))( /*0xffd881e1*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 139,\n \"((BOOLEAN)(0==1))\");\n return -2147483639; /*0xffd881e1*/\n }\n *v5 = sub_FFD88081; /*0xffd88173*/\n *v4 = -2147483632; /*0xffd8817b*/\n v4[1] = &unk_FFD97F2C; /*0xffd88181*/\n v4[2] = v5; /*0xffd88188*/\n v6 = sub_FFD7F948(v4); /*0xffd8818b*/\n v7 = v6; /*0xffd88190*/\n if ( v6 < 0 ) /*0xffd88194*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v6); /*0xffd8819d*/\n v8 = sub_FFD7F97E(); /*0xffd881a5*/\n if ( v8 ) /*0xffd881ac*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd881b5*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 153,\n \"!EFI_ERROR (Status)\");\n }\n sub_FFD7F9AF(64, (int)\"InstallPchReset() End\\n\"); /*0xffd881c2*/\n return v7; /*0xffd881ec*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd946d0","name":"aInstallpchrese","string":"InstallPchReset() Start\n"},{"addr":"0xffd8adb0","name":"sub_FFD8ADB0"},{"addr":"0xffd90233","name":"sub_FFD90233"},{"addr":"0xffd88046","name":"sub_FFD88046"},{"addr":"0xffd97fac","name":"unk_FFD97FAC"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd94684","name":"aEHsPurleysktpk_9","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchReset.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd88081","name":"sub_FFD88081"},{"addr":"0xffd97f2c","name":"unk_FFD97F2C"},{"addr":"0xffd946ec","name":"aInstallpchrese_0","string":"InstallPchReset() End\n"}]} \ No newline at end of file +{"addr":"0xffd880d2","code":"int InstallPchResetPpi()\n{\n int v0; // eax\n _DWORD *v1; // edi\n int v2; // eax\n int v3; // eax\n _DWORD *v4; // esi\n _DWORD *v5; // eax\n int v6; // eax\n int v7; // esi\n int v8; // eax\n int v10; // eax\n\n DebugPrint(64, (int)\"InstallPchReset() Start\\n\"); /*0xffd880de*/\n v0 = sub_FFD8ADB0(40); /*0xffd880e8*/\n v1 = (_DWORD *)v0; /*0xffd880ed*/\n if ( !v0 ) /*0xffd880f1*/\n return -2147483639; /*0xffd881e7*/\n sub_FFD90233(v0 + 12); /*0xffd880fc*/\n v1[5] = PchResetInitCallback; /*0xffd88106*/\n *v1 = -2147483632; /*0xffd8810c*/\n v1[1] = &unk_FFD97FAC; /*0xffd88112*/\n v1[2] = v1 + 5; /*0xffd88119*/\n v2 = InstallPpi(v1); /*0xffd8811c*/\n if ( v2 < 0 ) /*0xffd88132*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v2); /*0xffd8813b*/\n v3 = GetReportStatusCodePpi(); /*0xffd88143*/\n if ( v3 ) /*0xffd8814a*/\n (*(void (__cdecl **)(const char *, int, const char *))(v3 + 4))( /*0xffd88153*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 132,\n \"!EFI_ERROR (Status)\");\n }\n v4 = (_DWORD *)sub_FFD8ADB0(12); /*0xffd88164*/\n v5 = (_DWORD *)sub_FFD8ADB0(4); /*0xffd88166*/\n if ( !v4 || !v5 ) /*0xffd88171*/\n {\n v10 = GetReportStatusCodePpi(); /*0xffd881cd*/\n if ( v10 ) /*0xffd881d4*/\n (*(void (__cdecl **)(const char *, int, const char *))(v10 + 4))( /*0xffd881e1*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 139,\n \"((BOOLEAN)(0==1))\");\n return -2147483639; /*0xffd881e1*/\n }\n *v5 = PchResetCallback2; /*0xffd88173*/\n *v4 = -2147483632; /*0xffd8817b*/\n v4[1] = &unk_FFD97F2C; /*0xffd88181*/\n v4[2] = v5; /*0xffd88188*/\n v6 = InstallPpi(v4); /*0xffd8818b*/\n v7 = v6; /*0xffd88190*/\n if ( v6 < 0 ) /*0xffd88194*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v6); /*0xffd8819d*/\n v8 = GetReportStatusCodePpi(); /*0xffd881a5*/\n if ( v8 ) /*0xffd881ac*/\n (*(void (__cdecl **)(const char *, int, const char *))(v8 + 4))( /*0xffd881b5*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchReset.c\",\n 153,\n \"!EFI_ERROR (Status)\");\n }\n DebugPrint(64, (int)\"InstallPchReset() End\\n\"); /*0xffd881c2*/\n return v7; /*0xffd881ec*/\n}","refs":[{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd946d0","name":"aInstallpchrese","string":"InstallPchReset() Start\n"},{"addr":"0xffd8adb0","name":"sub_FFD8ADB0"},{"addr":"0xffd90233","name":"sub_FFD90233"},{"addr":"0xffd88046","name":"PchResetInitCallback"},{"addr":"0xffd97fac","name":"unk_FFD97FAC"},{"addr":"0xffd7f948","name":"InstallPpi"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd94684","name":"aEHsPurleysktpk_9","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchReset.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd88081","name":"PchResetCallback2"},{"addr":"0xffd97f2c","name":"unk_FFD97F2C"},{"addr":"0xffd946ec","name":"aInstallpchrese_0","string":"InstallPchReset() End\n"}]} \ No newline at end of file diff --git a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8b940.c b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8b940.c index 4bb7a64..64fa6dc 100644 --- a/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8b940.c +++ b/PurleySktPkg/SouthClusterLbg/SiInit/Pei/SiInitPreMem/decompiled/ffd8b940.c @@ -1,2 +1,2 @@ // 0xffd8b940 -{"addr":"0xffd8b940","code":"int __thiscall sub_FFD8B940(void *this)\n{\n int n256; // esi\n int n13; // edi\n int v3; // eax\n void *v4; // ecx\n int v5; // eax\n int result; // eax\n\n n256 = 256; /*0xffd8b947*/\n n13 = 13; /*0xffd8b94e*/\n do /*0xffd8b9e0*/\n {\n v3 = sub_FFD8B14D(n256, this, -1, 0, 0); /*0xffd8b95f*/\n if ( v3 < 0 ) /*0xffd8b969*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v3); /*0xffd8b976*/\n v5 = sub_FFD7F97E(); /*0xffd8b97e*/\n if ( v5 ) /*0xffd8b985*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd8b992*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmGpioLib\\\\GpioLib.c\",\n 1584,\n \"!EFI_ERROR (Status)\");\n }\n result = sub_FFD8B14D(n256, v4, -1, 0, 0); /*0xffd8b9a3*/\n if ( result < 0 ) /*0xffd8b9ad*/\n {\n sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", result); /*0xffd8b9ba*/\n result = sub_FFD7F97E(); /*0xffd8b9c2*/\n if ( result ) /*0xffd8b9c9*/\n result = (*(int (__cdecl **)(const char *, int, const char *))(result + 4))( /*0xffd8b9d6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmGpioLib\\\\GpioLib.c\",\n 1712,\n \"!EFI_ERROR (Status)\");\n }\n ++n256; /*0xffd8b9dc*/\n --n13; /*0xffd8b9dd*/\n }\n while ( n13 ); /*0xffd8b9e0*/\n return result; /*0xffd8b9e6*/\n}","refs":[{"addr":"0xffd8b14d","name":"sub_FFD8B14D"},{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd95844","name":"aEHsPurleysktpk_16","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmGpioLib\\GpioLib.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file +{"addr":"0xffd8b940","code":"int __thiscall sub_FFD8B940(void *this)\n{\n int n256; // esi\n int n13; // edi\n int v3; // eax\n void *v4; // ecx\n int v5; // eax\n int result; // eax\n\n n256 = 256; /*0xffd8b947*/\n n13 = 13; /*0xffd8b94e*/\n do /*0xffd8b9e0*/\n {\n v3 = sub_FFD8B14D(n256, this, -1, 0, 0); /*0xffd8b95f*/\n if ( v3 < 0 ) /*0xffd8b969*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v3); /*0xffd8b976*/\n v5 = GetReportStatusCodePpi(); /*0xffd8b97e*/\n if ( v5 ) /*0xffd8b985*/\n (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd8b992*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmGpioLib\\\\GpioLib.c\",\n 1584,\n \"!EFI_ERROR (Status)\");\n }\n result = sub_FFD8B14D(n256, v4, -1, 0, 0); /*0xffd8b9a3*/\n if ( result < 0 ) /*0xffd8b9ad*/\n {\n DebugPrint(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", result); /*0xffd8b9ba*/\n result = GetReportStatusCodePpi(); /*0xffd8b9c2*/\n if ( result ) /*0xffd8b9c9*/\n result = (*(int (__cdecl **)(const char *, int, const char *))(result + 4))( /*0xffd8b9d6*/\n \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\Library\\\\PeiDxeSmmGpioLib\\\\GpioLib.c\",\n 1712,\n \"!EFI_ERROR (Status)\");\n }\n ++n256; /*0xffd8b9dc*/\n --n13; /*0xffd8b9dd*/\n }\n while ( n13 ); /*0xffd8b9e0*/\n return result; /*0xffd8b9e6*/\n}","refs":[{"addr":"0xffd8b14d","name":"sub_FFD8B14D"},{"addr":"0xffd7f9af","name":"DebugPrint"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd7f97e","name":"GetReportStatusCodePpi"},{"addr":"0xffd95844","name":"aEHsPurleysktpk_16","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmGpioLib\\GpioLib.c"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]} \ No newline at end of file