cvs commit: src/sys/dev/agp agp_nvidia.c

John Baldwin jhb at
Fri Mar 7 13:36:39 UTC 2008

jhb         2008-03-07 13:36:39 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/agp          agp_nvidia.c 
  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
  Revision  Changes    Path
  1.14      +4 -3      src/sys/dev/agp/agp_nvidia.c

More information about the cvs-src mailing list