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 *RealDmaOperation)(_DMA_ADAPTER *, _MDL *, VOID *, VOID *, UINT64 *, int);
INT64 v11;
_LIST_ENTRY *AdapterInformationInternal;
UINT8 v13;
UINT8 v14;
_ADAPTER_INFORMATION *v15;
UINT64 *v16;
ULONG_PTR v17;
ULONG_PTR v18;
_MAP_REGISTER_FILE *MapRegisterFile;
_MAP_REGISTER_FILE *v20;
int v21;
int v22;
_LARGE_INTEGER v23;
int Action;
UINT64 v26;
__int64(__fastcall *v27)(_DMA_ADAPTER *, _MDL *, VOID *, VOID *, UINT64 *, int);
_MDL *Mdla;
VOID *MapRegisterBasea;
VOID *CurrentVaa;
CurrentVaa = CurrentVa;
MapRegisterBasea = MapRegisterBase;
Mdla = Mdl;
v6 = Mdl;
v7 = CurrentVa;
v8 = MapRegisterBase;
RealDmaOperation = (__int64(__fastcall *)(_DMA_ADAPTER *, _MDL *, VOID *, VOID *, UINT64 *, int))ViGetRealDmaOperation((ULONG_PTR)DmaAdapter, 0x40ui64);
LOBYTE(v11) = 1;
v27 = RealDmaOperation;
AdapterInformationInternal = ViGetAdapterInformationInternal(DmaAdapter, v11);
v14 = WriteToDevice;
v15 = (_ADAPTER_INFORMATION *)AdapterInformationInternal;
v16 = Length;
if( AdapterInformationInternal )
{
VF_ASSERT_MAX_IRQL(v13);
VERIFY_BUFFER_LOCKED(v6);
ViCheckAdapterBuffers((INT64)v15);
if( v15[48] == 3 )
{
v17 = ViCheckMdlLength(v6, 0i64, *(unsigned int *)v16);
if( v17 )
{
v18 = v17;
ViHalPreprocessOptions(
&unk_140C12D14,
(PSTR)"The provided MDL is not sufficient to satisfy the requested length",
0x24ui64,
v17,
0i64,
0i64,
v26);
VfReportIssueWithOptions(0xE6ui64, 0x24u, v18, 0, 0, &unk_140C12D14);
}
}
if( v8 == (VOID *)-559026163i64 )
{
v8 = 0i64;
}
else
{
MapRegisterFile = ViGetMapRegisterFile(v8);
v20 = MapRegisterFile;
if( MapRegisterFile )
{
v21 = ViMapDoubleBuffer(MapRegisterFile, v6, v7, *(unsigned int *)v16, v14);
if( v21
&& (*(_DWORD *)v16 = v21, v22 = ViSwap(&MapRegisterBasea, &Mdla, &CurrentVaa), v7 = CurrentVaa, v6 = Mdla, v22) )
{
v8 = MapRegisterBasea;
}
else
{
v8 = (VOID *)*((_QWORD *)v20 + 6);
}
}
}
}
LOBYTE(Action) = v14;
v23.QuadPart = v27(DmaAdapter, v6, v8, v7, v16, Action);
if( v15 )
INCREASE_MAPPED_TRANSFER_BYTE_COUNT(v15, *(unsigned int *)v16, 0);
return v23;
}Referenced by:
No references.