134 PVOID RemoteFileAddress;
150 NewFile->BaseAddress = RemoteFileAddress;
167 NewFile->Flags &= ~BL_IMG_MEMORY_FILE;
168 NewFile->FileId = FileId;
218 if (!(ImageBase) || !(ImageSize))
292 Attributes &= ~BlMemoryValidAllocationAttributeMask,
335 Attributes &= ~BlMemoryValidAllocationAttributeMask,
372 ULONG RemainingLength, CurrentSize, ImageSize, ReadSize;
373 BOOLEAN ComputeSignature, ComputeHash, Completed;
468 if (*MappedSize < ImageSize)
471 *MappedSize = ImageSize;
491 RemainingLength = ImageSize;
500 ShowProgress &= (Completed != 0) - 1;
505 if (ReadSize > ImageSize)
507 ReadSize = ImageSize;
520 while (RemainingLength)
523 if (RemainingLength > ReadSize)
526 CurrentSize = ReadSize;
531 CurrentSize = RemainingLength;
553 RemainingLength -= CurrentSize;
562 ShowProgress &= (Completed != 0) - 1;
574 *MappedSize = ImageSize;
637 FoundSection = SectionHeader;
682 if (!(ImageSize) || !(ImageBase))
711 USHORT SectionCount, CheckSum, PartialSum, FinalSum;
713 ULONG_PTR EndOfHeaders, SectionStart, Slack, SectionEnd;
716 UCHAR LocalBuffer[1024];
717 UCHAR TrustedBootInformation[52];
718 ULONG WorkaroundForBinutils;
721 WorkaroundForBinutils = 0;
728 CertDirectory =
NULL;
732 ImageHashValid =
FALSE;
733 RtlZeroMemory(&TrustedBootInformation,
sizeof(TrustedBootInformation));
757 LocalFile = &LocalFileBuffer;
840 Status = RtlULongLongAdd(VirtualSize,
860 if (*ImageSize < VirtualSize)
863 *ImageSize = VirtualSize;
884 if (VirtualSize < HeaderSize)
927 for (
i = 0;
i < SectionCount;
i++)
942 if (!(
First) && (EndOfHeaders < SectionStart))
945 Slack = SectionStart - EndOfHeaders;
954 Status = RtlULongAdd(RawSize, 1, &AlignSize);
964 SectionSize = RawSize;
972 else if (SectionSize < RawSize)
975 RawSize = SectionSize;
990 if (VirtualSize < SectionEnd)
1008 if (VirtualSize < SectionEnd)
1023 if ((*(
PULONG)&Section->
Name ==
'ler.') && (RawSize < AlignSize))
1032 WorkaroundForBinutils = AlignSize - RawSize;
1033 AlignSize -= WorkaroundForBinutils;
1041 (
PVOID)SectionStart,
1057 AlignSize += WorkaroundForBinutils;
1065 if (RawSize < SectionSize)
1068 Slack = SectionSize - RawSize;
1073 EndOfHeaders = SectionStart + SectionSize;
1087 if (EndOfHeaders < SectionStart)
1090 Slack = SectionStart - EndOfHeaders;
1100 while (RemainingLength)
1103 if (RemainingLength >=
sizeof(LocalBuffer))
1139 FinalSum =
FileSize + PartialSum + WorkaroundForBinutils;
1140 if ((FinalSum != CheckSum) && (PartialSum == 0xFFFF))
1147 if ((FinalSum != CheckSum) &&
1172 "Boot Environment Library",
1186 if (!ImageHashValid)
1189 BlEnNotifyEvent(0x10000002,
NULL);
1197 Context.ImageSize = VirtualSize;
1198 Context.HashValid = ImageHashValid;
1200 BlEnNotifyEvent(0x10000002, &
Context);
1209 *ImageSize = VirtualSize;
1229 if ((CertBuffer) && (CertDirectory))
1294 if (!(ImageBase) || !(
Path))
1334 PVOID UnlockCode, ImageBase;
1339 BOOLEAN DisableIntegrity, TestSigning;
1344 BitLockerDevice =
NULL;
1349 ImageAppEntry =
NULL;
1364 for (
i = 0;
i < AllowedCount;
i++)
1378#if BL_BITLOCKER_SUPPORT
1380 Status = BlFveSecureBootUnlockBootDevice(BootEntry, &BitLockerDevice, &UnlockCode);
1423 Context.BootEntry = BootEntry;
1424 BlEnNotifyEvent(0x10000003, &
Context);
1429 if (!DisableIntegrity)
1449 if (BdDebugTransitions)
1453 Status = BlBdInitialize();
1462 BlBdLoadImageSymbols(&PathString, ImageBase);
1468#if BL_BITLOCKER_SUPPORT
1470 Status = BlSecureBootCheckPolicyOnFveDevice(BitLockerDevice);
1477#if BL_BITLOCKER_SUPPORT
1479 Status = BlFveSecureBootCheckpointBootApp(BootEntry, BitLockerDevice,
Hash, UnlockCode);
1502 AppEntry->
Guid = BootEntry->Guid;
1503 AppEntry->
Flags = BootEntry->Flags;
1519 ImageAppEntry->
AppEntry = AppEntry;
1565 if (BitLockerDevice)
1624 if (ReturnArguments->DataPage == 0)
1631 EfiPrintf(
L"Return arguments not supported\r\n");
1650 EfiPrintf(
L"Partition copy not supported\r\n");
1706 sizeof(*ReturnArguments) +
1707 sizeof(*MemoryData) +
1708 sizeof(*FirmwareParameters) +
1709 sizeof(*ParameterBlock);
1712 if (ImageParameters->BufferSize <
BufferSize)
1715 if (ImageParameters->BufferSize)
1723 if (!ImageParameters->Buffer)
1756 MemoryParameters.
Buffer = MemoryData + 1;
1804 FirmwareParametersOffset);
1818 ReturnArgumentsOffset);
1825 sizeof(*ReturnArguments);
1839 ULONG BootSizeNeeded;
1843 PVOID NewStack, NewGdt, NewIdt;
1894 AddressOfEntryPoint);
1906 EfiPrintf(
L"EFI APPLICATION RETURNED!!!\r\n");
1923 EfiPrintf(
L"ImgArchEfiStartBootApplication not implemented for this platform.\r\n");
1943 if (!ReturnArguments)
1948 LocalReturnArgs.
Flags = 0;
1951 ReturnArguments = &LocalReturnArgs;
1970 while (NextEntry != ListHead)
1985 NextEntry = NextEntry->
Flink;
2000#if BL_BITLOCKER_SUPPORT
2002 FvebpCheckAllPartitions(
TRUE);
2007 BlEnNotifyEvent(0x10000005,
NULL);
static ACPI_BUFFER CurrentBuffer
#define ALIGN_DOWN_BY(size, align)
PRTL_UNICODE_STRING_BUFFER Path
char * strcpy(char *DstString, const char *SrcString)
@ BcdLibraryInteger_UndocumentedMagic
@ BcdLibraryDevice_ApplicationDevice
@ BcdLibraryBoolean_DisableIntegrityChecks
@ BcdLibraryBoolean_AllowPrereleaseSignatures
@ BcdLibraryIntegerList_AllowedInMemorySettings
@ BcdLibraryString_ApplicationPath
struct _BL_MEMORY_DESCRIPTOR BL_MEMORY_DESCRIPTOR
struct _BL_FIRMWARE_DESCRIPTOR BL_FIRMWARE_DESCRIPTOR
NTSTATUS BlGetBootOptionBoolean(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBOOLEAN Value)
NTSTATUS BlMmGetMemoryMap(_In_ PLIST_ENTRY MemoryMap, _In_ PBL_BUFFER_DESCRIPTOR MemoryParameters, _In_ ULONG WhichTypes, _In_ ULONG Flags)
#define BL_LOAD_PE_IMG_VALIDATE_ORIGINAL_FILENAME
#define BL_DEVICE_READ_ACCESS
NTSTATUS BlMmAllocatePhysicalPages(_Inout_ PPHYSICAL_ADDRESS Address, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONGLONG PageCount, _In_ ULONG Attributes, _In_ ULONG Alignment)
NTSTATUS BlFileOpen(_In_ ULONG DeviceId, _In_ PWCHAR FileName, _In_ ULONG Flags, _Out_ PULONG FileId)
struct _BL_FIRMWARE_DESCRIPTOR * PBL_FIRMWARE_DESCRIPTOR
#define BL_LOAD_PE_IMG_SKIP_RELOCATIONS
struct _BL_DEVICE_DESCRIPTOR * PBL_DEVICE_DESCRIPTOR
ULONGLONG BlTimeQueryPerformanceCounter(_Out_opt_ PLARGE_INTEGER Frequency)
VOID EfiPrintf(_In_ PWCHAR Format,...)
NTSTATUS BlpDisplayReinitialize(VOID)
struct _BOOT_APPLICATION_PARAMETER_BLOCK * PBOOT_APPLICATION_PARAMETER_BLOCK
#define BOOT_APPLICATION_SIGNATURE_2
#define BL_UTL_CHECKSUM_USHORT_BUFFER
#define BL_UTL_CHECKSUM_COMPLEMENT
BL_TRANSLATION_TYPE MmTranslationType
#define BL_MEMORY_DATA_VERSION
#define BL_MM_INCLUDE_MAPPED_ALLOCATED
NTSTATUS MmPapAllocatePagesInRange(_Inout_ PVOID *PhysicalAddress, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONGLONG Pages, _In_ ULONG Attributes, _In_ ULONG Alignment, _In_opt_ PBL_ADDRESS_RANGE Range, _In_ ULONG Type)
NTSTATUS BlGetBootOptionDevice(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBL_DEVICE_DESCRIPTOR *Value, _In_opt_ PBL_BCD_OPTION *ExtraOptions)
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
NTSTATUS BlBdPullRemoteFile(_In_ PWCHAR FilePath, _Out_ PVOID BaseAddress, _Out_ PULONGLONG FileSize)
struct _BL_RETURN_ARGUMENTS * PBL_RETURN_ARGUMENTS
enum _BL_MEMORY_TYPE BL_MEMORY_TYPE
struct _BL_APPLICATION_ENTRY * PBL_APPLICATION_ENTRY
NTSTATUS BlMmUnmapVirtualAddressEx(_In_ PVOID VirtualAddress, _In_ ULONGLONG Size)
NTSTATUS BlFileGetInformation(_In_ ULONG FileId, _In_ PBL_FILE_INFORMATION FileInfo)
NTSTATUS BlpDeviceOpen(_In_ PBL_DEVICE_DESCRIPTOR Device, _In_ ULONG Flags, _In_ ULONG Unknown, _Out_ PULONG DeviceId)
NTSTATUS BlDeviceClose(_In_ ULONG DeviceId)
ULONG BlUtlCheckSum(_In_ ULONG PartialSum, _In_ PUCHAR Buffer, _In_ ULONG Length, _In_ ULONG Flags)
NTSTATUS MmPapFreePages(_In_ PVOID Address, _In_ ULONG WhichList)
struct _BL_MEMORY_DATA * PBL_MEMORY_DATA
NTSTATUS BlMmFreePhysicalPages(_In_ PHYSICAL_ADDRESS Address)
PBL_DEVICE_DESCRIPTOR BlpBootDevice
#define BL_LOAD_PE_IMG_EXISTING_BUFFER
#define BL_MM_INCLUDE_MAPPED_UNALLOCATED
#define BL_LOAD_PE_IMG_CHECK_SUBSYSTEM
NTSTATUS BlAppendBootOptionInteger(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ ULONGLONG Value)
#define BL_LOAD_IMG_VIRTUAL_BUFFER
#define BL_LOAD_PE_IMG_VIRTUAL_BUFFER
NTSTATUS EfiStall(_In_ ULONG StallTime)
#define BL_IMG_VALID_FILE
NTSTATUS TblDoNotPurgeEntry(_In_ PVOID Entry)
NTSTATUS BlTblSetEntry(_Inout_ PVOID **Table, _Inout_ PULONG Count, _In_ PVOID Entry, _Out_ PULONG EntryIndex, _In_ PBL_TBL_SET_ROUTINE Callback)
#define BL_LOAD_PE_IMG_CHECK_FORCED_INTEGRITY
#define BOOT_APPLICATION_VERSION
#define BL_LOAD_IMG_COMPUTE_SIGNATURE
#define BL_IMG_REMOTE_FILE
#define BL_LOAD_IMG_UNKNOWN_BUFFER_FLAG
#define BL_MM_INCLUDE_PERSISTENT_MEMORY
#define BOOT_APPLICATION_SIGNATURE_1
NTSTATUS BlMmMapPhysicalAddressEx(_In_ PVOID *VirtualAddress, _In_ ULONG Attributes, _In_ ULONGLONG Size, _In_ PHYSICAL_ADDRESS PhysicalAddress)
NTSTATUS BlpGetBootOptionIntegerList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG *Value, _Out_ PULONGLONG Count, _In_ BOOLEAN NoCopy)
#define BL_FILE_READ_ACCESS
NTSTATUS BlGetBootOptionString(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PWCHAR *Value)
NTSTATUS BlFwGetParameters(_In_ PBL_FIRMWARE_DESCRIPTOR Parameters)
#define BL_LOAD_IMG_EXISTING_BUFFER
#define BL_LOAD_IMG_COMPUTE_HASH
NTSTATUS BlFileClose(_In_ ULONG FileId)
BOOLEAN BlBdDebuggerEnabled(VOID)
FORCEINLINE PVOID PhysicalAddressToPtr(_In_ PHYSICAL_ADDRESS PhysicalAddress)
NTSTATUS BlFileReadAtOffsetEx(_In_ ULONG FileId, _In_ ULONG Size, _In_ ULONGLONG ByteOffset, _In_ PVOID Buffer, _Out_ PULONG BytesReturned, _In_ ULONG Flags)
VOID BlUtlUpdateProgress(_In_ ULONG Percentage, _Out_opt_ PBOOLEAN Completed)
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
#define BL_LOAD_PE_IMG_IGNORE_CHECKSUM_MISMATCH
#define BL_MM_INCLUDE_UNMAPPED_ALLOCATED
#define BL_LOAD_PE_IMG_CHECK_MACHINE
#define BL_IMG_MEMORY_FILE
VOID Archx86TransferTo32BitApplicationAsm(VOID)
#define BL_MM_INCLUDE_RESERVED_ALLOCATED
BOOLEAN BlMmTranslateVirtualAddress(_In_ PVOID VirtualAddress, _Out_ PPHYSICAL_ADDRESS PhysicalAddress)
ULONG BlGetBootOptionListSize(_In_ PBL_BCD_OPTION BcdOption)
#define BL_RETURN_ARGUMENTS_VERSION
#define BL_LOAD_PE_IMG_COMPUTE_HASH
BOOLEAN BdDebuggerNotPresent
NTSTATUS BlpPdParseReturnArguments(_In_ PBL_RETURN_ARGUMENTS ReturnArguments)
NTSTATUS ImgpInitializeBootApplicationParameters(_In_ PBL_BUFFER_DESCRIPTOR ImageParameters, _In_ PBL_APPLICATION_ENTRY AppEntry, _In_ PVOID ImageBase, _In_ ULONG ImageSize)
VOID BlImgQueryCodeIntegrityBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry, _Out_ PBOOLEAN IntegrityChecksDisabled, _Out_ PBOOLEAN TestSigning)
ULONG IapAllocatedTableEntries
NTSTATUS BlImgAllocateImageBuffer(_Inout_ PVOID *ImageBuffer, _In_ ULONG MemoryType, _In_ ULONGLONG ImageSize, _In_ ULONG Flags)
NTSTATUS BlImgLoadPEImageEx(_In_ ULONG DeviceId, _In_ BL_MEMORY_TYPE MemoryType, _In_ PWCHAR Path, _Out_ PVOID *ImageBase, _Out_ PULONG ImageSize, _Out_ PVOID Hash, _In_ ULONG Flags)
NTSTATUS ImgArchEfiStartBootApplication(_In_ PBL_APPLICATION_ENTRY AppEntry, _In_ PVOID ImageBase, _In_ ULONG ImageSize, _In_ PBL_RETURN_ARGUMENTS ReturnArguments)
NTSTATUS BlImgLoadImageWithProgress2(_In_ ULONG DeviceId, _In_ BL_MEMORY_TYPE MemoryType, _In_ PWCHAR FileName, _Inout_ PVOID *MappedBase, _Inout_ PULONG MappedSize, _In_ ULONG ImageFlags, _In_ BOOLEAN ShowProgress, _Out_opt_ PUCHAR *HashBuffer, _Out_opt_ PULONG HashSize)
PBOOT_APPLICATION_PARAMETER_BLOCK BootApp32Parameters
NTSTATUS ImgpReadAtFileOffset(_In_ PBL_IMG_FILE File, _In_ ULONG Size, _In_ ULONGLONG ByteOffset, _In_ PVOID Buffer, _Out_ PULONG BytesReturned)
NTSTATUS ImgpCopyApplicationBootDevice(__in PBL_DEVICE_DESCRIPTOR DestinationDevice, __in PBL_DEVICE_DESCRIPTOR SourceDevice)
NTSTATUS BlImgStartBootApplication(_In_ ULONG AppHandle, _Inout_opt_ PBL_RETURN_ARGUMENTS ReturnArguments)
KDESCRIPTOR BootAppGdtRegister
NTSTATUS BlImgUnLoadImage(_In_ PVOID ImageBase, _In_ ULONG ImageSize, _In_ ULONG ImageFlags)
NTSTATUS BlImgLoadBootApplication(_In_ PBL_LOADED_APPLICATION_ENTRY BootEntry, _Out_ PULONG AppHandle)
PIMAGE_SECTION_HEADER BlImgFindSection(_In_ PVOID ImageBase, _In_ ULONG ImageSize)
NTSTATUS ImgpLoadPEImage(_In_ PBL_IMG_FILE ImageFile, _In_ BL_MEMORY_TYPE MemoryType, _Inout_ PVOID *ImageBase, _Out_opt_ PULONG ImageSize, _Inout_opt_ PVOID Hash, _In_ ULONG Flags)
NTSTATUS ImgpCloseFile(_In_ PBL_IMG_FILE File)
NTSTATUS ImgpOpenFile(_In_ ULONG DeviceId, _In_ PWCHAR FileName, _In_ ULONG Flags, _Out_ PBL_IMG_FILE NewFile)
NTSTATUS BlImgUnloadBootApplication(_In_ ULONG AppHandle)
NTSTATUS ImgpGetFileSize(_In_ PBL_IMG_FILE File, _Out_ PULONG FileSize)
NTSTATUS BlImgUnallocateImageBuffer(_In_ PVOID ImageBase, _In_ ULONG ImageSize, _In_ ULONG ImageFlags)
KDESCRIPTOR BootAppIdtRegister
PVOID BootApp32EntryRoutine
NTSTATUS NTAPI RtlImageNtHeaderEx(_In_ ULONG Flags, _In_ PVOID Base, _In_ ULONG64 Size, _Out_ PIMAGE_NT_HEADERS *OutHeaders)
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
static int Hash(const char *)
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
struct _FileName FileName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
__INTRIN_INLINE void _sgdt(void *Destination)
__INTRIN_INLINE void __sidt(void *Destination)
ULONG NTAPI LdrRelocateImage(_In_ PVOID BaseAddress, _In_opt_ PCSTR LoaderName, _In_ ULONG Success, _In_ ULONG Conflict, _In_ ULONG Invalid)
static OUT PIO_STATUS_BLOCK OUT PVOID FileInformation
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
_In_ ULONG _In_ ULONG Offset
#define IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY
#define IMAGE_FIRST_SECTION(NtHeader)
#define IMAGE_FILE_MACHINE_AMD64
#define IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION
#define STATUS_INVALID_IMAGE_WIN_64
#define STATUS_IMAGE_CHECKSUM_MISMATCH
#define STATUS_INVALID_IMAGE_FORMAT
#define STATUS_MEMORY_NOT_ALLOCATED
#define STATUS_FILE_INVALID
#define STATUS_INVALID_IMAGE_WIN_32
#define IMAGE_FILE_MACHINE_I386
static FILE_SYSTEM RegisteredFileSystems[]
#define STATUS_BUFFER_TOO_SMALL
PBL_APPLICATION_ENTRY AppEntry
ULONG MemoryTranslationType
ULONG ReturnArgumentsOffset
ULONG FirmwareParametersOffset
struct _LIST_ENTRY * Flink
static LARGE_INTEGER Frequency
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ ULONG Flags
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT SourceDevice
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
#define ROUND_TO_PAGES(Size)
_In_ BOOLEAN _In_ ULONG HashAlgorithm