HalAllocateCommonBuffer 函数
来源:互联网 发布:感恩节文案 知乎 编辑:程序博客网 时间:2024/06/01 07:18
HalAllocateCommonBuffer 函数
PVOID HalAllocateCommonBuffer(
PDMA_ADAPTER_OBJECT DmaAdapter,
ULONG Length,
PPHYSICAL_ADDRESS LogicalAddress,
BOOLEAN CacheEnabled
);
是要alloc一塊memory給 "不認識virtual address" 的hardware用 (?)
參數中指定需要的大小 (Length) 和 CacheEable。並且指定是要給哪一個hardware用 (DmaAdaptor)。
pVirtDMABufferAddr =(PBYTE)HalAllocateCommonBuffer(&Adapter,(AUDIO_DMA_PAGE_SIZE),&PhysDMABufferAddr, FALSE);就會alloc一塊memory,memory的virtual address會return 回來,physical address 就放在 argument 的 "LogicalAddress" 中。
一般是給DMA用 (DMA只認識 physical address ?)
以 DMA 的 output channel 來看,allocate的memory,physical address要填入DMA的source pointer register。
DMA.SourceAddress = LogicalAddress。然後,driver要藉由DMA送出資料,就要寫入 pVirtDMABufferAddr
- HalAllocateCommonBuffer 函数
- HalAllocateCommonBuffer 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- 函数
- The server does not support version 3.0 of the J2EE Web module specification
- InstallShield 参考
- 过滤HTML标签
- android 知识点
- ImageMagick之convert命令大全
- HalAllocateCommonBuffer 函数
- EXCEL中插入"√"或"×"的处理
- KMP
- Silverlight ToolTip
- 在GA-P67A-D3-B3主板上装Windows Server 2003
- android弹出单选、多选菜单
- 不能错过的文章
- android---Timer和Handler
- C#中的Abstract