It seems not using IOMMU.
A close look into the memory created by WdfCommonBufferCreate():
- There is only 1 MDL. The size is 2GB.
- I get page numbers by MmGetMdlPfnArray(). They are consecutive.
- The logical address(WdfCommonBufferGetAlignedLogicalAddress) and the physical address(MmGetPhysicalAddress) are identical.
I try allocate 2GB chunk as many as possible by WdfCommonBufferCreate() and MmAllocateContiguousMemory(). The maximum chunks they can allocate are the same.
@Peter_Viscarola_OSR said "In some version of Windows, the WDM function AllocateCommonBuffer simply calls MmAllocateContiguousMemory."
Now, my question:
how to allocate non-physically-contiguous memory for non-scatter-gather DMA?
In Linux, I am able to allocated a bunch of small memory and create the SG list, then pass a single address to my device.
Kevin