Giacomo Travaglini has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45186 )
Change subject: arch-arm: Using 16 bit VMID
......................................................................
arch-arm: Using 16 bit VMID
Change-Id: Ia4f408b8e84b5f52f6b48fd5d4bbc2a5fac87154
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45186
Reviewed-by: Richard Cooper <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/arm/pagetable.hh
M src/arch/arm/table_walker.cc
M src/arch/arm/table_walker.hh
M src/arch/arm/tlb.cc
M src/arch/arm/tlb.hh
M src/arch/arm/types.hh
6 files changed, 15 insertions(+), 11 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
Richard Cooper: Looks good to me, approved
Giacomo Travaglini: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/pagetable.hh b/src/arch/arm/pagetable.hh
index a8c3a14..35053b2 100644
--- a/src/arch/arm/pagetable.hh
+++ b/src/arch/arm/pagetable.hh
@@ -44,6 +44,7 @@
#include <cstdint>
#include "arch/arm/page_size.hh"
+#include "arch/arm/types.hh"
#include "arch/arm/utility.hh"
#include "sim/serialize.hh"
@@ -109,7 +110,7 @@
// use (AArch32 w/ LPAE and AArch64)
uint16_t asid; // Address Space Identifier
- uint8_t vmid; // Virtual machine Identifier
+ vmid_t vmid; // Virtual machine Identifier
uint8_t N; // Number of bits in pagesize
uint8_t innerAttrs;
uint8_t outerAttrs;
@@ -188,22 +189,22 @@
}
bool
- match(Addr va, uint8_t _vmid, bool hypLookUp, bool secure_lookup,
+ match(Addr va, vmid_t _vmid, bool hyp_lookup, bool secure_lookup,
ExceptionLevel target_el, bool in_host) const
{
- return match(va, 0, _vmid, hypLookUp, secure_lookup, true,
+ return match(va, 0, _vmid, hyp_lookup, secure_lookup, true,
target_el, in_host);
}
bool
- match(Addr va, uint16_t asn, uint8_t _vmid, bool hypLookUp,
+ match(Addr va, uint16_t asn, vmid_t _vmid, bool hyp_lookup,
bool secure_lookup, bool ignore_asn, ExceptionLevel target_el,
bool in_host) const
{
bool match = false;
Addr v = vpn << N;
if (valid && va >= v && va <= v + size && (secure_lookup
== !nstid) &&
- (hypLookUp == isHyp))
+ (hyp_lookup == isHyp))
{
match = checkELMatch(target_el, in_host);
diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc
index 1b36f93..7218e15 100644
--- a/src/arch/arm/table_walker.cc
+++ b/src/arch/arm/table_walker.cc
@@ -189,7 +189,7 @@
Fault
TableWalker::walk(const RequestPtr &_req, ThreadContext *_tc, uint16_t
_asid,
- uint8_t _vmid, bool _isHyp, TLB::Mode _mode,
+ vmid_t _vmid, bool _isHyp, TLB::Mode _mode,
TLB::Translation *_trans, bool _timing, bool _functional,
bool secure, TLB::ArmTranslationType tranType,
bool _stage2Req)
diff --git a/src/arch/arm/table_walker.hh b/src/arch/arm/table_walker.hh
index 4f0373a..7788747 100644
--- a/src/arch/arm/table_walker.hh
+++ b/src/arch/arm/table_walker.hh
@@ -44,6 +44,7 @@
#include "arch/arm/regs/misc.hh"
#include "arch/arm/system.hh"
#include "arch/arm/tlb.hh"
+#include "arch/arm/types.hh"
#include "mem/request.hh"
#include "params/ArmTableWalker.hh"
#include "sim/clocked_object.hh"
@@ -744,7 +745,7 @@
/** ASID that we're servicing the request under */
uint16_t asid;
- uint8_t vmid;
+ vmid_t vmid;
bool isHyp;
/** Translation state for delayed requests */
@@ -941,7 +942,7 @@
PortID idx=InvalidPortID) override;
Fault walk(const RequestPtr &req, ThreadContext *tc,
- uint16_t asid, uint8_t _vmid,
+ uint16_t asid, vmid_t _vmid,
bool _isHyp, TLB::Mode mode, TLB::Translation *_trans,
bool timing, bool functional, bool secure,
TLB::ArmTranslationType tranType, bool _stage2Req);
diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc
index bf6d0bb..c367d47 100644
--- a/src/arch/arm/tlb.cc
+++ b/src/arch/arm/tlb.cc
@@ -164,7 +164,7 @@
}
TlbEntry*
-TLB::lookup(Addr va, uint16_t asn, uint8_t vmid, bool hyp, bool secure,
+TLB::lookup(Addr va, uint16_t asn, vmid_t vmid, bool hyp, bool secure,
bool functional, bool ignore_asn, ExceptionLevel target_el,
bool in_host, BaseTLB::Mode mode)
{
diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh
index 5aa72b5..3d531b7 100644
--- a/src/arch/arm/tlb.hh
+++ b/src/arch/arm/tlb.hh
@@ -222,7 +222,7 @@
* @param mode to differentiate between read/writes/fetches.
* @return pointer to TLB entry if it exists
*/
- TlbEntry *lookup(Addr vpn, uint16_t asn, uint8_t vmid, bool hyp,
+ TlbEntry *lookup(Addr vpn, uint16_t asn, vmid_t vmid, bool hyp,
bool secure, bool functional,
bool ignore_asn, ExceptionLevel target_el,
bool in_host, BaseTLB::Mode mode);
@@ -423,7 +423,7 @@
bool isHyp;
TTBCR ttbcr;
uint16_t asid;
- uint8_t vmid;
+ vmid_t vmid;
PRRR prrr;
NMRR nmrr;
HCR hcr;
diff --git a/src/arch/arm/types.hh b/src/arch/arm/types.hh
index c3e8db9..2ec5255 100644
--- a/src/arch/arm/types.hh
+++ b/src/arch/arm/types.hh
@@ -51,6 +51,8 @@
{
typedef uint32_t MachInst;
+ typedef uint16_t vmid_t;
+
BitUnion8(ITSTATE)
/* Note that the split (cond, mask) below is not as in ARM ARM.
* But it is more convenient for simulation. The condition
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45186
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia4f408b8e84b5f52f6b48fd5d4bbc2a5fac87154
Gerrit-Change-Number: 45186
Gerrit-PatchSet: 4
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Richard Cooper <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s