HalpIommuCreateDmarPageTable
NTSTATUS __stdcall HalpIommuCreateDmarPageTable(
INT64 a1,
UINT64 a2,
UINT64 a3,
INT64 a4,
INT64 a5,
INT64 a6,
INT64 *a7){
unsigned int v7;
unsigned int v8;
unsigned int v9;
void *MemoryInternal;
INT64 v11;
VOID *v12;
_HALP_ALLOC_CONTEXT *v14;
int v15;
INT64 v16;
v7 = a3;
v8 = a2;
v9 = a1;
if( a6 )
MemoryInternal = HalpMmAllocateMemoryInternal(0x60ui64, MmCached);
else
MemoryInternal = HalpMmAllocCtxAlloc((_HALP_ALLOC_CONTEXT *)a1, 0x60ui64);
v12 = MemoryInternal;
if( !MemoryInternal )
return -1073741670;
if( v7 > 6 || v8 < 2 || v7 < v8 )
return -1073741811;
v15 = HalpIommuInitializeDmarPageTable(v9, v8, v7, v11, v16, a6, (INT64)MemoryInternal);
if( v15 < 0 )
{
*a7 = 0i64;
if( !a6 )
HalpMmAllocCtxFree(v14, v12);
}
else
{
*a7 = (INT64)v12;
}
return v15;
}Referenced by:
HalpIommuAllocateDmaDomain
HalpIommuConstructReservedPageTable