Deleted Added
sdiff udiff text old ( 8931:7a1dfb191e3f ) new ( 9235:5aa4896ed55a )
full compact
1/*
2 * Copyright (c) 2012 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

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

59 if (addrMap.insert((*m)->getAddrRange(), *m) == addrMap.end())
60 fatal("Memory address range for %s is overlapping\n",
61 (*m)->name());
62 }
63 DPRINTF(BusAddrRanges,
64 "Skipping memory %s that is not in global address map\n",
65 (*m)->name());
66 }
67}
68
69bool
70PhysicalMemory::isMemAddr(Addr addr) const
71{
72 // see if the address is within the last matched range
73 if (addr != rangeCache) {
74 // lookup in the interval tree
75 AddrRangeMap<AbstractMemory*>::const_iterator r = addrMap.find(addr);
76 if (r == addrMap.end()) {
77 // not in the cache, and not in the tree
78 return false;
79 }
80 // the range is in the tree, update the cache
81 rangeCache = r->first;
82 }
83

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

103 return ranges;
104}
105
106void
107PhysicalMemory::access(PacketPtr pkt)
108{
109 assert(pkt->isRequest());
110 Addr addr = pkt->getAddr();
111 AddrRangeMap<AbstractMemory*>::const_iterator m = addrMap.find(addr);
112 assert(m != addrMap.end());
113 m->second->access(pkt);
114}
115
116void
117PhysicalMemory::functionalAccess(PacketPtr pkt)
118{
119 assert(pkt->isRequest());
120 Addr addr = pkt->getAddr();
121 AddrRangeMap<AbstractMemory*>::const_iterator m = addrMap.find(addr);
122 assert(m != addrMap.end());
123 m->second->functionalAccess(pkt);
124}