sim: Move the BaseTLB to src/arch/generic/
[gem5.git] / src / arch / mips / vtophys.cc
index 72769aac1d926ea1e3b99365d570b789aa7f37d1..60d9bc1baea14188f7c123acb63f346cdad4c9f4 100755 (executable)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2002-2005 The Regents of The University of Michigan
+ * Copyright (c) 2007 MIPS Technologies, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,9 +26,9 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * Authors: Nathan Binkert
- *          Steve Reinhardt
- *          Ali Saidi
+ * Authors: Ali Saidi
+ *          Nathan Binkert
+ *          Jaidev Patwardhan
  */
 
 #include <string>
 #include "base/chunk_generator.hh"
 #include "base/trace.hh"
 #include "cpu/thread_context.hh"
-#include "mem/vport.hh"
+#include "debug/VtoPhys.hh"
+
 using namespace std;
 using namespace MipsISA;
 
 Addr
 MipsISA::vtophys(Addr vaddr)
 {
-    Addr paddr = 0;
-    if (MipsISA::IsUSeg(vaddr))
-        DPRINTF(VtoPhys, "vtophys: invalid vaddr %#x", vaddr);
-    else if (MipsISA::IsKSeg0(vaddr))
-        paddr = MipsISA::KSeg02Phys(vaddr);
-    else if(MipsISA::IsKSeg1(vaddr))
-        paddr = MipsISA::KSeg12Phys(vaddr);
-    else
-        panic("vtophys: ptbr is not set on virtual lookup for vaddr %#x", vaddr);
-
-    DPRINTF(VtoPhys, "vtophys(%#x) -> %#x\n", vaddr, paddr);
-
-    return paddr;
+    fatal("VTOPHYS: Unimplemented on MIPS\n");
+    return 0;
 }
 
 Addr
 MipsISA::vtophys(ThreadContext *tc, Addr addr)
 {
-
-  fatal("VTOPHYS: Unimplemented on MIPS\n");
+    fatal("VTOPHYS: Unimplemented on MIPS\n");
 }