summaryrefslogtreecommitdiffstats
path: root/sys/isa/isa_common.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-02-11 04:35:07 +0000
committermsmith <msmith@FreeBSD.org>2000-02-11 04:35:07 +0000
commit59c87d6c958fe6b6bc297f97301fd57e26aabede (patch)
treed21cf6a4b03c01df830803712bfa2dd842a947b0 /sys/isa/isa_common.c
parentc67195ab17df1daac716fadcab4f91032ababe24 (diff)
downloadFreeBSD-src-59c87d6c958fe6b6bc297f97301fd57e26aabede.zip
FreeBSD-src-59c87d6c958fe6b6bc297f97301fd57e26aabede.tar.gz
When allocating resources in the following cases:
- trying for a fit for a PnP configuration from a device - soaking up resources from a configuration that were not allocated by the driver do not attempt to activate them. Only a device driver that is aware of the nature of the resource and its suitability can be certain that activating a resource, particularly a memory resource, is a safe thing to do. This was prompted by the discovery that many systems report all physical memory through a PNP0c02 device; activating this resource maps all physical memory into the kernel's virtual space, either blowing out the kernel pagetable or in the worst case causing a panic in pmap_mapdev() if the system has too much physical memory. Authorised by: jkh Reviewed by: dfr
Diffstat (limited to 'sys/isa/isa_common.c')
-rw-r--r--sys/isa/isa_common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 2adf2ff..c528b7b 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -141,7 +141,7 @@ isa_find_memory(device_t child,
start, size);
res[i] = bus_alloc_resource(child,
SYS_RES_MEMORY, &i,
- 0, ~0, 1, RF_ACTIVE);
+ 0, ~0, 1, 0 /* !RF_ACTIVE */);
if (res[i]) {
result->ic_mem[i].ir_start = start;
result->ic_mem[i].ir_end = start + size - 1;
@@ -205,7 +205,7 @@ isa_find_port(device_t child,
start, size);
res[i] = bus_alloc_resource(child,
SYS_RES_IOPORT, &i,
- 0, ~0, 1, RF_ACTIVE);
+ 0, ~0, 1, 0 /* !RF_ACTIVE */);
if (res[i]) {
result->ic_port[i].ir_start = start;
result->ic_port[i].ir_end = start + size - 1;
@@ -290,7 +290,7 @@ isa_find_irq(device_t child,
irq, 1);
res[i] = bus_alloc_resource(child,
SYS_RES_IRQ, &i,
- 0, ~0, 1, RF_ACTIVE);
+ 0, ~0, 1, 0 /* !RF_ACTIVE */ );
if (res[i]) {
result->ic_irqmask[i] = (1 << irq);
break;
@@ -349,7 +349,7 @@ isa_find_drq(device_t child,
drq, 1);
res[i] = bus_alloc_resource(child,
SYS_RES_DRQ, &i,
- 0, ~0, 1, RF_ACTIVE);
+ 0, ~0, 1, 0 /* !RF_ACTIVE */);
if (res[i]) {
result->ic_drqmask[i] = (1 << drq);
break;
@@ -826,7 +826,7 @@ isa_driver_added(device_t dev, driver_t *driver)
rle->type,
&rid,
0, ~0, 1,
- RF_ACTIVE);
+ 0 /* !RF_ACTIVE */);
}
}
}
OpenPOWER on IntegriCloud