summaryrefslogtreecommitdiff
path: root/mem/page_table.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-09 19:21:35 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-09 19:21:35 -0500
commitf102365bfe14d25e40fb6d5cbd184138c0593c55 (patch)
tree3a67165ddff1b7341be44e5c8886eec7392490e7 /mem/page_table.cc
parent872bbdfc33cb82bf32576db3a57d3055a04acbac (diff)
downloadgem5-f102365bfe14d25e40fb6d5cbd184138c0593c55.tar.xz
SimpleCPU compiles with merge.
arch/alpha/isa_traits.hh: arch/alpha/linux/process.cc: arch/alpha/process.cc: arch/alpha/process.hh: arch/alpha/tru64/process.cc: base/chunk_generator.hh: base/loader/elf_object.cc: cpu/cpu_exec_context.cc: cpu/cpu_exec_context.hh: cpu/exec_context.hh: cpu/simple/cpu.cc: kern/linux/linux.hh: kern/tru64/tru64.hh: mem/packet.hh: mem/page_table.cc: mem/page_table.hh: mem/physical.cc: mem/request.hh: mem/translating_port.cc: sim/process.hh: sim/system.cc: Fixing merged changes. --HG-- extra : convert_revision : 2e94f21009395db654880fcb94ec806b6f5772c3
Diffstat (limited to 'mem/page_table.cc')
-rw-r--r--mem/page_table.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/mem/page_table.cc b/mem/page_table.cc
index 63b60de24..714ddde35 100644
--- a/mem/page_table.cc
+++ b/mem/page_table.cc
@@ -34,6 +34,7 @@
#include <map>
#include <fstream>
+#include "arch/faults.hh"
#include "base/bitfield.hh"
#include "base/intmath.hh"
#include "base/trace.hh"
@@ -43,6 +44,7 @@
#include "sim/system.hh"
using namespace std;
+using namespace TheISA;
PageTable::PageTable(System *_system, Addr _pageSize)
: pageSize(_pageSize), offsetMask(mask(floorLog2(_pageSize))),
@@ -61,23 +63,23 @@ PageTable::page_check(Addr addr, int size) const
if (size < sizeof(uint64_t)) {
if (!isPowerOf2(size)) {
panic("Invalid request size!\n");
- return Machine_Check_Fault;
+ return genMachineCheckFault();
}
if ((size - 1) & addr)
- return Alignment_Fault;
+ return genAlignmentFault();
}
else {
if ((addr & (VMPageSize - 1)) + size > VMPageSize) {
panic("Invalid request size!\n");
- return Machine_Check_Fault;
+ return genMachineCheckFault();
}
if ((sizeof(uint64_t) - 1) & addr)
- return Alignment_Fault;
+ return genAlignmentFault();
}
- return No_Fault;
+ return NoFault;
}
@@ -123,7 +125,7 @@ PageTable::translate(CpuRequestPtr &req)
{
assert(pageAlign(req->vaddr + req->size - 1) == pageAlign(req->vaddr));
if (!translate(req->vaddr, req->paddr)) {
- return Machine_Check_Fault;
+ return genMachineCheckFault();
}
return page_check(req->paddr, req->size);
}