Книга: Writing Windows WDM Device Drivers
Appendix C Direct Memory Access
Appendix C
Direct Memory Access
This book does not cover Direct Memory Access (DMA) in detail. However, NT 3.51 and NT 4 driver writers will find that they must access the DMA system routines in a new way. All the same routines are there, you just have to call IoGetDmaAdapter first. This returns a pointer to a DMA_ADAPTER object. The DmaOperations field in there contains pointers to all the familiar routines. Call the DmaOperations PutDmaAdapter callback when you have finished with the DMA_ADAPTER object.
Table C.1 shows the corresponding old and new routines. Just to reiterate, there is no kernel routine directly called PutDmaAdapter. This routine is only available through the DMA_ADAPTER structure, e.g.,
(*DmaAdapter->DmaOperations->PutDmaAdapter)(DmaAdapter);
Table C.1 Old and new DMA routines
Old | New | New DmaOperations routine | Description |
---|---|---|---|
HalGetAdapter |
IoGetDmaAdapter |
||
PutDmaAdapter |
Release DmaAdapter |
||
HalAllocateCommonBuffer |
AllocateCommonBuffer |
||
HalFreeCommonBuffer |
FreeCommonBuffer |
||
IoAllocateAdapterChannel |
AllocateAdapterChannel |
||
IoFlushAdapterBuffers |
FlushAdapterBuffers |
||
IoFreeAdapterChannel |
FreeAdapterChannel |
||
IoFreeMapRegisters |
FreeMapRegisters |
||
IoMapTransfer |
MapTransfer |
||
HalGetDmaAlignmentRequirement |
GetDmaAlignment |
Get alignment requirements for DMA buffers | |
HalReadDmaCounter |
ReadDmaCounter |
Get number of bytes remaining to be transferred | |
GetScatterGatherList |
|||
PutScatterGatherList |
- Preface
- Chapter 1 Introduction
- Chapter 2 The Big Picture
- Chapter 3 Device Driver Design
- Chapter 4 WDM Driver Environment
- Chapter 5 Device Interfaces
- Chapter 6 Testing and Debugging
- Chapter 7 Dispatch Routines
- Chapter 8 Plug and Play and Device Stacks
- Chapter 9 Plug and Play Implementation
- Chapter 10 Power Management
- Chapter 11 Installation
- Chapter 12 Windows Management Instrumentation
- Chapter 13 Event Reporting
- Chapter 14 DebugPrint
- Chapter 15 WdmIo and PHDIo Drivers
- Chapter 16 Hardware I/O IRP Queuing
- Chapter 17 Interrupt-Driven I/O
- Chapter 18 NT Hardware
- Chapter 19 WDM System Drivers
- Chapter 20 The Universal Serial Bus
- Chapter 21 USB Driver Interface
- Chapter 22 The Human Input Device Model
- Chapter 23 HID Clients
- Appendix A Information Resources
- Appendix B PC 99
- Appendix C Direct Memory Access
- Glossary Acronyms and Tools
- Сноски из книги
- Содержание книги
- Популярные страницы
- Appendix C Direct Memory Access
- Практическая работа 53. Запуск Access. Работа с объектами базы данных
- Безопасность внешних таблиц. Параметр EXTERNAL FILE DIRECTORY
- EVENT MEMORY SIZE
- ТМР DIRECTORY
- EXTERNAL FUNCTION DIRECTORY
- Appendix A. Detailed explanations of special commands
- Appendix B. Common problems and questions
- Appendix C. ICMP types
- Appendix D. TCP options
- Appendix E. Other resources and links
- Appendix F. Acknowledgments