
Chapter 10. Memory Management Unit (MMU)
For More Information On This Product,
Go to: www.freescale.com
10-5
Virtual Memory Management Architecture
and physical-address tagged. If instruction and data cache addresses are not larger than the
in-page address for the smallest active MMU page, the cache is considered physically
accessed, but if they are larger, the cache can have aliasing problems between virtual and
cache addresses. Software handles these problems by forcing the virtual address to be equal
to the physical address for those bits addressing the cache but above the in-page address of
the smallest active page size. The number of these bits depends on cache and page sizes.
Caches are addressed with the virtual address because the cache uses synchronous memory
elements, and an access starts at the rising-clock edge of the first K-Bus pipeline stage. The
MMU provides a physical address midway through this cycle.
If the cache set address has fewer bits than the in-page address, the cache is considered
physically addressed because these bits are the same in the virtual and physical addresses.
If the cache set address has more bits than the in-page address, one or more of the low-order
virtual page number bits are used to address the cache. The MMU translates these bits; the
resulting low-order physical page number bits are used to determine cache hits.
Address aliasing problems occur when two virtual addresses access one physical page. This
is generally allowed and, if the page is cacheable, one coherent copy of the page image is
mapped in the cache at any time.
If multiple virtual addresses pointing to the same physical address differ only in the
low-order virtual page number bits, conflicting copies can be allocated. For an 8-Kbyte,
4-way set-associative cache with a 16-byte line size, the cache set address uses address bits
10–4. If virtual addresses 0x0_1000 and 0x0_1400 are mapped to physical address
0x0_1000, using virtual address 0x0_1000 loads cache set 0x00, while using virtual
address 0x0_1400 loads cache set 0x40. This puts two copies of the same physical address
in the cache making this memory space not coherent. To avoid this problem, software must
force low-order virtual page number bits to be equal to low-order physical address bits for
all bits used to address the cache set.
10.2.3.6 Supervisor/User Stack Pointers
To isolate supervisor and user modes, CF4e implements two A7 register stack pointers, one
for supervisor mode and one for user mode. Two former M680x0 privileged instructions to
load and store the user stack pointer are restored in the instruction set architecture.
10.2.3.7 Access Error Stack Frame
K-Bus accesses that fault (that is, terminate with a K-Bus transfer error acknowledge)
generate an access error exception. MMU TLB misses and access violations use the same
fault. To quickly determine if a fault was due to a TLB miss or another type of access error,
new fault status field (FS) encodings signal TLB misses on the following:
Instruction fetch
Instruction extension fetch
Data read
F
Freescale Semiconductor, Inc.
n
.