From 99ac3651bd2fa42498b0ae9eec88e89aae117757 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 17 Apr 2007 15:14:23 +0000 Subject: 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. --- sys/isa/isa_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/isa') diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 72de76c..05f6a5c 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -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, -- cgit v1.1