MFC r256672
If we avoid to use the page at addr 0, we should adjust the size to reflect it.
This commit is contained in:
parent
24fc8c91c2
commit
92d71aad70
@ -1169,11 +1169,15 @@ physmap_init(struct mem_region *availmem_regions, int availmem_regions_sz,
|
||||
*/
|
||||
if (availmem_regions[i].mr_start > 0 ||
|
||||
availmem_regions[i].mr_size > PAGE_SIZE) {
|
||||
vm_size_t size;
|
||||
phys_avail[j] = availmem_regions[i].mr_start;
|
||||
if (phys_avail[j] == 0)
|
||||
|
||||
size = availmem_regions[i].mr_size;
|
||||
if (phys_avail[j] == 0) {
|
||||
phys_avail[j] += PAGE_SIZE;
|
||||
phys_avail[j + 1] = availmem_regions[i].mr_start +
|
||||
availmem_regions[i].mr_size;
|
||||
size -= PAGE_SIZE;
|
||||
}
|
||||
phys_avail[j + 1] = availmem_regions[i].mr_start + size;
|
||||
} else
|
||||
j -= 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user