Lines Matching defs:ranges

97 static mutex sMemoryTypeLock = MUTEX_INITIALIZER("memory type ranges");
181 optimize_memory_ranges(MemoryTypeRangeList& ranges, uint32 type,
186 MemoryTypeRangeList::Iterator it = ranges.GetIterator();
249 // Skip the subsequent ranges we have swallowed and possible cut one
282 // resize ranges array
284 memory_type_range* ranges = new(std::nothrow) memory_type_range[count];
285 if (ranges == NULL)
290 sTemporaryRanges = ranges;
314 // resize the temporary points/ranges arrays, if necessary
324 // Ignore uncacheable ranges below a certain size, if requested.
350 // Compute the effective ranges. When ranges overlap, we go with the
354 // memory ranges with uncomparable types.
356 memory_type_range* ranges = sTemporaryRanges;
385 ranges[rangeCount].size = point->address - ranges[rangeCount].base;
402 ? &ranges[rangeCount - 1] : NULL;
407 ranges[rangeCount].base = point->address;
408 ranges[rangeCount].type = activeRange->type;
414 TRACE_MTRR2("effective memory type ranges:\n");
417 ranges[i].base, ranges[i].base + ranges[i].size, ranges[i].type);
421 // Extend ranges to be more MTRR-friendly. A range is MTRR friendly, when it
423 // ranges without this property we need more than one MTRR. We improve
427 // equally typed ranges, if possible. There are two exceptions to the
428 // intersection requirement: Uncached ranges may intersect with any other
430 // uncached ranges when extending the other ranges. Write-through ranges may
431 // intersect with write-back ranges; the resulting type will be
432 // write-through. Hence we can ignore write-through ranges when extending
433 // write-back ranges.
437 rangeList.Add(&ranges[i]);
452 // Remove uncached and write-through ranges after processing them. This
454 // respectively write-back ranges.
462 TRACE_MTRR2("optimized memory type ranges:\n");
464 if (ranges[i].size > 0) {
466 ranges[i].base, ranges[i].base + ranges[i].size,
467 ranges[i].type);
472 // compute the mtrrs from the ranges
477 // skip write-back ranges -- that'll be the default type anyway
482 if (ranges[i].size == 0 || ranges[i].type != type)
485 if (!add_mtrrs_for_range(ranges[i].base, ranges[i].size, type))
515 "ignoring uncacheable ranges up to size %#" B_PRIx64 ".\n",
521 // Not enough MTRRs. Retry with less uncacheable ranges.
523 // Ugh, even without any uncacheable ranges the available MTRRs do
699 // set the physical memory ranges to write-back mode