Bug 103079

Summary: [agp] Add support to 945GM and fix how recognize agp
Product: Base System Reporter: Marcus Alves Grando <mnag>
Component: kernAssignee: Eric Anholt <anholt>
Status: Closed FIXED    
Severity: Affects Only Me CC: anholt
Priority: Normal    
Version: 6.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
agp_i810.c.current-patch none

Description Marcus Alves Grando freebsd_committer freebsd_triage 2006-09-09 20:30:18 UTC
- Add support to 945GM and fix how recognize agp aperture size, based on how linux does.
Comment 1 Marcus Alves Grando freebsd_committer freebsd_triage 2006-09-09 20:50:57 UTC
Responsible Changed
From-To: freebsd-bugs->anholt

Over to maintainer.
Comment 2 Eric Anholt 2006-09-26 19:30:15 UTC
Good catch.  But I think we need to go a step farther, as I believe we
aren't guaranteed that that bit will be set when we're a 128MB aperture,
even though linux does it that way.  I've put up an untested proposed
diff at:

http://people.freebsd.org/~anholt/agp-i945-4.diff

This gets the size from rman, which has done the proper size check on
that BAR (read it, write 1s, check how many of the 1s were saved,
restore).  It also corrects a copy'n'paste-o, and allocates the GMADR
resource, which agp.c wasn't doing since we've got it in a different
place than most!

-- 
Eric Anholt                             anholt@FreeBSD.org
eric@anholt.net                         eric.anholt@intel.com
Comment 3 Eric Anholt freebsd_committer freebsd_triage 2006-09-27 07:39:09 UTC
State Changed
From-To: open->patched

Fix committed.  Big thanks for tracking down the cause!
Comment 4 dfilter service freebsd_committer freebsd_triage 2006-09-27 07:39:10 UTC
anholt      2006-09-27 06:38:54 UTC

  FreeBSD src repository

  Modified files:
    sys/pci              agp_i810.c 
  Log:
  Add support for 945G/GM AGP chipsets.
  
  The key problem was that the aperture size detection using the MSAC bit
  doesn't work -- the bit appears to be set even when it shouldn't be.  Linux
  takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being
  set.  However, as I don't think that's a safe way to test aperture size, we
  just allocate the resource and check its size.  This also pointed out that
  agp_generic_attach hadn't been allocating our aperture resource, which may
  have caused problems in some cases.
  
  Also corrected is a minor copy-and-pasteo in an error case.
  
  PR:             kern/103079
  Submitted by:   mnag
  Tested on:      i945GM, i915GM
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.39      +29 -13    src/sys/pci/agp_i810.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Marcus Alves Grando freebsd_committer freebsd_triage 2007-01-01 22:09:13 UTC
State Changed
From-To: patched->closed

MFCed to RELENG_6.