Date: Tue, 11 Nov 2003 14:10:34 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 42052 for review Message-ID: <200311112210.hABMAY0F006323@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=42052 Change 42052 by jhb@jhb_blue on 2003/11/11 14:09:38 IFC @42051. Affected files ... .. //depot/projects/smpng/sys/kern/kern_turnstile.c#2 delete .. //depot/projects/smpng/sys/pci/agp.c#16 integrate .. //depot/projects/smpng/sys/pci/agp_ali.c#7 integrate Differences ... ==== //depot/projects/smpng/sys/pci/agp.c#16 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pci/agp.c,v 1.33 2003/10/23 18:08:56 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/agp.c,v 1.34 2003/11/11 21:49:18 anholt Exp $"); #include "opt_bus.h" @@ -175,6 +175,11 @@ "allocating GATT for aperture of size %dM\n", apsize / (1024*1024)); + if (entries == 0) { + device_printf(dev, "bad aperture size\n"); + return NULL; + } + gatt = malloc(sizeof(struct agp_gatt), M_AGP, M_NOWAIT); if (!gatt) return 0; ==== //depot/projects/smpng/sys/pci/agp_ali.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/pci/agp_ali.c,v 1.8 2003/08/22 07:13:20 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/agp_ali.c,v 1.9 2003/11/11 21:49:18 anholt Exp $"); #include "opt_bus.h" @@ -102,6 +102,10 @@ 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311112210.hABMAY0F006323>