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
This commit is contained in:
parent
8dc2374b0b
commit
e1985e0200
3 changed files with 1 additions and 31 deletions
|
@ -114,26 +114,6 @@ PhysicalMemory::addPort(std::string portName)
|
||||||
return memoryPortList[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
|
int
|
||||||
PhysicalMemory::deviceBlockSize()
|
PhysicalMemory::deviceBlockSize()
|
||||||
{
|
{
|
||||||
|
@ -162,8 +142,7 @@ PhysicalMemory::doAtomicAccess(Packet &pkt)
|
||||||
void
|
void
|
||||||
PhysicalMemory::doFunctionalAccess(Packet &pkt)
|
PhysicalMemory::doFunctionalAccess(Packet &pkt)
|
||||||
{
|
{
|
||||||
if (pkt.addr + pkt.size >= pmem_size)
|
assert(pkt.addr + pkt.size < pmem_size);
|
||||||
prot_access_error(pkt.addr, pkt.size, pkt.cmd);
|
|
||||||
|
|
||||||
switch (pkt.cmd) {
|
switch (pkt.cmd) {
|
||||||
case Read:
|
case Read:
|
||||||
|
|
|
@ -107,15 +107,9 @@ class PhysicalMemory : public Memory
|
||||||
PhysicalMemory(const std::string &n);
|
PhysicalMemory(const std::string &n);
|
||||||
virtual ~PhysicalMemory();
|
virtual ~PhysicalMemory();
|
||||||
|
|
||||||
protected:
|
|
||||||
// error handling for prot_* functions
|
|
||||||
void prot_access_error(Addr addr, int size, Command func);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int deviceBlockSize();
|
int deviceBlockSize();
|
||||||
|
|
||||||
void prot_memset(Addr addr, uint8_t val, int size);
|
|
||||||
|
|
||||||
// fast back-door memory access for vtophys(), remote gdb, etc.
|
// fast back-door memory access for vtophys(), remote gdb, etc.
|
||||||
// uint64_t phys_read_qword(Addr addr) const;
|
// uint64_t phys_read_qword(Addr addr) const;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -212,9 +212,6 @@ class Port
|
||||||
should not need to be virtual, since it can be implemented in
|
should not need to be virtual, since it can be implemented in
|
||||||
terms of writeBlobFunctional(). However, it shouldn't be
|
terms of writeBlobFunctional(). However, it shouldn't be
|
||||||
performance-critical either, so it could be if we wanted to.
|
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);
|
void memsetBlobFunctional(Addr addr, uint8_t val, int size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue