29#ifndef __ARCH_SPARC_TLB_MAP_HH__
30#define __ARCH_SPARC_TLB_MAP_HH__
45 typedef std::map<TlbRange, TlbEntry*>
RangeMap;
58 if (
i ==
tree.begin()) {
59 if (
r.real ==
i->first.real &&
60 r.partitionId ==
i->first.partitionId &&
61 i->first.va <
r.va +
r.size &&
62 i->first.va+
i->first.size >=
r.va &&
63 (
r.real ||
r.contextId ==
i->first.contextId))
72 if (
r.real !=
i->first.real)
74 if (!
r.real &&
r.contextId !=
i->first.contextId)
76 if (
r.partitionId !=
i->first.partitionId)
78 if (
i->first.va <=
r.va+
r.size &&
79 i->first.va+
i->first.size >=
r.va)
102 return tree.insert(std::make_pair(
r,
d)).first;
108 return tree.erase(
k);
158 while (
i !=
tree.end()) {
159 std::cout << std::hex <<
i->first.va <<
" " <<
i->first.size <<
" " <<
160 i->first.contextId <<
" " <<
i->first.partitionId <<
" " <<
161 i->first.real <<
" " <<
i->second << std::endl;
iterator insert(TlbRange &r, TlbEntry *d)
iterator find(const TlbRange &r)
std::map< TlbRange, TlbEntry * > RangeMap
bool intersect(const TlbRange &r)
RangeMap::iterator iterator
void erase(iterator p, iterator q)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.