MicroBlaze Processor Reference Guide
63
UG081 (v14.7)
Virtual-Memory Management
A TLB entry with TID=0x00 represents a process-independent translation. Pages that are
accessed globally by all processes should be assigned a TID value of 0x00.
•
Execution—The processor executes instructions only if they are fetched from a virtual page
marked as executable (TLBLO[EX]=1). Clearing TLBLO[EX] to 0 prevents execution of
instructions fetched from a page, instead causing an instruction-storage interrupt (ISI) to occur.
The ISI does not occur when the instruction is fetched, but instead occurs when the instruction
is executed. This prevents speculatively fetched instructions that are later discarded (rather
than executed) from causing an ISI.
The zone-protection register can override execution protection.
•
Read/Write—Data is written only to virtual pages marked as writable (TLBLO[WR]=1).
Clearing TLBLO[WR] to 0 marks a page as read-only. An attempt to write to a read-only page
causes a data-storage interrupt (DSI) to occur.
The zone-protection register can override write protection.
TLB entries cannot be used to prevent programs from reading pages. In virtual mode, zone
protection is used to read-protect pages. This is done by defining a no-access-allowed zone
(ZPR[Zn] = 00) and using it to override the TLB-entry access protection. Only programs running in
user mode can be prevented from reading a page. Privileged programs always have read access to a
page.
Zone Protection
Zone protection is used to override the access protection specified in a TLB entry. Zones are an
arbitrary grouping of virtual pages with common access protection. Zones can contain any number
of pages specifying any combination of page sizes. There is no requirement for a zone to contain
adjacent pages.
The zone-protection register (ZPR) is a 32-bit register used to specify the type of protection override
applied to each of 16 possible zones. The protection override for a zone is encoded in the ZPR as a
2-bit field. The 4-bit zone-select field in a TLB entry (TLBLO[ZSEL]) selects one of the 16 zone
fields from the ZPR (Z0–Z15). For example, zone Z5 is selected when ZSEL = 0101.
Changing a zone field in the ZPR applies a protection override across all pages in that zone. Without
the ZPR, protection changes require individual alterations to each page translation entry within the
zone.
Unimplemented zones (when
C_MMU_ZONES
< 16) are treated as if they contained 11.
UTLB Management
The UTLB serves as the interface between the processor MMU and memory-management software.
System software manages the UTLB to tell the MMU how to translate virtual addresses into
physical addresses. When a problem occurs due to a missing translation or an access violation, the
MMU communicates the problem to system software using the exception mechanism. System
software is responsible for providing interrupt handlers to correct these problems so that the MMU
can proceed with memory translation.
Software reads and writes UTLB entries using the MFS and MTS instructions, respectively. These
instructions use the TLBX register index (numbered 0 to 63) corresponding to one of the 64 entries
in the UTLB. The tag and data portions are read and written separately, so software must execute
two MFS or MTS instructions to completely access an entry. The UTLB is searched for a specific
translation using the TLBSX register. TLBSX locates a translation using an effective address and
loads the corresponding UTLB index into the TLBX register.
Содержание MicroBlaze
Страница 1: ...MicroBlaze Processor Reference Guide Embedded Development Kit EDK 14 7 UG081 v14 7...
Страница 4: ...MicroBlaze Processor Reference Guide www xilinx com UG081 v14 7...
Страница 8: ...8 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Chapter 1 Introduction Send Feedback...
Страница 262: ...262 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Send Feedback...