HalpAcpiFindRsdp
NTSTATUS __fastcall HalpAcpiFindRsdp(_LOADER_PARAMETER_BLOCK *LoaderBlock, UINT8 **a2){
UINT8 *v2;
NTSTATUS v3;
_CONFIGURATION_COMPONENT_DATA *ConfigurationRoot;
__int64 ConfigurationNextEntry;
int v8;
_CONFIGURATION_COMPONENT_DATA *v9;
__int64 v10;
size_t v11;
UINT8 *Memory;
__int64 v14;
__int64 v15;
v2 = (UINT8 *)qword_140C50510;
v3 = 0;
v14 = 0i64;
if( !qword_140C50510 )
{
ConfigurationRoot = LoaderBlock->ConfigurationRoot;
v15 = 0i64;
ConfigurationNextEntry = KeFindConfigurationNextEntry((__int64)ConfigurationRoot, 3, 12, 0i64, &v15);
if( !ConfigurationNextEntry )
goto LABEL_11;
do
{
strcmp(*(UINT8 **)(ConfigurationNextEntry + 56), (UINT8 *)"ACPI BIOS");
if( !v8 )
break;
v9 = LoaderBlock->ConfigurationRoot;
v14 = ConfigurationNextEntry;
ConfigurationNextEntry = KeFindConfigurationNextEntry((__int64)v9, 3, 12, 0i64, &v14);
}
while( ConfigurationNextEntry );
if( !ConfigurationNextEntry )
{
LABEL_11:
DbgPrint("**** HalpAcpiFindRsdp: Could not find RSDP\n");
return -1073741275;
}
v10 = *(_QWORD *)(ConfigurationNextEntry + 64);
v11 = 24 * *(_DWORD *)(v10 + 36) + 16;
Memory = HalpAcpiAllocateMemory(LoaderBlock, v11);
qword_140C50510 = (__int64)Memory;
v2 = Memory;
if( !Memory )
return -1073741670;
memmove(Memory, (const VOID *)(v10 + 28), v11);
}
*a2 = v2;
return v3;
}Referenced by:
HalpAcpiTableCacheInit