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

Memory Management Unit

2.If A1 and A2 are generated by the same instruction, then:

If A1 and A2 are the load and store generated by a SWP or SWPB instruction, then:

A1 < A2 if A1 is the load and A2 is the store

A2 < A1 if A2 is the load and A1 is the store.

If A1 and A2 are two word loads generated by an LDC, LDRD, or LDM instruction, or two word stores generated by an STC, STRD, or STM instruction, but excluding LDM or STM instructions whose register list includes the PC, then:

A1 <= A2 if the address of A1 is less than the address of A2

A2 <= A1 if the address of A2 is less than the address of A1.

If A1 and A2 are two word loads generated by an LDM instruction whose register list includes the PC or two word stores generated by an STM instruction whose register list includes the PC, then the program order of the memory operations is not defined.

Multiple load and store instructions, such as LDM, LDRD, STM, and STRD, generate multiple word accesses, each being a separate access to determine ordering.

6.7.5Explicit Memory Barriers

This section describes two explicit Memory Barrier operations:

Data Memory Barrier

Data Synchronization Barrier.

In addition, to ensure correct operation where the processor writes code, an explicit Flush

Prefetch Buffer operation is provided.

These operations are implemented by writing to the CP15 Cache operation register c7. For details on how to use this register see c7, Cache operations on page 3-69. For more information on explicit memory barriers, see the ARM Architecture Reference Manual.

Data Memory Barrier

This memory barrier ensures that all explicit memory transactions occurring in program order before this instruction are completed. No explicit memory transactions occurring in program order after this instruction are started until this instruction completes. Other instructions can complete out of order with the Data Memory Barrier instruction.

Data Synchronization Barrier

This memory barrier completes when all explicit memory transactions occurring in program order before this instruction are completed. No explicit memory transactions occurring in program order after this instruction are started until this instruction completes. In fact, no instructions occurring in program order after the Data Synchronization Barrier complete, or change the interrupt masks, until this instruction completes.

Flush Prefetch Buffer

The Flush Prefetch Buffer operation flushes the pipeline in the processor, so that all instructions following the pipeline flush are fetched from memory, including the cache, after the instruction has been completed. Combined with Data Synchronization Barrier, and potentially invalidating the Instruction Cache, this ensures that any instructions written by the processor are executed. This guarantee is required as part of the mechanism for handling self-modifying code.

Performing a Data Synchronization Barrier operation and invalidating the Instruction Cache and Branch Target Cache are also required for the handling of self-modifying code. The Flush

ARM DDI 0333H

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

6-25

ID012410

Non-Confidential, Unrestricted Access

 

Memory Management Unit

Prefetch Buffer is guaranteed to perform this function, while alternative methods of performing the same task, such as a branch instruction, can be optimized in the hardware to avoid the pipeline flush, for example, by using a branch predictor.

6.7.6Backwards compatibility

The ARMv6 memory attributes are significantly different from those in previous versions of the architecture. Table 6-10 lists the interpretation of the earlier memory types in the light of this definition.

Table 6-10 Memory region backwards compatibility

Previous architectures

ARMv6 attribute

 

 

NCNB, Noncacheable, Non Bufferable

Strongly Ordered

 

 

NCB, Noncacheable, Bufferable

Shared Device

 

 

Write-Through, Cacheable, Bufferable

Non-Shared Normal, Write-Through Cacheable

 

 

Write-Back, Cacheable, Bufferable

Non-Shared Normal, Write-Back Cacheable

 

 

ARM DDI 0333H

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

6-26

ID012410

Non-Confidential, Unrestricted Access

 

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