When trying to allocate a PnP BIOS memory resource, the code loops trying
to move up the start address until the allocation succeeds. If the alignment of the resource was 0, then the code would keep trying the same request in an infinite loop and hang. Force the request to always move start up by at least 1 byte each time through the loop.
This commit is contained in:
parent
b63c567b6f
commit
90dea4f9a7
@ -147,7 +147,7 @@ isa_find_memory(device_t child, struct isa_config *config,
|
||||
end = config->ic_mem[i].ir_end,
|
||||
align = config->ic_mem[i].ir_align;
|
||||
start + size - 1 <= end && start + size > start;
|
||||
start += align) {
|
||||
start += MAX(align, 1)) {
|
||||
bus_set_resource(child, SYS_RES_MEMORY, i,
|
||||
start, size);
|
||||
res[i] = bus_alloc_resource(child,
|
||||
|
Loading…
x
Reference in New Issue
Block a user