다음을 통해 공유


DMA 작업 인터페이스 버전 3

DMA 작업 인터페이스 버전 3은 Windows 8부터 사용할 수 있습니다. The DMA_OPERATIONS structure for this interface contains a number of new routines that are not defined in previous versions of this interface. For a list of the routines in version 3, see DMA_OPERATIONS.

모든 Windows 하드웨어 플랫폼에서 DMA 작업 인터페이스 버전 3을 사용할 수 있지만 이 인터페이스에는 커널 모드 드라이버가 SoC(System on a Chip) 통합 회로에서 시스템 DMA 컨트롤러의 고급 기능을 사용할 수 있도록 하는 많은 기능이 있습니다. 이러한 기능에는 일반적으로 분산/수집 DMA 전송을 수행하는 기능이 포함됩니다. 반면, 이전 버전의 DMA 작업 인터페이스는 버스 마스터 디바이스로 분산/수집 DMA 전송을 제한합니다. 버전 3 인터페이스는 분산/수집 목록의 관리를 간소화하고 복잡한 DMA 전송 중에 드라이버 개입의 필요성을 줄입니다.

DMA 작업 인터페이스 버전 3을 사용하여 DMA 전송을 수행하기 위해 드라이버는 일반적으로 다음 루틴을 호출합니다.

IoGetDmaAdapter
Allocates a DMA adapter object and returns a pointer to a DMA_ADAPTER structure that contains the DMA operations interface.

GetDmaTransferInfo
호출자가 설명하는 DMA 전송을 수행하는 데 필요한 리소스에 대한 설명을 제공합니다.

AllocateAdapterChannelEx
DMA 전송에 필요한 리소스를 할당하고 이러한 리소스를 DMA 어댑터 개체에 할당합니다.

MapTransferEx
DMA 전송을 위해 맵 레지스터 및 분산/수집 버퍼를 초기화하고 전송을 시작합니다.

FlushAdapterBuffersEx
DMA 전송이 끝날 때 필요할 수 있는 캐시 작업을 수행합니다.

FreeAdapterChannel
DMA 채널 및 지도 레지스터를 해제합니다.

PutDmaAdapter
어댑터 개체를 해제합니다.

이러한 루틴은 전용 DMA 컨트롤러를 사용하는 버스 마스터 디바이스와 시스템 DMA 컨트롤러를 공유하는 하위 디바이스 모두에 사용됩니다. 일반적인 DMA 전송 중에 드라이버가 수행하는 호출에 대한 단계별 설명은 버전 3 DMA 루틴에 대한 기본 호출 패턴을 참조하세요.

Note In version 3 of the DMA operations interface, calls to the KeFlushIoBuffers routine are not required either before or after DMA transfers. 그 이유는 다음 루틴에서 하드웨어에서 캐시 일관성을 적용하지 않는 플랫폼에서 데이터 캐시를 플러시해야 하는 필요성을 다루기 때문입니다.

  • MapTransferEx ensures that processor data caches are flushed before write (memory-to-device) transfers.
  • FlushAdapterBuffersEx ensures that caches are invalidated after read (device-to-memory) transfers.

On an x86 or x64 processor, the KeFlushIoBuffers call performs no operations, and this call, while unnecessary, does not interfere with the operation of the hardware platform. On an Arm processor, calls to KeFlushIoBuffers during DMA transfers perform cache operations that are unnecessary and can degrade performance.