scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL1, haveSecurity && !scr.ns,
- mbits(newVal, 31,12), false);
+ mbits(newVal, 31,12));
tlbiOp(tc);
return;
scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL1, haveSecurity && !scr.ns,
- mbits(newVal, 31,12), false);
+ mbits(newVal, 31,12));
tlbiOp.broadcast(tc);
return;
scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL2, haveSecurity && !scr.ns,
- mbits(newVal, 31,12), true);
+ mbits(newVal, 31,12));
tlbiOp(tc);
return;
scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL2, haveSecurity && !scr.ns,
- mbits(newVal, 31,12), true);
+ mbits(newVal, 31,12));
tlbiOp.broadcast(tc);
return;
{
assert32(tc);
- TLBIALLN tlbiOp(EL1, false);
+ TLBIALLN tlbiOp(EL1);
tlbiOp(tc);
return;
}
{
assert32(tc);
- TLBIALLN tlbiOp(EL1, false);
+ TLBIALLN tlbiOp(EL1);
tlbiOp.broadcast(tc);
return;
}
{
assert32(tc);
- TLBIALLN tlbiOp(EL2, true);
+ TLBIALLN tlbiOp(EL2);
tlbiOp(tc);
return;
}
{
assert32(tc);
- TLBIALLN tlbiOp(EL2, true);
+ TLBIALLN tlbiOp(EL2);
tlbiOp.broadcast(tc);
return;
}
scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL1, haveSecurity && !scr.ns,
- static_cast<Addr>(bits(newVal, 43, 0)) << 12, false);
+ static_cast<Addr>(bits(newVal, 43, 0)) << 12);
tlbiOp(tc);
return;
scr = readMiscReg(MISCREG_SCR, tc);
TLBIMVAA tlbiOp(EL1, haveSecurity && !scr.ns,
- static_cast<Addr>(bits(newVal, 43, 0)) << 12, false);
+ static_cast<Addr>(bits(newVal, 43, 0)) << 12);
tlbiOp.broadcast(tc);
return;
/*
- * Copyright (c) 2010-2013, 2016-2018 ARM Limited
+ * Copyright (c) 2010-2013, 2016-2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
}
void
-TLB::flushAllNs(bool hyp, uint8_t target_el, bool ignore_el)
+TLB::flushAllNs(uint8_t target_el, bool ignore_el)
{
+ bool hyp = target_el == EL2;
+
DPRINTF(TLB, "Flushing all NS TLB entries (%s lookup)\n",
(hyp ? "hyp" : "non-hyp"));
int x = 0;
DPRINTF(TLB, "Flushing TLB entries with mva: %#x, asid: %#x "
"(%s lookup)\n", mva, asn, (secure_lookup ?
"secure" : "non-secure"));
- _flushMva(mva, asn, secure_lookup, false, false, target_el);
+ _flushMva(mva, asn, secure_lookup, false, target_el);
flushTlbMvaAsid++;
}
}
void
-TLB::flushMva(Addr mva, bool secure_lookup, bool hyp, uint8_t target_el)
+TLB::flushMva(Addr mva, bool secure_lookup, uint8_t target_el)
{
DPRINTF(TLB, "Flushing TLB entries with mva: %#x (%s lookup)\n", mva,
(secure_lookup ? "secure" : "non-secure"));
- _flushMva(mva, 0xbeef, secure_lookup, hyp, true, target_el);
+ _flushMva(mva, 0xbeef, secure_lookup, true, target_el);
flushTlbMva++;
}
void
-TLB::_flushMva(Addr mva, uint64_t asn, bool secure_lookup, bool hyp,
+TLB::_flushMva(Addr mva, uint64_t asn, bool secure_lookup,
bool ignore_asn, uint8_t target_el)
{
TlbEntry *te;
// D5.7.2: Sign-extend address to 64 bits
mva = sext<56>(mva);
+
+ bool hyp = target_el == EL2;
+
te = lookup(mva, asn, vmid, hyp, secure_lookup, false, ignore_asn,
target_el);
while (te != NULL) {
}
void
-TLB::flushIpaVmid(Addr ipa, bool secure_lookup, bool hyp, uint8_t target_el)
+TLB::flushIpaVmid(Addr ipa, bool secure_lookup, uint8_t target_el)
{
assert(!isStage2);
- stage2Tlb->_flushMva(ipa, 0xbeef, secure_lookup, hyp, true, target_el);
+ stage2Tlb->_flushMva(ipa, 0xbeef, secure_lookup, true, target_el);
}
bool
/*
- * Copyright (c) 2010-2013, 2016, 2018 ARM Limited
+ * Copyright (c) 2010-2013, 2016, 2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
/** Remove all entries in the non secure world, depending on whether they
* were allocated in hyp mode or not
- * @param hyp if the opperation affects hyp mode
*/
- void flushAllNs(bool hyp, uint8_t target_el, bool ignore_el = false);
+ void flushAllNs(uint8_t target_el, bool ignore_el = false);
/** Reset the entire TLB. Used for CPU switching to prevent stale
/** Remove all entries that match the va regardless of asn
* @param mva address to flush from cache
* @param secure_lookup if the operation affects the secure world
- * @param hyp if the operation affects hyp mode
*/
- void flushMva(Addr mva, bool secure_lookup, bool hyp, uint8_t target_el);
+ void flushMva(Addr mva, bool secure_lookup, uint8_t target_el);
/**
* Invalidate all entries in the stage 2 TLB that match the given ipa
* and the current VMID
* @param ipa the address to invalidate
* @param secure_lookup if the operation affects the secure world
- * @param hyp if the operation affects hyp mode
*/
- void flushIpaVmid(Addr ipa, bool secure_lookup, bool hyp, uint8_t target_el);
+ void flushIpaVmid(Addr ipa, bool secure_lookup, uint8_t target_el);
Fault trickBoxCheck(const RequestPtr &req, Mode mode,
TlbEntry::DomainType domain);
* @param mva virtual address to flush
* @param asn contextid/asn to flush on match
* @param secure_lookup if the operation affects the secure world
- * @param hyp if the operation affects hyp mode
* @param ignore_asn if the flush should ignore the asn
*/
void _flushMva(Addr mva, uint64_t asn, bool secure_lookup,
- bool hyp, bool ignore_asn, uint8_t target_el);
+ bool ignore_asn, uint8_t target_el);
bool checkELMatch(uint8_t target_el, uint8_t tentry_el, bool ignore_el);
/*
- * Copyright (c) 2018 ARM Limited
+ * Copyright (c) 2018-2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
void
TLBIALLN::operator()(ThreadContext* tc)
{
- getITBPtr(tc)->flushAllNs(hyp, targetEL);
- getDTBPtr(tc)->flushAllNs(hyp, targetEL);
+ getITBPtr(tc)->flushAllNs(targetEL);
+ getDTBPtr(tc)->flushAllNs(targetEL);
CheckerCPU *checker = tc->getCheckerCpuPtr();
if (checker) {
- getITBPtr(checker)->flushAllNs(hyp, targetEL);
- getDTBPtr(checker)->flushAllNs(hyp, targetEL);
+ getITBPtr(checker)->flushAllNs(targetEL);
+ getDTBPtr(checker)->flushAllNs(targetEL);
}
}
void
TLBIMVAA::operator()(ThreadContext* tc)
{
- getITBPtr(tc)->flushMva(addr, secureLookup, hyp, targetEL);
- getDTBPtr(tc)->flushMva(addr, secureLookup, hyp, targetEL);
+ getITBPtr(tc)->flushMva(addr, secureLookup, targetEL);
+ getDTBPtr(tc)->flushMva(addr, secureLookup, targetEL);
CheckerCPU *checker = tc->getCheckerCpuPtr();
if (checker) {
- getITBPtr(checker)->flushMva(addr, secureLookup, hyp, targetEL);
- getDTBPtr(checker)->flushMva(addr, secureLookup, hyp, targetEL);
+ getITBPtr(checker)->flushMva(addr, secureLookup, targetEL);
+ getDTBPtr(checker)->flushMva(addr, secureLookup, targetEL);
}
}
TLBIIPA::operator()(ThreadContext* tc)
{
getITBPtr(tc)->flushIpaVmid(addr,
- secureLookup, false, targetEL);
+ secureLookup, targetEL);
getDTBPtr(tc)->flushIpaVmid(addr,
- secureLookup, false, targetEL);
+ secureLookup, targetEL);
CheckerCPU *checker = tc->getCheckerCpuPtr();
if (checker) {
getITBPtr(checker)->flushIpaVmid(addr,
- secureLookup, false, targetEL);
+ secureLookup, targetEL);
getDTBPtr(checker)->flushIpaVmid(addr,
- secureLookup, false, targetEL);
+ secureLookup, targetEL);
}
}
/*
- * Copyright (c) 2018 ARM Limited
+ * Copyright (c) 2018-2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
class TLBIALLN : public TLBIOp
{
public:
- TLBIALLN(ExceptionLevel _targetEL, bool _hyp)
- : TLBIOp(_targetEL, false), hyp(_hyp)
+ TLBIALLN(ExceptionLevel _targetEL)
+ : TLBIOp(_targetEL, false)
{}
void operator()(ThreadContext* tc) override;
-
- protected:
- bool hyp;
};
/** TLB Invalidate by VA, All ASID */
{
public:
TLBIMVAA(ExceptionLevel _targetEL, bool _secure,
- Addr _addr, bool _hyp)
- : TLBIOp(_targetEL, _secure), addr(_addr), hyp(_hyp)
+ Addr _addr)
+ : TLBIOp(_targetEL, _secure), addr(_addr)
{}
void operator()(ThreadContext* tc) override;
protected:
Addr addr;
- bool hyp;
};
/** TLB Invalidate by VA */