summaryrefslogtreecommitdiff
path: root/mem
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-03-12 16:11:41 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2006-03-12 16:11:41 -0500
commite1985e02007f2e34d6e62c66ba417e6e9f3a1316 (patch)
tree7f8e753e4968dc79fb8d8e0eadc43fddf79dc44c /mem
parent8dc2374b0bdae4b9bc0967c17c189a6e4188e17b (diff)
downloadgem5-e1985e02007f2e34d6e62c66ba417e6e9f3a1316.tar.xz
More memory system cleanup:
- Get rid of unused ProxyMemory class (replaced by TranslatingPort). - Get rid of remaining unused prot_* functions. mem/physical.cc: mem/physical.hh: mem/port.hh: Get rid of remaining unused prot_* functions. --HG-- extra : convert_revision : f16c208f4e4c38bd6bb3626339674c9278da9e07
Diffstat (limited to 'mem')
-rw-r--r--mem/physical.cc23
-rw-r--r--mem/physical.hh6
-rw-r--r--mem/port.hh3
3 files changed, 1 insertions, 31 deletions
diff --git a/mem/physical.cc b/mem/physical.cc
index c69cfd538..a00c59139 100644
--- a/mem/physical.cc
+++ b/mem/physical.cc
@@ -114,26 +114,6 @@ PhysicalMemory::addPort(std::string portName)
return memoryPortList[portName];
}
-//
-// little helper for better prot_* error messages
-//
-void
-PhysicalMemory::prot_access_error(Addr addr, int size, Command func)
-{
- panic("invalid physical memory access!\n"
- "%s: %i(addr=%#x, size=%d) out of range (max=%#x)\n",
- name(), func, addr, size, pmem_size - 1);
-}
-
-void
-PhysicalMemory::prot_memset(Addr addr, uint8_t val, int size)
-{
- if (addr + size >= pmem_size)
- prot_access_error(addr, size, Write);
-
- memset(pmem_addr + addr - base_addr, val, size);
-}
-
int
PhysicalMemory::deviceBlockSize()
{
@@ -162,8 +142,7 @@ PhysicalMemory::doAtomicAccess(Packet &pkt)
void
PhysicalMemory::doFunctionalAccess(Packet &pkt)
{
- if (pkt.addr + pkt.size >= pmem_size)
- prot_access_error(pkt.addr, pkt.size, pkt.cmd);
+ assert(pkt.addr + pkt.size < pmem_size);
switch (pkt.cmd) {
case Read:
diff --git a/mem/physical.hh b/mem/physical.hh
index 854886a27..658ba18ff 100644
--- a/mem/physical.hh
+++ b/mem/physical.hh
@@ -107,15 +107,9 @@ class PhysicalMemory : public Memory
PhysicalMemory(const std::string &n);
virtual ~PhysicalMemory();
- protected:
- // error handling for prot_* functions
- void prot_access_error(Addr addr, int size, Command func);
-
public:
int deviceBlockSize();
- void prot_memset(Addr addr, uint8_t val, int size);
-
// fast back-door memory access for vtophys(), remote gdb, etc.
// uint64_t phys_read_qword(Addr addr) const;
private:
diff --git a/mem/port.hh b/mem/port.hh
index a86c9d727..5c89c74a5 100644
--- a/mem/port.hh
+++ b/mem/port.hh
@@ -212,9 +212,6 @@ class Port
should not need to be virtual, since it can be implemented in
terms of writeBlobFunctional(). However, it shouldn't be
performance-critical either, so it could be if we wanted to.
- Not even sure if this is actually needed anywhere (there's a
- prot_memset on the old functional memory that's never used),
- but Nate claims it is.
*/
void memsetBlobFunctional(Addr addr, uint8_t val, int size);