summaryrefslogtreecommitdiff
path: root/src/arch/mips/vtophys.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2007-11-15 14:21:01 -0500
committerKorey Sewell <ksewell@umich.edu>2007-11-15 14:21:01 -0500
commit3110b157e6890273561c6bc3ff407e298e8d910d (patch)
treeb1fd5a31db954118bb93f3eed1a1f8bac75fe7c6 /src/arch/mips/vtophys.hh
parent9cff176bbc77fcfbd45308a027b9b9dec6a81ac2 (diff)
downloadgem5-3110b157e6890273561c6bc3ff407e298e8d910d.tar.xz
fix MIPS headers
--HG-- extra : convert_revision : 2870a146a1be0e8c80878090f39c0eaa15d2eb13
Diffstat (limited to 'src/arch/mips/vtophys.hh')
-rw-r--r--src/arch/mips/vtophys.hh17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/arch/mips/vtophys.hh b/src/arch/mips/vtophys.hh
index 2e9ced9d4..e38182181 100644
--- a/src/arch/mips/vtophys.hh
+++ b/src/arch/mips/vtophys.hh
@@ -34,7 +34,6 @@
#define __ARCH_MIPS_VTOPHYS_H__
#include "arch/mips/isa_traits.hh"
-#include "arch/mips/pagetable.hh"
#include "arch/mips/utility.hh"
@@ -42,6 +41,22 @@ class ThreadContext;
class FunctionalPort;
namespace MipsISA {
+ inline Addr PteAddr(Addr a) { return (a & PteMask) << PteShift; }
+
+ // User Virtual
+ inline bool IsUSeg(Addr a) { return USegBase <= a && a <= USegEnd; }
+
+ inline bool IsKSeg0(Addr a) { return KSeg0Base <= a && a <= KSeg0End; }
+
+ inline Addr KSeg02Phys(Addr addr) { return addr & KSeg0Mask; }
+
+ inline Addr KSeg12Phys(Addr addr) { return addr & KSeg1Mask; }
+
+ inline bool IsKSeg1(Addr a) { return KSeg1Base <= a && a <= KSeg1End; }
+
+ inline bool IsKSSeg(Addr a) { return KSSegBase <= a && a <= KSSegEnd; }
+
+ inline bool IsKSeg3(Addr a) { return KSeg3Base <= a && a <= KSeg3End; }
Addr vtophys(Addr vaddr);