From 26232fd45ba22f38c070234b7a0bf1fe9b557c37 Mon Sep 17 00:00:00 2001 From: njl Date: Sat, 3 Apr 2004 22:55:12 +0000 Subject: [PATCH] Add the ability to disable agp devices at the loader prompt. Usage is hint.agp.0.disabled="1" Submitted by: jhb --- sys/dev/agp/agp_ali.c | 2 ++ sys/dev/agp/agp_amd.c | 2 ++ sys/dev/agp/agp_i810.c | 2 ++ sys/dev/agp/agp_intel.c | 2 ++ sys/dev/agp/agp_nvidia.c | 2 ++ sys/dev/agp/agp_sis.c | 2 ++ sys/dev/agp/agp_via.c | 2 ++ sys/pci/agp_ali.c | 2 ++ sys/pci/agp_amd.c | 2 ++ sys/pci/agp_i810.c | 2 ++ sys/pci/agp_intel.c | 2 ++ sys/pci/agp_nvidia.c | 2 ++ sys/pci/agp_sis.c | 2 ++ sys/pci/agp_via.c | 2 ++ 14 files changed, 28 insertions(+) diff --git a/sys/dev/agp/agp_ali.c b/sys/dev/agp/agp_ali.c index fc99574de706..c455ed33590a 100644 --- a/sys/dev/agp/agp_ali.c +++ b/sys/dev/agp/agp_ali.c @@ -80,6 +80,8 @@ agp_ali_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_ali_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c index 37bd11da55a5..2b6072a1176b 100644 --- a/sys/dev/agp/agp_amd.c +++ b/sys/dev/agp/agp_amd.c @@ -207,6 +207,8 @@ agp_amd_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_amd_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index b79ce1310559..9210247f8095 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -183,6 +183,8 @@ agp_i810_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_i810_match(dev); if (desc) { device_t bdev; diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c index 4414a7bba697..4c6f65163c7e 100644 --- a/sys/dev/agp/agp_intel.c +++ b/sys/dev/agp/agp_intel.c @@ -127,6 +127,8 @@ agp_intel_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_intel_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/dev/agp/agp_nvidia.c b/sys/dev/agp/agp_nvidia.c index ad1495f266de..cc6ac2c6e453 100644 --- a/sys/dev/agp/agp_nvidia.c +++ b/sys/dev/agp/agp_nvidia.c @@ -116,6 +116,8 @@ agp_nvidia_probe (device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_nvidia_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/dev/agp/agp_sis.c b/sys/dev/agp/agp_sis.c index 6d8f42b0eea7..33100acc348f 100644 --- a/sys/dev/agp/agp_sis.c +++ b/sys/dev/agp/agp_sis.c @@ -82,6 +82,8 @@ agp_sis_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_sis_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/dev/agp/agp_via.c b/sys/dev/agp/agp_via.c index 00e4892da2cd..e6cd94a31f09 100644 --- a/sys/dev/agp/agp_via.c +++ b/sys/dev/agp/agp_via.c @@ -90,6 +90,8 @@ agp_via_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_via_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_ali.c b/sys/pci/agp_ali.c index fc99574de706..c455ed33590a 100644 --- a/sys/pci/agp_ali.c +++ b/sys/pci/agp_ali.c @@ -80,6 +80,8 @@ agp_ali_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_ali_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_amd.c b/sys/pci/agp_amd.c index 37bd11da55a5..2b6072a1176b 100644 --- a/sys/pci/agp_amd.c +++ b/sys/pci/agp_amd.c @@ -207,6 +207,8 @@ agp_amd_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_amd_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index b79ce1310559..9210247f8095 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -183,6 +183,8 @@ agp_i810_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_i810_match(dev); if (desc) { device_t bdev; diff --git a/sys/pci/agp_intel.c b/sys/pci/agp_intel.c index 4414a7bba697..4c6f65163c7e 100644 --- a/sys/pci/agp_intel.c +++ b/sys/pci/agp_intel.c @@ -127,6 +127,8 @@ agp_intel_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_intel_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_nvidia.c b/sys/pci/agp_nvidia.c index ad1495f266de..cc6ac2c6e453 100644 --- a/sys/pci/agp_nvidia.c +++ b/sys/pci/agp_nvidia.c @@ -116,6 +116,8 @@ agp_nvidia_probe (device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_nvidia_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_sis.c b/sys/pci/agp_sis.c index 6d8f42b0eea7..33100acc348f 100644 --- a/sys/pci/agp_sis.c +++ b/sys/pci/agp_sis.c @@ -82,6 +82,8 @@ agp_sis_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_sis_match(dev); if (desc) { device_verbose(dev); diff --git a/sys/pci/agp_via.c b/sys/pci/agp_via.c index 00e4892da2cd..e6cd94a31f09 100644 --- a/sys/pci/agp_via.c +++ b/sys/pci/agp_via.c @@ -90,6 +90,8 @@ agp_via_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_via_match(dev); if (desc) { device_verbose(dev);