Validation

Describes the DMA test code to validate the port of DMA framework.

The same set of source code is used to build two different DMA test harnesses:

  1. It builds: T_DMASIM.EXE, D_DMASIM.LDD, and DMASIM.DLL. This is a software-simulated implementation of DMA. This harness is used mainly for debugging and validating the PIL (platform-independent layer) as it simulates every kind of DMA controller. The DMA simulator and associated PSL (platform-specific layer) is in ...\e32test\dma\dmasim.cpp.

  2. It builds: T_DMA.EXE, D_DMA.LDD. The source code for building these executables is in ...\e32test\dma\t_dma.cpp and ...\e32test\dma\d_dma.cpp respectively

T_DMA.EXE is a user-side harness, and is an automatic test included in the E32TEST suite. It assumes that the underlying DMA controller supports memory to memory transfers. This executable delegates most of the work to D_DMA.LDD (built from base\e32test\dma\d_dma.cpp), a logical device driver that acts as a client for the DMA Framework. D_DMA.LDD links statically against DMA.DLL, the DMA Framework kernel extension and as such must be built from the variant.

T_DMA.EXE delegates most of the work to D_DMA.LDD, which is a logical device driver that acts as a client for the DMA Framework. D_DMA.LDD links statically against DMA.DLL, the DMA Framework kernel extension, and as such must be built from the variant. In practice, this means that D_DMA.LDD must be specified in the test bld.inf for the variant being ported. See ...\template_variant\test\bld.inf for an example.

D_DMA.LDD calls the DmaTestInfo() function in the PSL to discover the capacities of the PSL: number of channels, maximum transfer size, etc. This is the template implementation:

TDmaTestInfo TestInfo =
    {
    0,
    0,
    0,
    0,
    NULL,
    0,
    NULL,
    0,
    NULL
    };

EXPORT_C const TDmaTestInfo& DmaTestInfo()
//
//
//
    {
    return TestInfo;
    }