Date: Fri, 7 Mar 2008 13:36:39 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/agp agp_nvidia.c Message-ID: <200803071336.m27DadeQ045913@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2008-03-07 13:36:39 UTC
FreeBSD src repository
Modified files:
sys/dev/agp agp_nvidia.c
Log:
Calculate the number of pages the GATT spans when reading from each page
to flush the TLB instead of hardcoding a size of 33 pages. Apertures of
32MB and 64MB only use a 16 page GATT and an aperture of 128MB only uses
a 32 page GATT, so without this the code could walk off the end of the
pointer and cause a page fault if the next page was unmapped. Also, for
aperture sizes > 128MB, not all of the pages would be read. The Linux
driver has the same bug.
MFC after: 1 week
Tested by: Frédéric PRACA frederic.praca of freebsd-fr.org
Revision Changes Path
1.14 +4 -3 src/sys/dev/agp/agp_nvidia.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803071336.m27DadeQ045913>
