summaryrefslogtreecommitdiff
path: root/src/arch/arm/utility.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/utility.cc')
-rw-r--r--src/arch/arm/utility.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc
index 9293a4cfe..47e13bdea 100644
--- a/src/arch/arm/utility.cc
+++ b/src/arch/arm/utility.cc
@@ -157,4 +157,17 @@ copyRegs(ThreadContext *src, ThreadContext *dest)
dest->getITBPtr()->invalidateMiscReg();
dest->getDTBPtr()->invalidateMiscReg();
}
+
+Addr
+truncPage(Addr addr)
+{
+ return addr & ~(PageBytes - 1);
+}
+
+Addr
+roundPage(Addr addr)
+{
+ return (addr + PageBytes - 1) & ~(PageBytes - 1);
}
+
+} // namespace ArmISA