PowerPC e500 Core Family Reference Manual, Rev. 1
3-32
Freescale Semiconductor
Instruction Model
All accesses in this set are ordered as one set; there is not one order for guarded,
caching-inhibited loads and stores and another for write-through-required stores.
•
Stores to memory that are caching-allowed, write-through not required, and
memory-coherency required. mbar (MO = 1) controls the order in which accesses are
performed with respect to coherent memory. It ensures that, with respect to coherent
memory, applicable stores caused by instructions before the mbar complete before any
applicable stores caused by instructions after it.
Except for dcbz and dcba, mbar (MO = 1) does not affect the order of cache operations (whether
caused explicitly by a cache management instruction or implicitly by the cache coherency
mechanism). Also. mbar does not affect the order of accesses in one set with respect to accesses
in the other.
mbar (MO = 1) may complete before memory accesses caused by instructions preceding it have
been performed with respect to main memory or coherent memory as appropriate. mbar (MO = 1)
is intended for use in managing shared data structures, in accessing memory-mapped I/O, and in
preventing load/store combining operations in main memory. For the first use, the shared data
structure and the lock that protects it must be altered only by stores that are in the same set (for
both cases described above). For the second use, mbar (MO = 1) can be thought of as placing a
barrier into the stream of memory accesses issued by a core, such that any given memory access
appears to be on the same side of the barrier to both the core and the I/O device.
Because the core performs store operations in order to memory that is designated as both
caching-inhibited and guarded, mbar (MO = 1) is needed for such memory only when loads must
be ordered with respect to stores or with respect to other loads.
Note that mbar (MO = 1) does not connect hardware considerations to it such as multiprocessor
implementations that send an mbar (MO = 1) address-only broadcast (useful in some designs).
For example, if a design has an external buffer that re-orders loads and stores for better bus
efficiency, mbar (MO = 1) broadcasts signals to that buffer that previous loads/stores (marked
caching-inhibited, guarded, or write-through required) must complete before any following
loads/stores (marked caching-inhibited, guarded, or write-through required).
Section 3.5.1, “Lock Acquisition and Import Barriers
,” describes how the msync and mbar
instructions can be used to control memory access ordering when memory is shared between
programs.
3.3.1.7
Atomic Update Primitives Using lwarx and stwcx.
The lwarx and stwcx. instructions together permit atomic update of a memory location. Book E
provides word and double-word forms of each of these instructions. Described here is the
operation of lwarx and stwcx..
Содержание PowerPC e500 Core
Страница 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Страница 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Страница 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Страница 316: ...PowerPC e500 Core Family Reference Manual Rev 1 7 18 Freescale Semiconductor Performance Monitor...
Страница 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Страница 362: ...PowerPC e500 Core Family Reference Manual Rev 1 10 26 Freescale Semiconductor Auxiliary Processing Units APUs...
Страница 440: ...PowerPC e500 Core Family Reference Manual Rev 1 A 8 Freescale Semiconductor Programming Examples...
Страница 444: ...PowerPC e500 Core Family Reference Manual Rev 1 B 4 Freescale Semiconductor Guidelines for 32 Bit Book E...
Страница 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Страница 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...