physical.cc (7733:08d6a773d1b6) | physical.cc (7770:6286bb50127e) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 54 unchanged lines hidden (view full) --- 63#include "mem/packet_access.hh" 64#include "mem/physical.hh" 65#include "sim/eventq.hh" 66 67using namespace std; 68using namespace TheISA; 69 70PhysicalMemory::PhysicalMemory(const Params *p) | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 54 unchanged lines hidden (view full) --- 63#include "mem/packet_access.hh" 64#include "mem/physical.hh" 65#include "sim/eventq.hh" 66 67using namespace std; 68using namespace TheISA; 69 70PhysicalMemory::PhysicalMemory(const Params *p) |
71 : MemObject(p), pmemAddr(NULL), pagePtr(0), 72 lat(p->latency), lat_var(p->latency_var), | 71 : MemObject(p), pmemAddr(NULL), lat(p->latency), lat_var(p->latency_var), |
73 _size(params()->range.size()), _start(params()->range.start) 74{ 75 if (size() % TheISA::PageBytes != 0) 76 panic("Memory Size not divisible by page size\n"); 77 78 if (params()->null) 79 return; 80 --- 38 unchanged lines hidden (view full) --- 119} 120 121PhysicalMemory::~PhysicalMemory() 122{ 123 if (pmemAddr) 124 munmap((char*)pmemAddr, size()); 125} 126 | 72 _size(params()->range.size()), _start(params()->range.start) 73{ 74 if (size() % TheISA::PageBytes != 0) 75 panic("Memory Size not divisible by page size\n"); 76 77 if (params()->null) 78 return; 79 --- 38 unchanged lines hidden (view full) --- 118} 119 120PhysicalMemory::~PhysicalMemory() 121{ 122 if (pmemAddr) 123 munmap((char*)pmemAddr, size()); 124} 125 |
127Addr 128PhysicalMemory::new_page() 129{ 130 Addr return_addr = pagePtr << LogVMPageSize; 131 return_addr += start(); 132 133 ++pagePtr; 134 return return_addr; 135} 136 | |
137unsigned 138PhysicalMemory::deviceBlockSize() const 139{ 140 //Can accept anysize request 141 return 0; 142} 143 144Tick --- 474 unchanged lines hidden --- | 126unsigned 127PhysicalMemory::deviceBlockSize() const 128{ 129 //Can accept anysize request 130 return 0; 131} 132 133Tick --- 474 unchanged lines hidden --- |