From 3110b157e6890273561c6bc3ff407e298e8d910d Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Thu, 15 Nov 2007 14:21:01 -0500 Subject: fix MIPS headers --HG-- extra : convert_revision : 2870a146a1be0e8c80878090f39c0eaa15d2eb13 --- src/arch/mips/vtophys.hh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/arch/mips/vtophys.hh') 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); -- cgit v1.2.3