Chinaunix首页 | 论坛 | 博客
  • 博客访问: 316651
  • 博文数量: 63
  • 博客积分: 2018
  • 博客等级: 大尉
  • 技术积分: 694
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-23 16:34
文章存档

2010年(63)

我的朋友

分类: LINUX

2010-09-14 10:49:52

What are linked lists and why are they used in the DMA controller?

A linked list is a list of elements that include pointers to the next element in the list. This means that elements can be placed anywhere in memory and created and removed individually without affecting elements around them. They can be used to create arrays of unknown size in memory.

Linked lists are used in the DMA controller to support scatter/gathering through the DMACCxLLI register. This means that the source and destination areas do not need to occupy contiguous areas in memory. Where scatter/gather is not required, the DMACCxLLI register must be set to 0.

The source and destination data areas are defined by a series of linked lists and each LLI controls the transfer of one block of data, and then optionally loads a further LLI to continue the DMA operation, or stops the DMA stream. An example is given in Appendix C of the Technical Reference Manual.

Note that the DMACCxConfiguration DMA channel configuration register is not part of the linked list item and that the configuration registers are not updated when a new LLI is requested.

Note also that programming the DMACCxLLI register when the DMA channel is enabled has unpredictable side effects.

The LLI in the DMA controller consists of four words containing the Source address, Destination Address, LLI register and Control register in that order. For some systems, the LLI data structures can and should be made four-word aligned, to make the loading of LLIs more efficient. How to pogram the PrimeCell DMA controller for scatter/gather is given, in Section 3.6 on page 3-35 of the Technical Reference Manual.


How should the Linked Lists be Used With An MMU?

When using the DMAC with a MMU (Memory Management Unit) based system, the scatter/gather linked list is created and managed by application code running on the ARM core in virtual memory and is read by the DMAC in physical memory.

It must be ensured that the memory used for the linked list is flat-mapped, that is where virtual addresses and physical addresses are the same.

阅读(8245) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-09-14 14:52:53

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com