kernel/x86: Allow overlapping of memory types with physical memory ranges in MTRRs.
Otherwise, all RAM that has a more specific type than the physical range will hit the assertion below. We also don't want to return the type set here, so put this check before the effectiveType check. Change-Id: I703242221771732c69accce66380b5a0efdc77e3 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8345 Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
4e9899d5a6
commit
95d8739f18
@@ -573,6 +573,11 @@ add_memory_type_range(area_id areaID, uint64 base, uint64 size, uint32 type,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (range->area == -1 && !x86_use_pat()) {
|
||||
// Physical memory range in MTRRs; permit overlapping.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (effectiveType != NULL) {
|
||||
type = *effectiveType = range->type;
|
||||
effectiveType = NULL;
|
||||
|
||||
Reference in New Issue
Block a user