Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CS 220 / ARM / ARM1176JZ-S Technical Reference Mmanual.pdf
Источник:
Скачиваний:
108
Добавлен:
16.04.2015
Размер:
4.47 Mб
Скачать

Level One Memory System

The base address of each TCM can be placed anywhere in the physical address map, and does not have to be backed by memory implemented externally. The Instruction and Data TCMs have separate base addresses.

You can disable each TCM to avoid an access being made to it. This gives a reduction in the power consumption. You can disable each TCM independently from the enabling of the associated cache, as determined by CP15 register c9. Disabling a TCM invalidates the base address, so there is no unexpected hit behavior for the TCM.

The timing of a TCM access is the same as for a cache access. The ARM1176JZ-S processor does not support wait states on the TCM interfaces.

Table 7-2 lists the access types for TCM configured as Non-secure.

 

 

Table 7-2 Access to Non-secure TCM

 

 

 

Access type

NS attribute of corresponding

Behavior

page table

 

 

 

 

 

Non-secure access

X

Access done on TCM

 

 

 

Secure access

0

TCM not visible, go to Level 2 memory

 

 

 

Secure access

1

access done on TCM.

 

 

 

Table 7-3 lists the access types for TCM configured as Secure.

 

 

Table 7-3 Access to Secure TCM

 

 

 

Access type

NS attribute of corresponding

Behavior

page table

 

 

 

 

 

Non-secure access

X

TCM not visible

 

 

 

Secure access

0

Access done on TCM

 

 

 

Secure access

1

TCM is not visible, go to Level 2 memory.

 

 

 

7.3.1TCM behavior

TCM forms a continuous area of memory that is always valid if the TCM is enabled. The TCM is used as part of the physical memory map of the system, and is not backed by a level of external memory with the same physical addresses. For this reason, the TCM behaves differently from the caches for regions of memory that are marked as being Write-Through Cacheable. In such regions, no external writes occur in the event of a write to memory locations contained in the TCM.

7.3.2Restriction on page table mappings

The TCMs are implemented in a physically indexed, physically addressed manner, giving the following behavior:

aliases to the same physical address can exist in memory regions that are held in the TCM.

As a result, the page mapping restrictions for the TCM are less restrictive than for the cache, as

Restrictions on page table mappings page coloring on page 6-41 describes.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

7-8

ID012410

Non-Confidential, Unrestricted Access

 

Level One Memory System

7.3.3Restriction on page table attributes

The page table entries that describe areas of memory that are handled by the TCM are remapped to normal, non-cacheable, non-shared type.

If the page table entry covers a region larger than the size of the TCM, then the attributes are ignored for the TCM region but still apply to the rest of the region covered by the page table entry.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

7-9

ID012410

Non-Confidential, Unrestricted Access

 

Level One Memory System

7.4DMA

The level one DMA provides a background route to transfer blocks of data to or from the TCMs. It is used to move large blocks, rather than individual words or small structures.

The level one DMA is initiated and controlled by accessing the appropriate CP15 registers and instructions, see DMA control on page 3-9. This register is common to the Secure and Non-secure world. DMA channels can be reserved for the Secure world only, or available for both worlds, see bit [18] in the c1, Non-Secure Access Control Register on page 3-55. This bit also determines the page tables, Secure or Non-secure, that DMA transfers use. In the Non-secure world, the read/write access of these DMA registers depends on Non-secure Access control register bit[18] value. Accessing these registers in the Non-secure world when not permitted, NSAC[18] clear, results in an Undefined exception.

The value of NSAC[18] is also used during access to the Main TLB for comparison with the NSTID of the TLB entries:

When the channel is defined as Non-secure, NSAC[18] set, the Non-secure page tables are used. DMA external accesses are done on Non-secure memory regions. For DMA internal access, only TCM defined as Non-secure can be accessed.

When the channel is defined as Secure. NSAC[18] clear, the Secure page tables are used. The DMA external or internal access depends on the value of the NS attribute in the corresponding descriptors. If the NS attribute in the descriptor, for external access, is reset, the DMA channel accesses external Secure memory. If the NS attribute is set, the DMA channel accesses external Non-secure memory. For internal access, the page descriptor selects the TCM and the DMA performs a security permission check before accessing the TCM.

The process specifies the internal start and end addresses and external start address, together with the direction of the DMA. The addresses specified are Virtual Addresses, and the level one DMA hardware includes translation of Virtual Addresses to Physical Addresses and checking of protection attributes.

The TLB, that TLB organization on page 6-4 describes, holds the page table entries for the DMA, and ensures that the entries in a TLB used by the DMA are consistent with the page tables. Errors, arising from protection checks, are signaled to the processor using an interrupt. Completion of the DMA can also be configured by software to signal the processor with an interrupt using the same interrupt to the processor that the error uses. The status of the DMA is read from the CP15 registers associated with the DMA.

The DMA controller is programmed using the CP15 coprocessor. DMA accesses can only be to or from the TCM and must not be from areas of memory that can be contained in the caches. That is, no coherency support is provided in the caches.

The processor implements two DMA channels. Only one channel can be active at a time. The key features of the DMA system are:

the DMA system runs in the background of processor operations

DMA progress is accessible from software

DMA is programmed with virtual addresses, with a MicroTLB dedicated to the DMA function

you can configure the DMA to work to either the instruction or data RAMs

DMA is allocated by a privileged process, enabling User access to control the DMA.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

7-10

ID012410

Non-Confidential, Unrestricted Access

 

Level One Memory System

For some DMA events an interrupt is generated. If the channel is configured as Non-secure the nDMAIRQ signal is asserted, otherwise if the channel is configured as Secure the nDMASIRQ

signal is asserted. When an external access caused by the DMA aborts, the processor asserts nDMAEXTERRIRQ. You can route these output pins to an external interrupt controller for

prioritization and masking. This is the only mechanism to signal the interrupt to the core. For more information, see c11, DMA Channel Status Register on page 3-117.

Each DMA channel has its own set of Control and Status Registers. The maximum number of DMA channels that can be defined is architecturally limited to 2. Only 1 DMA channel can be active at a time. If the other DMA channel has been started, it is queued to start performing memory operations after the currently active channel has completed. The level one DMA behaves as a distinct master from the rest of the processor, and the same mechanisms for handling Shared memory regions must be used if the external addresses being accessed by the level one DMA system are also accessed by the rest of the processor.

Memory attributes and types on page 6-20 describes these. If a User mode DMA transfer is performed using an external address that is not marked as Shared, an error is signaled by the DMA channel. There is no ordering requirement of memory accesses caused by the level one DMA relative to those generated by reads and writes by the processor, while a channel is running. When a channel has completed running, all its transactions are visible to all other observers in the system.

All memory accesses caused by the DMA occur in the order specified by the DMA channel, regardless of the memory type. If a DMA access is performed to Strongly Ordered memory, see Memory attributes and types on page 6-20, then a transaction caused by the DMA prevents any additional transactions being generated by the DMA until the point when the access is complete.

A transaction is complete when it has changed the state of the target location or data has been returned to the DMA. If the FCSE PID, the Domain Access Control Register, or the page table mappings are changed, or the TLB is flushed, while a DMA channel is in the Running or Queued state, then the DMA channel must be stopped.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

7-11

ID012410

Non-Confidential, Unrestricted Access

 

Соседние файлы в папке ARM