MPC5604B/C Microcontroller Reference Manual, Rev. 8
Freescale Semiconductor 323
Figure 18-10 is not intended to be a schematic of the actual access evaluation macro, but rather a
generalized block diagram showing the major functions included in this logic block.
18.6.1.1 Access evaluation – Hit determination
To evaluate the region hit determination, the MPU uses two magnitude comparators in conjunction with
the contents of a region descriptor: the current access must be included between the region's “start” and
“end” addresses and simultaneously the region's valid bit must be active.
Recall there are no hardware checks to verify that region's “end” address is greater then region's “start”
address, and it is software’s responsibility to properly load appropriate values into these fields of the region
descriptor.
In addition to this, the optional process identifier is examined against the region descriptor’s PID and
PIDMASK fields. In order to generate the pid_hit indication: the current PID with its PIDMASK must be
equal to the region's PID with its PIDMASK. Also the process identifier enable is take into account in this
comparison so that the MPU forces the pid_hit term to be asserted in the case of AHB bus master doesn't
provide its process identifier.
18.6.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. The protection violation
logic then evaluates the access against the effective permissions using the specification shown in
Table 18-10.
As shown in Figure 18-10, the output of the protection violation logic is the error signal.
The access evaluation macro then uses the hit_b and error signals to form two outputs. The combined
(hit_b | error) signal is used to signal the current access is not allowed and (~hit_b & error) is used as the
input to MPU_EDRn (error detail register) in the event of an error.
Table 18-10. Protection violation definition
Description
Inputs Output
eff_rgd[r] eff_rgd[w] eff_rgd[x] Protection violation?
inst fetch read — — 0 yes, no x permission
inst fetch read — — 1 no, access is allowed
data read 0 — — yes, no r permission
data read 1 — — no, access is allowed
data write — 0 — yes, no w permission
data write — 1 — no, access is allowed