Lines Matching refs:range

75 	memory_type_range*	range;
77 bool IsStart() const { return range->base == address; }
171 memory_type_range* range = it.Next();) {
172 if (range->area == areaID)
173 return range;
187 memory_type_range* range = it.Next();
188 while (range != NULL) {
189 if (range->type != type) {
190 previousEnd = range->base + range->size;
192 range = it.Next();
196 // find the start of the next range we cannot join this one with
200 if (nextRange->type != range->type) {
213 // Align the range's base and end to the greatest power of two possible.
215 // range, we can extend the range without making it more complicated.
217 // continue aligning the other side, if the range crosses the power of
219 uint64 rangeBase = range->base;
220 uint64 rangeEnd = rangeBase + range->size;
241 range->base = rangeBase;
242 range->size = rangeEnd - rangeBase;
251 while ((range = it.Next()) != NULL) {
252 if (range->base >= rangeEnd)
255 if (range->base + range->size > rangeEnd) {
256 // we partially intersect -- cut the range
257 range->size = range->base + range->size - rangeEnd;
258 range->base = rangeEnd;
262 // we have swallowed this range completely
263 range->size = 0;
318 // get the range points and sort them
322 memory_type_range* range = it.Next();) {
323 if (range->type == IA32_MTR_UNCACHED) {
328 if (range->size <= updateInfo.ignoreUncacheableSize)
330 if (range->size < updateInfo.shortestUncacheableSize)
331 updateInfo.shortestUncacheableSize = range->size;
334 rangePoints[pointCount].address = range->base;
335 rangePoints[pointCount++].range = range;
336 rangePoints[pointCount].address = range->base + range->size;
337 rangePoints[pointCount++].range = range;
343 TRACE_MTRR2("memory type range points:\n");
346 rangePoints[i].range);
366 // a range start point
368 if (activeRange != NULL && activeRange->type > point->range->type)
371 // a range end point -- remove the pending start point
374 if (pendingPoint->range == point->range) {
380 if (point->range == activeRange)
393 // we need to start a new range -- find the strictest pending range
396 memory_type_range* pendingRange = pendingPoint->range;
406 // we can't join with the previous range -- add a new one
421 // Extend ranges to be more MTRR-friendly. A range is MTRR friendly, when it
424 // MTRR-friendliness by aligning a range's base and end address to the
426 // range does not intersect with any other differently typed range. We join
429 // range; the resulting type will still be uncached. Hence we can ignore
569 memory_type_range* range = areaID >= 0 ? find_range(areaID) : NULL;
571 if (range != NULL) {
572 if (range->base != base || range->size != size)
574 if (range->type == type)
577 oldRangeType = range->type;
578 range->type = type;
580 range = new(std::nothrow) memory_type_range;
581 if (range == NULL)
584 range->area = areaID;
585 range->base = base;
586 range->size = size;
587 range->type = type;
588 sMemoryTypeRanges.Add(range);
594 // revert the addition of the range/change of its type
596 sMemoryTypeRanges.Remove(range);
598 delete range;
600 range->type = oldRangeType;
615 memory_type_range* range = find_range(areaID);
616 if (range != NULL) {
618 B_PRIx64 ", %" B_PRIu32 ")\n", range->area, range->base,
619 range->size, range->type);
621 sMemoryTypeRanges.Remove(range);
623 delete range;
627 dprintf("remove_memory_type_range(): no range known for area %" B_PRId32