最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

LLI – Linked Lists

工作和技术 crifan 1857浏览 0评论

Section 2.16. Linked Lists

Applies to: PL08x DMAC

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.

转载请注明:在路上 » LLI – Linked Lists

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
79 queries in 0.190 seconds, using 22.11MB memory