summaryrefslogtreecommitdiffstats
path: root/sys/pci/agp_ali.c
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2003-11-11 21:49:18 +0000
committeranholt <anholt@FreeBSD.org>2003-11-11 21:49:18 +0000
commita3bf20009f70eba5aa2a79bfd38c9363d624f530 (patch)
tree6923eb476dc98a422a64974b7a37b8308fda7fc7 /sys/pci/agp_ali.c
parent9cd493ccafa4a5de0ccf5fa52c5805372f51cd37 (diff)
downloadFreeBSD-src-a3bf20009f70eba5aa2a79bfd38c9363d624f530.zip
FreeBSD-src-a3bf20009f70eba5aa2a79bfd38c9363d624f530.tar.gz
- Disable AGP on ALI chipsets if aperture size is 0.
- Fail in agp_alloc_gatt if the aperture size is 0 instead of panicing in contigmalloc. Reported by: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE> Reviewed by: jhb MFC after: 1 week
Diffstat (limited to 'sys/pci/agp_ali.c')
-rw-r--r--sys/pci/agp_ali.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/pci/agp_ali.c b/sys/pci/agp_ali.c
index b9b2c13..fc99574 100644
--- a/sys/pci/agp_ali.c
+++ b/sys/pci/agp_ali.c
@@ -102,6 +102,10 @@ agp_ali_attach(device_t dev)
return error;
sc->initial_aperture = AGP_GET_APERTURE(dev);
+ if (sc->initial_aperture == 0) {
+ device_printf(dev, "bad initial aperture size, disabling\n");
+ return ENXIO;
+ }
for (;;) {
gatt = agp_alloc_gatt(dev);
OpenPOWER on IntegriCloud