As a general rule, transfers to memory-mapped regions are faster than transfers
to I/O-mapped regions, because WinDriver enables you to access memory-mapped
regions directly from the user mode, without the need for a function call, as
In addition, the WinDriver APIs enable you to improve the performance of your
I/O and memory data transfers by using block (string) transfers and by
grouping several data transfers into a single function call, as explained in
When registering a PCI card, using
WD_CardRegister() function (see the
WinDriver PCI Low-Level API Reference), WinDriver returns both user-mode and kernel-mode mappings of
the card's physical memory regions. These addresses can then be used to access
the memory regions on the card directly, either from the user mode or from the
kernel mode (respectively), thus eliminating the context switches between the
user and kernel modes and the function calls overhead for accessing the memory.
In addition, all the
When using the low-level
WD_xxx() APIs, described in the
WinDriver PCI Low-Level API Reference, the user-mode and kernel-mode mappings of the card's
physical memory regions are returned by
pUserDirectAddr fields of the
pCardReg->Card.Item[i] card resource item structures. The
pTransAddr result should be used as a base address in calls to
WD_MultiTransfer() or when accessing
memory directly from a Kernel PlugIn driver
pUserDirectAddr as a regular pointer.
Whatever the method you select to access the memory on your card, it is
important to align the base address according to the size of the data type,
especially when issuing string transfer commands. Otherwise, the transfers are
split into smaller portions.
The easiest way to align data is to use basic types when defining a buffer, i.e.:
BYTE buf[len]; /* for BYTE transfers - not aligned */ WORD buf[len]; /* for WORD transfers - aligned on a 2-byte boundary */ UINT32 buf[len]; /* for DWORD transfers - aligned on a 4-byte boundary */ UINT64 buf[len]; /* for QWORD transfers - aligned on a 8-byte boundary */
To transfer large amounts of data to/from memory addresses or I/O addresses
(which by definition cannot be accessed directly, as opposed to memory
addresses — see
WD_Transfer() function (see WinDriver PCI Low-Level API Reference).
WD_MultiTransfer() function (see the WinDriver PCI Low-Level API Reference).
|The ability to perform actual 64-bit transfers is dependent on the existence of support for such transfers by the hardware, CPU, bridge, etc., and can be affected by any of these factors or their specific combination.|
WinDriver supports 64-bit PCI data transfers on the supported Windows
and Linux 64-bit platforms (see
If your PCI hardware (card and bus) is 64-bit, the ability to perform 64-bit data transfers on 32-bit platforms will enable you to utilize your hardware's broader bandwidth, even if your host operating system is only 32-bit.
This innovative technology makes possible data transfer rates previously unattainable on 32-bit platforms. Drivers developed using WinDriver will attain significantly better performance results than drivers written with the WDK or other driver development tools. To date, such tools do not enable 64-bit data transfer on x86 platforms running 32-bit operating systems. Jungo's benchmark performance testing results for 64-bit data transfer indicate a significant improvement of data transfer rates compared to 32-bit data transfer, guaranteeing that drivers developed with WinDriver will achieve far better performance than 32-bit data transfer normally allows.
You can perform 64-bit data transfers using any of the following methods:
WD_MultiTransfer() functions (see WinDriver PCI Low-Level API Reference) with QWORD read/write transfer commands (see the documentation of these functions for details).
You can also perform 64-bit transfers to/from the PCI configuration space