gem5
v20.1.0.0
|
These methods relate to the AddrRange and AddrRangeMap interfaces. More...
Typedefs | |
typedef std::list< AddrRange > | AddrRangeList |
Convenience typedef for a collection of address ranges. More... | |
Functions | |
AddrRange::AddrRange () | |
AddrRange::AddrRange (Addr _start, Addr _end, const std::vector< Addr > &_masks, uint8_t _intlv_match) | |
Construct an address range. More... | |
AddrRange::AddrRange (Addr _start, Addr _end, uint8_t _intlv_high_bit, uint8_t _xor_high_bit, uint8_t _intlv_bits, uint8_t _intlv_match) | |
Legacy constructor of AddrRange. More... | |
AddrRange::AddrRange (const std::vector< AddrRange > &ranges) | |
Create an address range by merging a collection of interleaved ranges. More... | |
bool | AddrRange::interleaved () const |
Determine if the range is interleaved or not. More... | |
uint64_t | AddrRange::granularity () const |
Determing the interleaving granularity of the range. More... | |
uint32_t | AddrRange::stripes () const |
Determine the number of interleaved address stripes this range is part of. More... | |
Addr | AddrRange::size () const |
Get the size of the address range. More... | |
bool | AddrRange::valid () const |
Determine if the range is valid. More... | |
Addr | AddrRange::start () const |
Get the start address of the range. More... | |
Addr | AddrRange::end () const |
Get the end address of the range. More... | |
std::string | AddrRange::to_string () const |
Get a string representation of the range. More... | |
bool | AddrRange::mergesWith (const AddrRange &r) const |
Determine if another range merges with the current one, i.e. More... | |
bool | AddrRange::intersects (const AddrRange &r) const |
Determine if another range intersects this one, i.e. More... | |
bool | AddrRange::isSubset (const AddrRange &r) const |
Determine if this range is a subset of another range, i.e. More... | |
bool | AddrRange::contains (const Addr &a) const |
Determine if the range contains an address. More... | |
Addr | AddrRange::removeIntlvBits (Addr a) const |
Remove the interleaving bits from an input address. More... | |
Addr | AddrRange::addIntlvBits (Addr a) const |
This method adds the interleaving bits removed by removeIntlvBits. More... | |
Addr | AddrRange::getOffset (const Addr &a) const |
Determine the offset of an address within the range. More... | |
bool | AddrRange::operator< (const AddrRange &r) const |
Less-than operator used to turn an STL map into a binary search tree of non-overlapping address ranges. More... | |
bool | AddrRange::operator== (const AddrRange &r) const |
bool | AddrRange::operator!= (const AddrRange &r) const |
AddrRange | RangeEx (Addr start, Addr end) |
AddrRange | RangeIn (Addr start, Addr end) |
AddrRange | RangeSize (Addr start, Addr size) |
iterator | AddrRangeMap< V, max_cache_size >::insert (const AddrRange &r, const V &d) |
void | AddrRangeMap< V, max_cache_size >::erase (iterator p) |
void | AddrRangeMap< V, max_cache_size >::erase (iterator p, iterator q) |
void | AddrRangeMap< V, max_cache_size >::clear () |
const_iterator | AddrRangeMap< V, max_cache_size >::begin () const |
iterator | AddrRangeMap< V, max_cache_size >::begin () |
const_iterator | AddrRangeMap< V, max_cache_size >::end () const |
iterator | AddrRangeMap< V, max_cache_size >::end () |
std::size_t | AddrRangeMap< V, max_cache_size >::size () const |
bool | AddrRangeMap< V, max_cache_size >::empty () const |
typedef RangeMap::iterator | AddrRangeMap< V, max_cache_size >::iterator |
typedef RangeMap::const_iterator | AddrRangeMap< V, max_cache_size >::const_iterator |
const_iterator | AddrRangeMap< V, max_cache_size >::contains (const AddrRange &r) const |
Find entry that contains the given address range. More... | |
iterator | AddrRangeMap< V, max_cache_size >::contains (const AddrRange &r) |
const_iterator | AddrRangeMap< V, max_cache_size >::contains (Addr r) const |
Find entry that contains the given address. More... | |
iterator | AddrRangeMap< V, max_cache_size >::contains (Addr r) |
const_iterator | AddrRangeMap< V, max_cache_size >::intersects (const AddrRange &r) const |
Find entry that intersects with the given address range. More... | |
iterator | AddrRangeMap< V, max_cache_size >::intersects (const AddrRange &r) |
These methods relate to the AddrRange and AddrRangeMap interfaces.
typedef std::list<AddrRange> AddrRangeList |
Convenience typedef for a collection of address ranges.
Definition at line 618 of file addr_range.hh.
typedef RangeMap::const_iterator AddrRangeMap< V, max_cache_size >::const_iterator |
Definition at line 70 of file addr_range_map.hh.
typedef RangeMap::iterator AddrRangeMap< V, max_cache_size >::iterator |
Definition at line 69 of file addr_range_map.hh.
This method adds the interleaving bits removed by removeIntlvBits.
Definition at line 512 of file addr_range.hh.
References ArmISA::a, bits(), ctz64(), ArmISA::i, insertBits(), AddrRange::intlvMatch, AddrRange::masks, and popCount().
Referenced by ChannelAddr::getPA().
|
inline |
Definition at line 94 of file addr_range.hh.
|
inline |
Construct an address range.
If the user provides a non empty vector of masks then the address range is interleaved. Each mask determines a set of bits that are xored to determine one bit of the sel value, starting from the least significant bit (i.e., masks[0] determines the least significant bit of sel, ...). If sel matches the provided _intlv_match then the address a is in the range.
For example if the input mask is _masks = { 1 << 8 | 1 << 11 | 1 << 13, 1 << 15 | 1 << 17 | 1 << 19}
Then a belongs to the address range if _start <= a < _end and sel == _intlv_match where sel[0] = a[8] ^ a[11] ^ a[13] sel[1] = a[15] ^ a[17] ^ a[19]
_start | The start address of this range |
_end | The end address of this range (not included in the range) |
_masks | The input vector of masks |
intlv_match | The matching value of the xor operations |
Definition at line 128 of file addr_range.hh.
References fatal_if, AddrRange::masks, and ULL.
|
inline |
Legacy constructor of AddrRange.
If the user provides a non-zero value in _intlv_high_bit the address range is interleaved.
An address a belongs to the address range if _start <= a < _end and sel == _intlv_match where sel = sel1 ^ sel2 sel1 = a[_intlv_low_bit:_intlv_high_bit] sel2 = a[_xor_low_bit:_xor_high_bit] _intlv_low_bit = _intlv_high_bit - intv_bits _xor_low_bit = _xor_high_bit - intv_bits
_start | The start address of this range |
_end | The end address of this range (not included in the range) |
_intlv_high_bit | The MSB of the intlv bits (disabled if 0) |
_xor_high_bit | The MSB of the xor bit (disabled if 0) |
_intlv_bits | the size, in bits, of the intlv and xor bits |
intlv_match | The matching value of the xor operations |
Definition at line 165 of file addr_range.hh.
References fatal, fatal_if, ArmISA::i, ArmISA::mask, AddrRange::masks, and ULL.
|
inline |
Create an address range by merging a collection of interleaved ranges.
ranges | Interleaved ranges to be merged |
Definition at line 215 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, fatal, AddrRange::intlvMatch, AddrRange::masks, AddrRange::mergesWith(), MipsISA::r, AddrRange::to_string(), and ULL.
|
inline |
Definition at line 205 of file addr_range_map.hh.
|
inline |
Definition at line 196 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::find(), and BaseXBar::recvRangeChange().
|
inline |
Definition at line 186 of file addr_range_map.hh.
|
inline |
Definition at line 117 of file addr_range_map.hh.
|
inline |
Find entry that contains the given address.
Searches through the ranges in the address map and returns an iterator to the entry which range is a superset of the input address. Returns end() if none found.
r | An input address |
Definition at line 112 of file addr_range_map.hh.
|
inline |
Determine if the range contains an address.
a | Address to compare with |
Definition at line 435 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, ArmISA::a, ArmISA::i, AddrRange::intlvMatch, AddrRange::masks, popCount(), and ArmISA::sel.
Referenced by MemCtrl::accessAndRespond(), System::allocPhysPages(), VMA::contains(), X86ISA::TLB::finalizePhysical(), ArmISA::TLB::finalizePhysical(), Gicv3::getRedistributorByAddr(), AbstractMemory::initState(), AddrRange::intersects(), Gicv3::read(), Gicv3Its::read(), Gicv3Redistributor::read(), Gicv3Distributor::read(), GenericTimerFrame::read(), GicV2::read(), GenericTimerMem::read(), GicV2::readDistributor(), Trace::TarmacParserRecord::readMemNoEffect(), SMMUControlPort::recvAtomic(), MemCtrl::recvAtomic(), MemCtrl::recvFunctional(), MemCtrl::recvTimingReq(), TEST(), Gicv3::write(), Gicv3Its::write(), Gicv3Redistributor::write(), Gicv3Distributor::write(), GenericTimerFrame::write(), GicV2::write(), GenericTimerMem::write(), and GicV2::writeDistributor().
|
inline |
Definition at line 92 of file addr_range_map.hh.
|
inline |
Find entry that contains the given address range.
Searches through the ranges in the address map and returns an iterator to the entry which range is a superset of the input address range. Returns end() if none found.
r | An input address range |
Definition at line 87 of file addr_range_map.hh.
Referenced by PhysicalMemory::access(), AddrRangeMap< AbstractMemory *, 1 >::contains(), BaseXBar::findPort(), PhysicalMemory::functionalAccess(), PhysicalMemory::isMemAddr(), and PhysicalMemory::unserialize().
|
inline |
Definition at line 241 of file addr_range_map.hh.
|
inline |
Definition at line 223 of file addr_range_map.hh.
|
inline |
Definition at line 214 of file addr_range_map.hh.
Referenced by PhysicalMemory::access(), AddrRangeMap< AbstractMemory *, 1 >::find(), BaseXBar::findPort(), PhysicalMemory::functionalAccess(), AddrRangeMap< AbstractMemory *, 1 >::insert(), PhysicalMemory::isMemAddr(), and BaseXBar::recvRangeChange().
|
inline |
Get the end address of the range.
Definition at line 321 of file addr_range.hh.
References AddrRange::_end.
Referenced by VMA::end(), sc_gem5::TlmToGem5Bridge< BITWIDTH >::get_direct_mem_ptr(), init_range(), VMA::isStrictSuperset(), VMA::remap(), VMA::sanityCheck(), VMA::sliceRegionLeft(), and VMA::sliceRegionRight().
|
inline |
Definition at line 164 of file addr_range_map.hh.
Referenced by BaseXBar::recvRangeChange().
|
inline |
Definition at line 174 of file addr_range_map.hh.
Determine the offset of an address within the range.
This function returns the offset of the given address from the starting address discarding any bits that are used for interleaving. This way we can convert the input address to a new unique address in a continuous range that starts from 0.
the | input address |
Definition at line 559 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, ArmISA::a, AddrRange::interleaved(), MaxAddr, and AddrRange::removeIntlvBits().
Referenced by MemInterface::getCtrlAddr().
|
inline |
Determing the interleaving granularity of the range.
Definition at line 266 of file addr_range.hh.
References ctz64(), AddrRange::interleaved(), ArmISA::mask, AddrRange::masks, AddrRange::size(), and ULL.
Referenced by DRAMInterface::init(), and init_range().
|
inline |
Definition at line 152 of file addr_range_map.hh.
Referenced by BaseXBar::recvRangeChange().
|
inline |
Determine if the range is interleaved or not.
Definition at line 257 of file addr_range.hh.
References AddrRange::masks.
Referenced by ChannelAddrRange::ChannelAddrRange(), PhysicalMemory::createBackingStore(), KvmVM::delayedStartup(), AddrRange::getOffset(), AddrRange::granularity(), DRAMInterface::init(), init_range(), AddrRange::intersects(), AddrRange::isSubset(), AbstractMemory::setBackingStore(), and AddrRange::to_string().
|
inline |
Definition at line 142 of file addr_range_map.hh.
|
inline |
Find entry that intersects with the given address range.
Searches through the ranges in the address map and returns an iterator to the first entry which range intersects with the input address.
r | An input address |
Definition at line 137 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::insert(), and BaseXBar::recvRangeChange().
|
inline |
Determine if another range intersects this one, i.e.
if there is an address that is both in this range and the other range. No check is made to ensure either range is valid.
r | Range to intersect with |
Definition at line 376 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, AddrRange::contains(), AddrRange::interleaved(), AddrRange::intlvMatch, AddrRange::mergesWith(), panic, MipsISA::r, and AddrRange::to_string().
Referenced by init_range(), VMA::intersects(), and TEST().
|
inline |
Determine if this range is a subset of another range, i.e.
if every address in this range is also in the other range. No check is made to ensure either range is valid.
r | Range to compare with |
Definition at line 410 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, AddrRange::interleaved(), panic, MipsISA::r, AddrRange::size(), and AddrRange::to_string().
Referenced by AbstractMemory::access(), BaseXBar::findPort(), AbstractMemory::functionalAccess(), init_range(), AbstractMemory::initState(), VMA::isSubset(), BaseXBar::recvRangeChange(), and TEST().
|
inline |
Determine if another range merges with the current one, i.e.
if they are part of the same contigous range and have the same interleaving bits.
r | Range to evaluate merging with |
Definition at line 360 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, AddrRange::masks, and MipsISA::r.
Referenced by AddrRange::AddrRange(), init_range(), AddrRange::intersects(), VMA::mergesWith(), and TEST().
|
inline |
Definition at line 607 of file addr_range.hh.
References MipsISA::r.
|
inline |
Less-than operator used to turn an STL map into a binary search tree of non-overlapping address ranges.
r | Range to compare with |
Definition at line 581 of file addr_range.hh.
References AddrRange::_start, AddrRange::intlvMatch, and MipsISA::r.
|
inline |
Definition at line 594 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, AddrRange::intlvMatch, AddrRange::masks, and MipsISA::r.
Definition at line 624 of file addr_range.hh.
Referenced by X86ISA::Interrupts::getIntAddrRange(), init_range(), and TEST().
Definition at line 631 of file addr_range.hh.
Referenced by init_range(), and TEST().
Definition at line 638 of file addr_range.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::contains(), Packet::getAddrRange(), NoMaliGpu::getAddrRanges(), Uart8250::getAddrRanges(), Gicv2m::getAddrRanges(), Iob::getAddrRanges(), X86ISA::I8042::getAddrRanges(), Gicv3Its::getAddrRanges(), BasicPioDevice::getAddrRanges(), VGic::getAddrRanges(), PciDevice::getAddrRanges(), X86ISA::Interrupts::getAddrRanges(), GenericPciHost::getAddrRanges(), HSAPacketProcessor::getAddrRanges(), Pl111::getAddrRanges(), UFSHostDevice::getAddrRanges(), HDLcd::HDLcd(), Gicv3::init(), init_range(), and TEST().
Remove the interleaving bits from an input address.
This function returns a new address in a continous range [ start, start + size / intlv_bits). We can achieve this by discarding the LSB in each mask.
where x0 is the LSB set in masks[0] and x1 is the LSB set in masks[1]
a | the input address |
Definition at line 480 of file addr_range.hh.
References ArmISA::a, ctz64(), ArmISA::i, insertBits(), and AddrRange::masks.
Referenced by AddrRange::getOffset().
|
inline |
Definition at line 232 of file addr_range_map.hh.
|
inline |
Get the size of the address range.
For a case where interleaving is used we make the simplifying assumption that the size is a divisible by the size of the interleaving slice.
Definition at line 297 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, and AddrRange::masks.
Referenced by AbstractMemory::AbstractMemory(), KvmVM::coalesceMMIO(), PhysicalMemory::createBackingStore(), KvmVM::delayedStartup(), AddrRange::granularity(), init_range(), AddrRange::isSubset(), VMA::remap(), PhysicalMemory::serializeStore(), VMA::size(), AbstractMemory::size(), and PhysicalMemory::unserializeStore().
|
inline |
Get the start address of the range.
Definition at line 314 of file addr_range.hh.
References AddrRange::_start.
Referenced by KvmVM::coalesceMMIO(), MuxingKvmGic::copyGicState(), KvmVM::delayedStartup(), VMA::fillMemPages(), X86ISA::TLB::finalizePhysical(), ArmISA::TLB::finalizePhysical(), sc_gem5::TlmToGem5Bridge< BITWIDTH >::get_direct_mem_ptr(), Gicv3::getRedistributorByAddr(), init_range(), AbstractMemory::initState(), VMA::isStrictSuperset(), Gicv3::read(), Gicv3Its::read(), Gicv3Redistributor::read(), Gicv3Distributor::read(), GenericTimerFrame::read(), GenericTimerMem::read(), SMMUv3::readControl(), GicV2::readCpu(), GicV2::readDistributor(), VMA::remap(), VMA::sanityCheck(), VMA::sliceRegionLeft(), VMA::sliceRegionRight(), VMA::start(), AbstractMemory::start(), AbstractMemory::toHostAddr(), GenericTimerMem::validateFrameRange(), Gicv3::write(), Gicv3Its::write(), Gicv3Redistributor::write(), Gicv3Distributor::write(), GenericTimerFrame::write(), GenericTimerMem::write(), SMMUv3::writeControl(), GicV2::writeCpu(), and GicV2::writeDistributor().
|
inline |
Determine the number of interleaved address stripes this range is part of.
Definition at line 288 of file addr_range.hh.
References AddrRange::masks, and ULL.
Referenced by init_range().
|
inline |
Get a string representation of the range.
This could alternatively be implemented as a operator<<, but at the moment that seems like overkill.
Definition at line 330 of file addr_range.hh.
References AddrRange::_end, AddrRange::_start, bits(), csprintf(), ctz64(), ArmISA::i, AddrRange::interleaved(), AddrRange::intlvMatch, ArmISA::mask, AddrRange::masks, and ULL.
Referenced by AbstractMemory::AbstractMemory(), AddrRange::AddrRange(), PhysicalMemory::createBackingStore(), BaseXBar::findPort(), init_range(), AbstractMemory::initState(), AddrRange::intersects(), AddrRange::isSubset(), and BaseXBar::recvRangeChange().
|
inline |
Determine if the range is valid.
Definition at line 307 of file addr_range.hh.
References AddrRange::_end, and AddrRange::_start.
Referenced by AbstractMemory::AbstractMemory(), ChannelAddrRange::ChannelAddrRange(), GenericTimerFrame::hasEl0View(), and init_range().