physical.cc (8922:17f037ad8918) physical.cc (8923:820111f58fbb)
1/*
2 * Copyright (c) 2010-2011 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

--- 101 unchanged lines hidden (view full) ---

110 //If requested, initialize all the memory to 0
111 if (p->zero)
112 memset(pmemAddr, 0, size());
113}
114
115void
116PhysicalMemory::init()
117{
1/*
2 * Copyright (c) 2010-2011 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

--- 101 unchanged lines hidden (view full) ---

110 //If requested, initialize all the memory to 0
111 if (p->zero)
112 memset(pmemAddr, 0, size());
113}
114
115void
116PhysicalMemory::init()
117{
118 if (ports.empty()) {
119 fatal("PhysicalMemory object %s is unconnected!", name());
118 for (PortIterator p = ports.begin(); p != ports.end(); ++p) {
119 if (!(*p)->isConnected()) {
120 fatal("PhysicalMemory port %s is unconnected!\n", (*p)->name());
121 } else {
122 (*p)->sendRangeChange();
123 }
120 }
124 }
121
122 for (PortIterator pi = ports.begin(); pi != ports.end(); ++pi) {
123 (*pi)->sendRangeChange();
124 }
125}
126
127PhysicalMemory::~PhysicalMemory()
128{
129 if (pmemAddr)
130 munmap((char*)pmemAddr, size());
131}
132

--- 522 unchanged lines hidden ---
125}
126
127PhysicalMemory::~PhysicalMemory()
128{
129 if (pmemAddr)
130 munmap((char*)pmemAddr, size());
131}
132

--- 522 unchanged lines hidden ---