
Memory Protection Unit (MPU)
MPC5644A Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
271
13.5
Functional Description
In this section, the functional operation of the MPU is detailed. In particular, subsequent sections discuss
the operation of the access evaluation macro as well as the handling of error-terminated XBAR bus cycles.
13.5.1
Access Evaluation
As discussed, the basic operation of the MPU is performed in the access evaluation macro, a hardware
structure replicated in the two-dimensional connection matrix. The access evaluation macro inputs the
XBAR system bus address and the contents of a region descriptor (RGD
n
) and performs two major
functions: region hit determination and detection of an access protection violation.
13.5.1.1
Access Evaluation—Hit Determination
To determine if the current XBAR reference hits in the given region, two magnitude comparators are used
with the region’s start and end addresses. There are no hardware checks to verify that the region end
address is greater than or equal to the region start address. The software must properly load appropriate
values into these fields of the region descriptor.
In addition to the comparison of the XBAR reference address versus the region descriptor’s start and end
addresses, the optional process identifier is examined against the region descriptor’s PID and PIDMASK
fields. For XBAR bus masters that do not output a process identifier, the MPU forces the PID term to be
asserted.
13.5.1.2
Access Evaluation—Privilege Violation Determination
While the access evaluation macro is making the region hit determination, the logic is also evaluating if
the current access is allowed by the permissions defined in the region descriptor. Using the XBAR
supervisor/user mode signals, a set of permissions is generated from the appropriate fields in the region
descriptor. The protection violation logic evaluates the access against the effective permissions.
The access evaluation macro then uses the hit and permission signals to determine if the current access is
allowed and the MPU_EDR
n
(error detail register) is updated in the event of an error.
13.5.2
XBAR Error Terminations
For each XBAR slave port being monitored, the MPU tests any access for permission violations as above.
If a violation occurs, the MPU terminates the bus cycle and reports a protection error for three conditions:
1. If the access does not hit in any region descriptor, a protection error is reported.
2. If the access hits in a single region descriptor and that region signals a protection violation, a
protection error is reported.
3. If the access hits in multiple (overlapping) regions and all regions signal protection violations, then
a protection error is reported.
The third condition reflects that priority is given to permission granting over access denying for
overlapping regions as this approach provides more flexibility to system software in region descriptor
Summary of Contents for MPC5644A
Page 2: ...MPC5644A Microcontroller Reference Manual Rev 6 2 Freescale Semiconductor...
Page 24: ...MPC5644A Microcontroller Reference Manual Rev 6 24 Freescale Semiconductor...
Page 26: ...MPC5644A Microcontroller Reference Manual Rev 6 26 Freescale Semiconductor...
Page 52: ...Introduction MPC5644A Microcontroller Reference Manual Rev 6 52 Freescale Semiconductor...
Page 56: ...Memory Map MPC5644A Microcontroller Reference Manual Rev 6 56 Freescale Semiconductor...
Page 1228: ...Decimation Filter MPC5644A Microcontroller Reference Manual Rev 6 1228 Freescale Semiconductor...
Page 1440: ...FlexCAN Module MPC5644A Microcontroller Reference Manual Rev 6 1440 Freescale Semiconductor...