VfMapTransfer
LARGE_INTEGER __stdcall VfMapTransfer(
DMA_ADAPTER *DmaAdapter,
MDL *Mdl,
VOID *MapRegisterBase,
VOID *CurrentVa,
UINT64 *Length,
UINT8 WriteToDevice){
MDL *v6;
VOID *v7;
VOID *v8;
__int64(__fastcall *v10)(DMA_ADAPTER *, MDL *, VOID *, VOID *, unsigned int *, int);
INT64 v11;
LIST_ENTRY *AdapterInformationInternal;
UINT8 v13;
CHAR v14;
INT64 v15;
unsigned int *v16;
unsigned int v17;
unsigned int v18;
UINT64 MapRegisterFile;
UINT64 v20;
unsigned int v21;
int v22;
LARGE_INTEGER v23;
int Response;
UINT64 Response_8;
__int64(__fastcall *v27)(DMA_ADAPTER *, MDL *, VOID *, VOID *, unsigned int *, int);
_MDL *Mdla;
VOID *MapRegisterBasea;
VOID *CurrentVaa;
CurrentVaa = CurrentVa;
MapRegisterBasea = MapRegisterBase;
Mdla = Mdl;
v6 = Mdl;
v7 = CurrentVa;
v8 = MapRegisterBase;
LODWORD(v10) = ViGetRealDmaOperation(DmaAdapter, 0x40ui64);
LOBYTE(v11) = 1;
v27 = v10;
AdapterInformationInternal = ViGetAdapterInformationInternal(DmaAdapter, v11);
v14 = WriteToDevice;
v15 = (INT64)AdapterInformationInternal;
v16 = (unsigned int *)Length;
if( AdapterInformationInternal )
{
VF_ASSERT_MAX_IRQL(v13);
VERIFY_BUFFER_LOCKED(v6);
ViCheckAdapterBuffers(v15);
if( *(_DWORD *)(v15 + 192) == 3 )
{
v17 = ViCheckMdlLength(v6, 0i64, *v16);
if( v17 )
{
v18 = v17;
ViHalPreprocessOptions(
&dword_140C12D14,
(PSTR)"The provided MDL is not sufficient to satisfy the requested length",
0x24ui64,
v17,
0i64,
0i64,
Response_8);
VfReportIssueWithOptions(0xE6ui64, 0x24ui64, v18, 0i64, 0i64, &dword_140C12D14);
}
}
if( v8 == (VOID *)-559026163i64 )
{
v8 = 0i64;
}
else
{
MapRegisterFile = ViGetMapRegisterFile((INT64)v8);
v20 = MapRegisterFile;
if( MapRegisterFile )
{
v21 = ViMapDoubleBuffer(MapRegisterFile, (UINT64)v6, (UINT64)v7, *v16, v14);
if( v21 && (*v16 = v21, v22 = ViSwap(&MapRegisterBasea, &Mdla, &CurrentVaa), v7 = CurrentVaa, v6 = Mdla, v22) )
v8 = MapRegisterBasea;
else
v8 = *(VOID **)(v20 + 48);
}
}
}
LOBYTE(Response) = v14;
v23.QuadPart = v27(DmaAdapter, v6, v8, v7, v16, Response);
if( v15 )
INCREASE_MAPPED_TRANSFER_BYTE_COUNT(v15, *v16, 0);
return v23;
}Referenced by:
No references.