// True if the entry was brought in from a non-secure page table
bool nstid;
// Exception level on insert, AARCH64 EL0&1, AARCH32 -> el=1
- uint8_t el;
+ ExceptionLevel el;
// Type of memory
bool nonCacheable; // Can we wrap this in mtype?
innerAttrs(0), outerAttrs(0), ap(read_only ? 0x3 : 0), hap(0x3),
domain(DomainType::Client), mtype(MemoryType::StronglyOrdered),
longDescFormat(false), isHyp(false), global(false), valid(true),
- ns(true), nstid(true), el(0), nonCacheable(uncacheable),
+ ns(true), nstid(true), el(EL0), nonCacheable(uncacheable),
shareable(false), outerShareable(false), xn(0), pxn(0)
{
// no restrictions by default, hap = 0x3
pfn(0), size(0), vpn(0), attributes(0), lookupLevel(L1), asid(0),
vmid(0), N(0), innerAttrs(0), outerAttrs(0), ap(0), hap(0x3),
domain(DomainType::Client), mtype(MemoryType::StronglyOrdered),
- longDescFormat(false), isHyp(false), global(false), valid(true),
- ns(true), nstid(true), el(0), nonCacheable(false),
+ longDescFormat(false), isHyp(false), global(false), valid(false),
+ ns(true), nstid(true), el(EL0), nonCacheable(false),
shareable(false), outerShareable(false), xn(0), pxn(0)
{
// no restrictions by default, hap = 0x3
bool
match(Addr va, uint8_t _vmid, bool hypLookUp, bool secure_lookup,
- uint8_t target_el) const
+ ExceptionLevel target_el) const
{
return match(va, 0, _vmid, hypLookUp, secure_lookup, true, target_el);
}
bool
match(Addr va, uint16_t asn, uint8_t _vmid, bool hypLookUp,
- bool secure_lookup, bool ignore_asn, uint8_t target_el) const
+ bool secure_lookup, bool ignore_asn, ExceptionLevel target_el) const
{
bool match = false;
Addr v = vpn << N;
if (valid && va >= v && va <= v + size && (secure_lookup == !nstid) &&
(hypLookUp == isHyp))
{
- if (target_el == 2 || target_el == 3)
- match = (el == target_el);
- else
- match = (el == 0) || (el == 1);
+ match = checkELMatch(target_el);
+
if (match && !ignore_asn) {
match = global || (asn == asid);
}
return match;
}
+ bool
+ checkELMatch(ExceptionLevel target_el) const
+ {
+ if (target_el == EL2 || target_el == EL3) {
+ return (el == target_el);
+ } else {
+ return (el == EL0) || (el == EL1);
+ }
+ }
+
Addr
pAddr(Addr va) const
{
}
void
- serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE
+ serialize(CheckpointOut &cp) const override
{
SERIALIZE_SCALAR(longDescFormat);
SERIALIZE_SCALAR(pfn);
paramOut(cp, "domain", domain_);
}
void
- unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE
+ unserialize(CheckpointIn &cp) override
{
UNSERIALIZE_SCALAR(longDescFormat);
UNSERIALIZE_SCALAR(pfn);