Correct the comparison logic when looking for intersections between
exclusion zones and phsyical memory. The phys_avail[i] entries are the address of the first byte of ram in the region, and phys_avail[i+1] entries are the address of the first byte of ram in the next region (i.e., they're not included in the region that starts at phys_avail[i]). Reviewed by: cognet
This commit is contained in:
parent
7c54a52475
commit
7b1ee35189
@ -252,9 +252,9 @@ exclusion_bounce_check(vm_offset_t lowaddr, vm_offset_t highaddr)
|
||||
return (0);
|
||||
|
||||
for (i = 0; phys_avail[i] && phys_avail[i + 1]; i += 2) {
|
||||
if ((lowaddr >= phys_avail[i] && lowaddr <= phys_avail[i + 1])
|
||||
if ((lowaddr >= phys_avail[i] && lowaddr < phys_avail[i + 1])
|
||||
|| (lowaddr < phys_avail[i] &&
|
||||
highaddr > phys_avail[i]))
|
||||
highaddr >= phys_avail[i]))
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user