From nobody@FreeBSD.org  Fri Oct 24 07:24:00 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B41461065675
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Oct 2008 07:24:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id A28B98FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Oct 2008 07:24:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9O7O0VJ017344
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Oct 2008 07:24:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id m9O7NxuM017342;
	Fri, 24 Oct 2008 07:23:59 GMT
	(envelope-from nobody)
Message-Id: <200810240723.m9O7NxuM017342@www.freebsd.org>
Date: Fri, 24 Oct 2008 07:23:59 GMT
From: Manfred Knick <Manfred.Knick@T-Online.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: nForce3-250 AGP not detected correctly
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         128331
>Category:       kern
>Synopsis:       [agp] nForce3-250 AGP not detected correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jkim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 24 07:30:03 UTC 2008
>Closed-Date:    Mon Jan 12 16:10:45 UTC 2009
>Last-Modified:  Wed Jan 21 17:10:00 UTC 2009
>Originator:     Manfred Knick
>Release:        7.1 BETA2
>Organization:
>Environment:
>Description:
I have reported this issue as
"[BUG-REPORT] Free-BSD release 7.1-BETA2 :
 nForce3-250 AGP not detected correctly"
to freebsd-bugs@FreeBSD.org  21.10.2008 13:07 as follows:

#########################################################################
..
    main suspects:
        combination of
                  a) handling of multiple host bridges on one MoBo
                  b) agp / agp_amd64
..
#########################################################################

Hardware involved:

    ASRock ALiveDUAL-eSATA2
    "Northbridge":    NVIDIA ( former ULi / ALi ) M1695
    Southbridge:    NVIDIA nForce3 250        <-- incl. AGPA

    AMD 64 Phenom

    Matrox G550 AGP

#########################################################################

Procedure to reproduce:

1.) Clean fresh install from CD-ROM 1,
    select "All" ==> including X11

2.) install xf86-video-mga ( sysconfig / ftp )

3.) add drm and mga to /boot/loader.conf

4.) create /etc/xorg.conf via "X -configure"

#########################################################################

Observations, as far as I can interpret:

(A) from dmesg:

(1) "Northbridge" --> PCI-express seems to be recognized correctly.
(2) agp_amd64 correctly identifies the  G550 
    with chip 2527 from vendor 102b,
    but on pcib0 !?!                                       <== !!!
(3) agp fails to finish loading

(4) Southbridge gets recognized on pcib1
(5) Matrox gets recognized on pci slot pci4 on pcib1
(6) vga driver detects Matrox as vgapci0 in pci4
(7) drm binds to this vgapci,
(8) but cannot initialize this vga device as AGP

(9) consequently, the system continues with VGA as minimal working
configuratgion.


(B) from /var/log/Xorg.0.log:

    Starting X, the consecutive errors are as expected:

(10) The modules dri and mga get initially loaded

(11) The mgag550 can be contacted, but not successfully initialized

(12) In consequence, initializing drm fails.

(13) In consequence, initializing dri fails.


My subjective guess / impression :
    This may have to do with agp / agp_amd64
        being called on the PCI-e,
        but not on the AGP bridge.

If additional special information is needed,
reply your request via above private e-mail address
(I'm not on any FreeBSD mailing lists yet),
and I'll try to provide it.

Looking forward to your answers.
Kind regards!

P.S.: Yes, I have searched ... and ... and ...
Closest I could discover:
There were some hints to vga and agp mis-interfering ~ 2 years ago,
but that has been sorted out and doesn't seem to apply to this problem ...

#########################################################################

CROSS-CHECKING the HARDWARE:

Gentoo GNU/Linux amd64,
64-bit kernel gentoo-sources-2.6.27 : AGP and DRM work.


########   (A)  ########################################################

FreeBSD 7.1-BETA2 #0: Sun Oct 12 20:59:28 UTC 2008

CPU: AMD Phenom(tm) 9350e Quad-Core Processor (2009.02-MHz K8-class CPU)

pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0        (1)
pci0: <ACPI PCI bus> on pcib0

agp0: <NVIDIA nForce3-250 AGP Controller> on hostb0        (2)
device_attach: agp0 attach returned 6                (3)

pcib1: <ACPI PCI-PCI bridge> at device 11.0 on pci0        (4)
pci4: <ACPI PCI bus> on pcib1                    (5)
vgapci0: <VGA-compatible display> mem 0xfa000000-0xfbffffff,
    0xfebfc000-0xfebfffff,0xfe000000-0xfe7fffff irq 16
    at device 0.0 on pci4                    (6)
drm0: <Matrox G550 (AGP)> on vgapci0                (7)
error: [drm:pid0:drm_load] *ERROR* Card isn't AGP, or couldn't
initialize AGP.    (8)
device_attach: drm0 attach returned 12

vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on
isa0    (9)

########   (B)  ########################################################

X.Org X Server 1.4.2
Release Date: 11 June 2008
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 7.1-RELEASE amd64

Build Date: 12 September 2008  10:01:27AM
 
(II) PCI: 04:00:0: chip 102b,2527 card 102b,0f84 rev 01 class 03,00,00
hdr 00

(II) LoadModule: "dri"                        (10)
(II) Loading /usr/local/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
    compiled for 1.4.2, module version = 1.0.0
    ABI class: X.Org Server Extension, version 0.3
(II) Loading extension XFree86-DRI

(II) LoadModule: "mga"                        (10)
(II) Loading /usr/local/lib/xorg/modules/drivers//mga_drv.so
(II) Module mga: vendor="X.Org Foundation"
    compiled for 1.4.2, module version = 1.4.7
    Module class: X.Org Video Driver
    ABI class: X.Org Video Driver, version 2.0

(--) Chipset mgag550 found

(--) MGA(0): Chipset: "mgag550"                    (11)
(==) MGA(0): Depth 24, (==) framebuffer bpp 32
(==) MGA(0): RGB weight 888
(==) MGA(0): Using AGP 1x mode                    (11)
(==) MGA(0): Using XAA acceleration
(--) MGA(0): Linear framebuffer at 0xFA000000
(==) MGA(0): MMIO registers at 0xFEBFC000
(--) MGA(0): Pseudo-DMA transfer window at 0xFE000000
(--) MGA(0): BIOS at 0xFEBC0000
Requesting insufficient memory window!: start: 0xfe000000 end:
0xfebfffff size 0x2000000
(EE) Cannot find empty range to map base to            (11)
(WW) MGA(0): Video BIOS info block not detected!
(==) MGA(0): Write-combining range (0xfebfc000,0x4000) was already clear
(==) MGA(0): Write-combining range (0xfa000000,0x2000000)
(==) MGA(0): Write-combining range (0xfe000000,0x800000) was already clear
(--) MGA(0): VideoRAM: 32768 kByte

drmOpenDevice: node name is /dev/dri/card0            (12)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
[drm] failed to load kernel module "mga"            (12)
(EE) [drm] drmOpen failed.

(EE) MGA(0): [drm] DRIScreenInit failed.  Disabling DRI.    (13)

#########################################################################
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Manfred Knick <manfred.knick@t-online.de>
To: bug-followup@FreeBSD.org, Manfred.Knick@T-Online.de
Cc:  
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Mon, 24 Nov 2008 12:24:25 +0100

 ADDENDUM:
 
 Digging further on, I came across
 
 http://www.ocworkbench.com/2005/uli/m1695/g1.htm
 
 which states:
 <cite>
 M1695 ... Tunnel Chip ... is ... chipset that uses a tunneling technique 
 to interconnect the two "North Bridges" as the South Bridge ...
 </cite> .
 
 Thus, the approach is as follows:
 
 [ CPU ] <-- HyperTransport Link -->  [ M1695 ] <-- HyperTransport Link 
 --> [ nForce3 250 ] <-- AGP Bus --> [ G550 ]
 
 which implies that indeed we have two host bridges, but sequentially - 
 not in parallel.
 

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: bug-followup@FreeBSD.org, Manfred.Knick@T-Online.de
Cc:  
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Wed, 10 Dec 2008 11:59:21 +0100

 7.1-RC1
 
 With 7.1-RC1, the problem still persists the same.
 
 I checked it with a clean fresh install from the amd-64 DVD1.
 
 
 http://forums.freebsd.org/showthread.php?t=236

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: bug-followup@FreeBSD.org, Manfred.Knick@T-Online.de
Cc:  
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Thu, 08 Jan 2009 11:36:11 +0100

 7.1 final RELEASE
 
 With 7.1, the problem still persists the same.
 
 I checked it with a clean fresh install from the amd-64 DVD1.
 
 Afterwards, just to prove sure,
 I upgraded to the most recent mga driver port -
 still the same, as expected.
Responsible-Changed-From-To: freebsd-bugs->jkim 
Responsible-Changed-By: jkim 
Responsible-Changed-When: Fri Jan 9 18:59:11 UTC 2009 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128331 

From: Jung-uk Kim <jkim@FreeBSD.org>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Fri, 9 Jan 2009 14:04:12 -0500

 Please send me "pciconf -cl" output.
 
 Jung-uk Kim

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: Jung-uk Kim <jkim@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 00:40:38 +0100

 Jung-uk Kim schrieb:
 > Please send me "pciconf -cl" output.
 > 
 > Jung-uk Kim
 > 
 
 Kind regards
 Manfred
 
 .   ---   ---   ---   pciconf -lv   ---   ---   ---
 
 hostb0@pci0:0:0:0:    class=0x060000 card=0x00e11849 chip=0x00e110de
 rev=0xa1 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 Host/PCI Bridge'                  <=====
      class      = bridge
      subclass   = HOST-PCI
 isab0@pci0:0:1:0:    class=0x060100 card=0x00e01849 chip=0x00e010de
 rev=0xa2 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 LPC Interface Bridge'
      class      = bridge
      subclass   = PCI-ISA
 none0@pci0:0:1:1:    class=0x0c0500 card=0x00e41849 chip=0x00e410de
 rev=0xa1 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 PCI System Management'
      class      = serial bus
      subclass   = SMBus
 ohci0@pci0:0:2:0:    class=0x0c0310 card=0x00e71849 chip=0x00e710de
 rev=0xa1 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 OpenHCD USB Controller'
      class      = serial bus
      subclass   = USB
 ohci1@pci0:0:2:1:    class=0x0c0310 card=0x00e71849 chip=0x00e710de
 rev=0xa1 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 OpenHCD USB Controller'
      class      = serial bus
      subclass   = USB
 ehci0@pci0:0:2:2:    class=0x0c0320 card=0x00e81849 chip=0x00e810de
 rev=0xa2 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 Enhanced PCI to USB Controller'
      class      = serial bus
      subclass   = USB
 atapci0@pci0:0:8:0:    class=0x01018a card=0x00e51849 chip=0x00e510de
 rev=0xa2 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 Parallel ATA Controller'
      class      = mass storage
      subclass   = ATA
 atapci1@pci0:0:10:0:    class=0x010185 card=0x00e31849 chip=0x00e310de
 rev=0xa2 hdr=0x00
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 Serial ATA Controller'
      class      = mass storage
      subclass   = ATA
 pcib1@pci0:0:11:0:    class=0x060400 card=0x00000000 chip=0x00e210de
 rev=0xa2 hdr=0x01
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 AGP Host to PCI Bridge'           <=====
      class      = bridge
      subclass   = PCI-PCI
 pcib2@pci0:0:14:0:    class=0x060400 card=0x00000000 chip=0x00ed10de
 rev=0xa2 hdr=0x01
      vendor     = 'Nvidia Corp'
      device     = 'nForce3 250 PCI-PCI Bridge'                   <=====
      class      = bridge
      subclass   = PCI-PCI
 hostb1@pci0:0:16:0:    class=0x060000 card=0x00000000 chip=0x169510b9
 rev=0x00 hdr=0x00
      vendor     = 'Acer Labs Incorporated (ALi/ULi)'
      device     = 'ULi M1695 K8 Northbridge with PCIe and hypertransport'
      class      = bridge
      subclass   = HOST-PCI
 pcib3@pci0:0:17:0:    class=0x060400 card=0x00000000 chip=0x524b10b9
 rev=0x00 hdr=0x01
      vendor     = 'Acer Labs Incorporated (ALi/ULi)'
      device     = 'ALi PCIe Bridge'
      class      = bridge
      subclass   = PCI-PCI
 pcib4@pci0:0:18:0:    class=0x060400 card=0x00000000 chip=0x524c10b9
 rev=0x00 hdr=0x01
      vendor     = 'Acer Labs Incorporated (ALi/ULi)'
      device     = 'ALi PCIe Bridge'
      class      = bridge
      subclass   = PCI-PCI
 pcib5@pci0:0:19:0:    class=0x060400 card=0x00000000 chip=0x524d10b9
 rev=0x00 hdr=0x01
      vendor     = 'Acer Labs Incorporated (ALi/ULi)'
      class      = bridge
      subclass   = PCI-PCI
 hostb2@pci0:0:24:0:    class=0x060000 card=0x00000000 chip=0x12001022
 rev=0x00 hdr=0x00
      vendor     = 'Advanced Micro Devices (AMD)'
      device     = '(Family 10h) Athlon 64/Opteron/Sempron HyperTransport
 Technology Configuration'
      class      = bridge
      subclass   = HOST-PCI
 hostb3@pci0:0:24:1:    class=0x060000 card=0x00000000 chip=0x12011022
 rev=0x00 hdr=0x00
      vendor     = 'Advanced Micro Devices (AMD)'
      device     = '(Family 10h) Athlon 64/Opteron/Sempron Address Map'
      class      = bridge
      subclass   = HOST-PCI
 hostb4@pci0:0:24:2:    class=0x060000 card=0x00000000 chip=0x12021022
 rev=0x00 hdr=0x00
      vendor     = 'Advanced Micro Devices (AMD)'
      device     = '(Family 10h) Athlon 64/Opteron/Sempron DRAM Controller'
      class      = bridge
      subclass   = HOST-PCI
 hostb5@pci0:0:24:3:    class=0x060000 card=0x00000000 chip=0x12031022
 rev=0x00 hdr=0x00
      vendor     = 'Advanced Micro Devices (AMD)'
      device     = '(Family 10h) Athlon 64/Opteron/Sempron Miscellaneous
 Control'
      class      = bridge
      subclass   = HOST-PCI
 hostb6@pci0:0:24:4:    class=0x060000 card=0x00000000 chip=0x12041022
 rev=0x00 hdr=0x00
      vendor     = 'Advanced Micro Devices (AMD)'
      device     = '(Family 10h) Athlon 64/Opteron/Sempron Link Control'
      class      = bridge
      subclass   = HOST-PCI
 vgapci0@pci0:4:0:0:    class=0x030000 card=0x0f84102b chip=0x2527102b
 rev=0x01 hdr=0x00
      vendor     = 'Matrox Electronic Systems Ltd.'
      device     = 'MGA-G550 AGP Chipset'                         <=====
      class      = display
      subclass   = VGA
 atapci2@pci0:1:0:0:    class=0x010185 card=0x23631849 chip=0x2363197b
 rev=0x03 hdr=0x00
      vendor     = 'JMicron Technology Corp'
      device     = 'JMB36X PCIe-to-SATA-300/IDE RAID Controller'
      class      = mass storage
      subclass   = ATA
 re0@pci0:2:0:0:    class=0x020000 card=0x81681849 chip=0x816810ec rev=0x01
 hdr=0x00
      vendor     = 'Realtek Semiconductor'
      device     = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC'
      class      = network
      subclass   = ethernet
 

From: Jung-uk Kim <jkim@FreeBSD.org>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Fri, 9 Jan 2009 20:18:15 -0500

 --Boundary-00=_Zd/ZJSDiHtjWCQY
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Please try the attached patch.
 
 Thanks,
 
 Jung-uk Kim
 
 --Boundary-00=_Zd/ZJSDiHtjWCQY
 Content-Type: text/x-diff;
   charset="iso-8859-1";
   name="agp_amd64.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="agp_amd64.diff"
 
 --- sys/dev/agp/agp_amd64.c	12 Nov 2007 21:51:36 -0000	1.16
 +++ sys/dev/agp/agp_amd64.c	10 Jan 2009 01:06:15 -0000
 @@ -167,14 +167,16 @@
  {
  	struct agp_amd64_softc *sc = device_get_softc(dev);
  	struct agp_gatt *gatt;
 +	uint32_t devid;
  	int i, n, error;
  
 -	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
 -		if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
 +	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
 +		devid = pci_cfgregread(0, i, 3, 0, 4);
 +		if (devid == 0x11031022 || devid == 0x12021022) {
  			sc->mctrl[n] = i;
  			n++;
  		}
 -
 +	}
  	if (n == 0)
  		return (ENXIO);
  
 
 --Boundary-00=_Zd/ZJSDiHtjWCQY--

From: Jung-uk Kim <jkim@FreeBSD.org>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 03:15:15 -0500

 --Boundary-00=_fkFaJ/XnkvM/hij
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 On Friday 09 January 2009 08:18 pm, Jung-uk Kim wrote:
 > Please try the attached patch.
 
 There was a typo.  Please try this instead.
 
 Sorry,
 
 Jung-uk Kim
 
 --Boundary-00=_fkFaJ/XnkvM/hij
 Content-Type: text/plain;
   charset="iso-8859-1";
   name="agp_amd64.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="agp_amd64.diff"
 
 --- sys/dev/agp/agp_amd64.c	12 Nov 2007 21:51:36 -0000	1.16
 +++ sys/dev/agp/agp_amd64.c	10 Jan 2009 01:06:15 -0000
 @@ -167,14 +167,16 @@
  {
  	struct agp_amd64_softc *sc = device_get_softc(dev);
  	struct agp_gatt *gatt;
 +	uint32_t devid;
  	int i, n, error;
  
 -	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
 -		if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
 +	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
 +		devid = pci_cfgregread(0, i, 3, 0, 4);
 +		if (devid == 0x11031022 || devid == 0x12031022) {
  			sc->mctrl[n] = i;
  			n++;
  		}
 -
 +	}
  	if (n == 0)
  		return (ENXIO);
  
 
 --Boundary-00=_fkFaJ/XnkvM/hij--

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: Jung-uk Kim <jkim@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 16:20:47 +0100

 Thanks a lot!
 
 The patch vanishes the main
 . . "error: [drm:pid0:drm_load]
 . . *ERROR* Card isn't AGP, or couldn't initialize AGP."
 message reported.
 
 
 Would you mind to comment upon the
 additional "|| devid == 0x12031022", please?
 
 Further on, would you please be so kind to help in understanding
 the allocation upon the two sequential host bridges?
 
 
 Thank you very much in advance!
 
 Kind regards from Munich, Germany
 
 Manfred Knick
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 
 
 Problems that still remain:
 
 
 . . o) Why only support AGP 4x,
 . .    although the HW is specified as being capable of running AGP 8x ?
 
 . . o) remaining (EE) / (WW) starting the X server :
 
 . . . . o) (WW) OS did not count PCI devices, guessing wildly
 
 . . . . o) (==) MGA(0): Using AGP 1x mode               <===  !?! 8x ???
 
 . . . . o) (EE) Cannot find empty range to map base to
 . . . .    (WW) MGA(0): Video BIOS info block not detected!
 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 
 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
 
 agp0: <NVIDIA nForce3-250 AGP Controller> on hostb0
 
 vgapci0: <VGA-compatible display> mem
 0xfa000000-0xfbffffff,0xfebfc000-0xfebfffff,0xfe000000-0xfe7fffff irq 16
 at device 0.0 on pci4
 
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 
 drm0: <Matrox G550 (AGP)> on vgapci0
 info: [drm] AGP at 0xf4000000 64MB
 info: [drm] Initialized mga 3.2.2 20060319
 info: [drm] Initialized card for AGP DMA.
 drm0: [ITHREAD]
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 
 hostb0@pci0:0:0:0:	class=0x060000 card=0x00e11849 chip=0x00e110de
 rev=0xa1 hdr=0x00
      cap 08[44] = HT slave
      cap 02[c0] = AGP 4x 2x 1x SBA disabled
 
 hostb1@pci0:0:16:0:	class=0x060000 card=0x00000000 chip=0x169510b9
 rev=0x00 hdr=0x00
      cap 08[40] = HT slave
      cap 08[5c] = HT MSI address window disabled at 0xfee00000
      cap 08[68] = HT unit ID clumping
      cap 08[74] = HT interrupt
      cap 05[7c] = MSI supports 2 messages, 64 bit
 
 vgapci0@pci0:4:0:0:	class=0x030000 card=0x0f84102b chip=0x2527102b
 rev=0x01 hdr=0x00
      cap 01[dc] = powerspec 2  supports D0 D3  current D0
      cap 02[f0] = AGP 4x 2x 1x SBA disabled
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 
 (WW) OS did not count PCI devices, guessing wildly
 (II) PCI: PCI scan (all values are in hex)
 (II) PCI: 00:00:0: chip 10de,00e1 card 1849,00e1 rev a1 class 06,00,00
 hdr 00
 (II) PCI: 00:01:0: chip 10de,00e0 card 1849,00e0 rev a2 class 06,01,00
 hdr 80
 (II) PCI: 00:01:1: chip 10de,00e4 card 1849,00e4 rev a1 class 0c,05,00
 hdr 80
 (II) PCI: 00:02:0: chip 10de,00e7 card 1849,00e7 rev a1 class 0c,03,10
 hdr 80
 (II) PCI: 00:02:1: chip 10de,00e7 card 1849,00e7 rev a1 class 0c,03,10
 hdr 80
 (II) PCI: 00:02:2: chip 10de,00e8 card 1849,00e8 rev a2 class 0c,03,20
 hdr 80
 (II) PCI: 00:08:0: chip 10de,00e5 card 1849,00e5 rev a2 class 01,01,8a
 hdr 00
 (II) PCI: 00:0a:0: chip 10de,00e3 card 1849,00e3 rev a2 class 01,01,85
 hdr 00
 (II) PCI: 00:0b:0: chip 10de,00e2 card 0000,0000 rev a2 class 06,04,00
 hdr 01
 (II) PCI: 00:0e:0: chip 10de,00ed card 0000,0000 rev a2 class 06,04,00
 hdr 01
 (II) PCI: 00:10:0: chip 10b9,1695 card 0000,0000 rev 00 class 06,00,00
 hdr 00
 (II) PCI: 00:11:0: chip 10b9,524b card 0000,0000 rev 00 class 06,04,00
 hdr 01
 (II) PCI: 00:12:0: chip 10b9,524c card 0000,0000 rev 00 class 06,04,00
 hdr 01
 (II) PCI: 00:13:0: chip 10b9,524d card 0000,0000 rev 00 class 06,04,00
 hdr 01
 (II) PCI: 00:18:0: chip 1022,1200 card 0000,0000 rev 00 class 06,00,00
 hdr 80
 (II) PCI: 00:18:1: chip 1022,1201 card 0000,0000 rev 00 class 06,00,00
 hdr 80
 (II) PCI: 00:18:2: chip 1022,1202 card 0000,0000 rev 00 class 06,00,00
 hdr 80
 (II) PCI: 00:18:3: chip 1022,1203 card 0000,0000 rev 00 class 06,00,00
 hdr 80
 (II) PCI: 00:18:4: chip 1022,1204 card 0000,0000 rev 00 class 06,00,00
 hdr 80
 (II) PCI: 01:00:0: chip 197b,2363 card 1849,2363 rev 03 class 01,01,85
 hdr 00
 (II) PCI: 02:00:0: chip 10ec,8168 card 1849,8168 rev 01 class 02,00,00
 hdr 00
 (II) PCI: 04:00:0: chip 102b,2527 card 102b,0f84 rev 01 class 03,00,00
 hdr 00
 (II) PCI: End of PCI scan
 (II) Host-to-PCI bridge:
 ...
 (II) Bus 2: bridge is at (0:19:0), (0,2,2), BCTRL: 0x0003 (VGA_EN is
 cleared)
 (II) Bus 2 I/O range:
 	[0] -1	0	0x0000e000 - 0x0000efff (0x1000) IX[B]
 (II) Bus 2 non-prefetchable memory range:
 	[0] -1	0	0xfdf00000 - 0xfdffffff (0x100000) MX[B]
 (--) PCI:*(4:0:0) Matrox Graphics, Inc. MGA G550 AGP rev 1, Mem @
 0xfa000000/25, 0xfebfc000/14, 0xfe000000/23, BIOS @ 0xfebc0000/17
 ...
 (II) LoadModule: "mga"
 (II) Loading /usr/local/lib/xorg/modules/drivers//mga_drv.so
 (II) Module mga: vendor="X.Org Foundation"
 	compiled for 1.4.2, module version = 1.4.9
 	Module class: X.Org Video Driver
 	ABI class: X.Org Video Driver, version 2.0
 ...
 (II) MGA: driver for Matrox chipsets: mga2064w, mga1064sg, mga2164w,
 	mga2164w AGP, mgag100, mgag100 PCI, mgag200, mgag200 PCI,
 	mgag200 SE A PCI, mgag200 SE B PCI, mgag200 Maxim, mgag200 Winbond,
 	mgag400, mgag550
 (II) Primary Device is: PCI 04:00:0
 (--) Chipset mgag550 found
 ...
 (II) Loading sub module "vgahw"
 (II) LoadModule: "vgahw"
 (II) Loading /usr/local/lib/xorg/modules//libvgahw.so
 (II) Module vgahw: vendor="X.Org Foundation"
 	compiled for 1.4.2, module version = 0.1.0
 	ABI class: X.Org Video Driver, version 2.0
 (--) MGA(0): Chipset: "mgag550"
 (==) MGA(0): Depth 24, (==) framebuffer bpp 32
 (==) MGA(0): RGB weight 888
 (**) MGA(0): Option "DRI" "TRUE"
 (==) MGA(0): Using AGP 1x mode
 (==) MGA(0): Using HW cursor
 (==) MGA(0): Using XAA acceleration
 (--) MGA(0): Linear framebuffer at 0xFA000000
 (==) MGA(0): MMIO registers at 0xFEBFC000
 (--) MGA(0): Pseudo-DMA transfer window at 0xFE000000
 (--) MGA(0): BIOS at 0xFEBC0000
 Requesting insufficient memory window!: start: 0xfe000000 end:
 0xfebfffff size 0x2000000
 (EE) Cannot find empty range to map base to
 (WW) MGA(0): Video BIOS info block not detected!
 (==) MGA(0): Write-combining range (0xfebfc000,0x4000) was already clear
 (==) MGA(0): Write-combining range (0xfa000000,0x2000000)
 (==) MGA(0): Write-combining range (0xfe000000,0x800000) was already clear
 (--) MGA(0): VideoRAM: 32768 kByte
 ...
 (II) LoadModule: "i2c"(II) Module "i2c" already built-in
 ...
 

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: Jung-uk Kim <jkim@FreeBSD.org>, bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 18:12:20 +0100

 Robert Noland schrieb:
 ...
  > On Sat, 2009-01-10 at 16:37 +0100, Manfred_Knick wrote:
 ...
  > I'm not sure that we support 8x at all or if xorg does either.
 
 XOrg does support 8x, 4x, 2x, 1x .
 
  >> . . . . o) (WW) OS did not count PCI devices, guessing wildly
  > This is normal on all FreeBSD and is harmless.
 ...
  >>   . . . . o) (==) MGA(0): Using AGP 1x mode         <===  !?! 8x ???
  > X defaults to 1x.
 ...
 
 I have already investigated setting
 . . . . . . . . . . . . . . . . . . . . Options "AGPMode" "8"
 in xorg.conf;
 this results into:
 
 # grep "AGP" /var/log/Xorg.0.log
 (**) MGA(0): Option "AGPMode" "8"
 (**) MGA(0): Using AGP 4x mode
 
 I think this is because XOrg falls back
 to the maximum reported . . . . . . . . "cap ... = AGP 4x ..."
 which does make sense.
 
 Thus the question remains as:
 . . . Why does the PCI system does not recognize
 . . . . . . . . . . . . . . . . . . . . "cap ... = AGP 8x ..." ?
 
  >>         . . . . o) (EE) Cannot find empty range to map base to
  >>         . . . .    (WW) MGA(0): Video BIOS info block not detected!
  >
  > I'm not sure about this one, but if it appears to effect useability, I
  > can try and deal with this.  This is almost certainly an xorg driver
  > issue, not a kernel issue.
 

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: Robert Noland <rnoland@FreeBSD.org>
Cc: Jung-uk Kim <jkim@FreeBSD.org>, bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 19:01:45 +0100

 > . . . Why does the PCI system does not recognize
 > . . . . . . . . . . . . . . . . . . . . "cap ... = AGP 8x ..." ?
 
 The BIOS already only offers [ 4x , 2x , 1x ]
 as it's possible configuration alternatives !
 
 Updating the BIOS from v1.30 to (latest) v1.50
 gave the same result.
 
 This is defenitely in contrast to the spec of the motherboard:
 . . . "1 x AGP 8X slot"
 ( http://www.asrock.com/mb/overview.asp?Model=ALiveDual-eSATA2 ) .
 
 I fear I will have to check that with the manufacturer of the board.

From: Robert Noland <rnoland@FreeBSD.org>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: Jung-uk Kim <jkim@FreeBSD.org>, bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 13:05:07 -0500

 --=-L+vW5A/P5Sx0YE3oQR2s
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 On Sat, 2009-01-10 at 19:01 +0100, Manfred_Knick wrote:
 > > . . . Why does the PCI system does not recognize
 > > . . . . . . . . . . . . . . . . . . . . "cap ... =3D AGP 8x ..." ?
 >=20
 > The BIOS already only offers [ 4x , 2x , 1x ]
 > as it's possible configuration alternatives !
 >=20
 > Updating the BIOS from v1.30 to (latest) v1.50
 > gave the same result.
 
 Yes, I was just looking over the agp code, and if all of the devices are
 AGPv3 capable, it should allow 8x to be enabled if supported.
 
 robert.
 
 > This is defenitely in contrast to the spec of the motherboard:
 > . . . "1 x AGP 8X slot"
 > ( http://www.asrock.com/mb/overview.asp?Model=3DALiveDual-eSATA2 ) .
 >=20
 > I fear I will have to check that with the manufacturer of the board.
 
 --=-L+vW5A/P5Sx0YE3oQR2s
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.9 (FreeBSD)
 
 iEYEABECAAYFAklo41MACgkQM4TrQ4qfROMV4QCfWPMb5f/gjEQ+xu5zAszGNlJD
 E30An0FcnMF017MfTnnjQJPX03bzpsUw
 =0Ej3
 -----END PGP SIGNATURE-----
 
 --=-L+vW5A/P5Sx0YE3oQR2s--
 

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: Robert Noland <rnoland@FreeBSD.org>
Cc: Jung-uk Kim <jkim@FreeBSD.org>, bug-followup@FreeBSD.org
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sat, 10 Jan 2009 23:12:34 +0100

  > + if (devid == 0x11031022 || devid == 0x12031022)
 
 
 . * vendor: 1022 ("Advanced Micro Devices [AMD]")
 
 . . * device: 1103
 . . . ("K8 [Athlon64/Opteron] Miscellaneous Control")
 
 . . * device: 1203
 . . . ("Family 10h [Opteron, Athlon64, Sempron] Miscellaneous Control")
 
 
 Question 1:
 
 So this implies that the sys/dev/agp/agp_amd64 module till now
 was prepared to expect a K8 processor being it's "pci father",
 but not a Phenom yet ?
 
 
 Question 2:
 
 The M1695 "Tunnel Chip" HW-tunnelling is completely transparent
 and thus there is no need to explicitly model this
 HyperTransport_Link hierarchy in any kernel at all ?
 
 
 Kind regards
 Manfred

From: Manfred_Knick <Manfred.Knick@T-Online.de>
To: bug-followup@FreeBSD.org, Manfred.Knick@T-Online.de, 
 Jung-uk Kim <jkim@FreeBSD.org>,
 Robert Noland <rnoland@FreeBSD.org>
Cc:  
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sun, 11 Jan 2009 11:28:40 +0100

 *Clarification*
 
  > Why does the PCI system does not recognize
  > . . . . . . . . . "cap ... = AGP 8x ..." ?
 
  > The BIOS already only offers [ 4x , 2x , 1x ]
 
 
 Esp. at the time of purchase the tech spec on the
 Matrox pages have been very misleading.
 
 Now, at the time of this writing, they state
 
 . - in the "description":
 . . that this G550 is "compatible"
 . . to all (1x, 2x, 4x and 8x) AGP slots
 
 . - in the "spec":
 . . that this G550 is AGP 4x
 . . being compatible with all slot types
 . . . . (0.8, 1.5 or 3.3 V)
 
 THUS:
 
 Neither ASRock nor any OS are to blame for "<= 4x" at all.
 
 I apologize having forwarded my "being trapped" into wrong expectations.
 
 Kind regards
 Manfred

From: Robert Noland <rnoland@FreeBSD.org>
To: Manfred_Knick <Manfred.Knick@T-Online.de>
Cc: bug-followup@FreeBSD.org, Jung-uk Kim <jkim@FreeBSD.org>
Subject: Re: kern/128331: [agp] nForce3-250 AGP not detected correctly
Date: Sun, 11 Jan 2009 09:37:56 -0500

 --=-4rGlj5zJAxaeDrxCBm22
 Content-Type: text/plain
 Content-Transfer-Encoding: quoted-printable
 
 On Sun, 2009-01-11 at 11:28 +0100, Manfred_Knick wrote:
 > *Clarification*
 >=20
 >  > Why does the PCI system does not recognize
 >  > . . . . . . . . . "cap ... =3D AGP 8x ..." ?
 >=20
 >  > The BIOS already only offers [ 4x , 2x , 1x ]
 >=20
 >=20
 > Esp. at the time of purchase the tech spec on the
 > Matrox pages have been very misleading.
 >=20
 > Now, at the time of this writing, they state
 >=20
 > . - in the "description":
 > . . that this G550 is "compatible"
 > . . to all (1x, 2x, 4x and 8x) AGP slots
 >=20
 > . - in the "spec":
 > . . that this G550 is AGP 4x
 > . . being compatible with all slot types
 > . . . . (0.8, 1.5 or 3.3 V)
 >=20
 > THUS:
 >=20
 > Neither ASRock nor any OS are to blame for "<=3D 4x" at all.
 
 > I apologize having forwarded my "being trapped" into wrong expectations.
 
 No worries, glad it is working now.
 
 robert.
 
 > Kind regards
 > Manfred
 
 --=-4rGlj5zJAxaeDrxCBm22
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: This is a digitally signed message part
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.9 (FreeBSD)
 
 iEYEABECAAYFAklqBEQACgkQM4TrQ4qfROOsTQCcDf2B2HNHYoIG9sjf5lmebMcQ
 9wAAnRxmNBNeZlPluCdx2dnKvVUAVW7A
 =CL1n
 -----END PGP SIGNATURE-----
 
 --=-4rGlj5zJAxaeDrxCBm22--
 
State-Changed-From-To: open->closed 
State-Changed-By: jkim 
State-Changed-When: Mon Jan 12 16:08:36 UTC 2009 
State-Changed-Why:  
Fix committed to HEAD.  Will be MFC'ed in 3 days.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128331 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/128331: commit references a PR
Date: Mon, 12 Jan 2009 16:07:18 +0000 (UTC)

 Author: jkim
 Date: Mon Jan 12 16:07:03 2009
 New Revision: 187100
 URL: http://svn.freebsd.org/changeset/base/187100
 
 Log:
   Add support for AMD64 Family 10h processors.
   
   PR:		kern/128331
   MFC after:	3 days
 
 Modified:
   head/sys/dev/agp/agp_amd64.c
 
 Modified: head/sys/dev/agp/agp_amd64.c
 ==============================================================================
 --- head/sys/dev/agp/agp_amd64.c	Mon Jan 12 15:48:22 2009	(r187099)
 +++ head/sys/dev/agp/agp_amd64.c	Mon Jan 12 16:07:03 2009	(r187100)
 @@ -167,14 +167,16 @@ agp_amd64_attach(device_t dev)
  {
  	struct agp_amd64_softc *sc = device_get_softc(dev);
  	struct agp_gatt *gatt;
 +	uint32_t devid;
  	int i, n, error;
  
 -	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
 -		if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
 +	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
 +		devid = pci_cfgregread(0, i, 3, 0, 4);
 +		if (devid == 0x11031022 || devid == 0x12031022) {
  			sc->mctrl[n] = i;
  			n++;
  		}
 -
 +	}
  	if (n == 0)
  		return (ENXIO);
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/128331: commit references a PR
Date: Wed, 21 Jan 2009 17:08:03 +0000 (UTC)

 Author: jkim
 Date: Wed Jan 21 17:07:46 2009
 New Revision: 187539
 URL: http://svn.freebsd.org/changeset/base/187539
 
 Log:
   MFC: Add support for AMD64 Family 10h processors.
   
   PR:		kern/128331
 
 Modified:
   stable/7/sys/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
   stable/7/sys/dev/ath/ath_hal/   (props changed)
   stable/7/sys/dev/cxgb/   (props changed)
   stable/7/sys/pci/agp_amd64.c
 
 Modified: stable/7/sys/pci/agp_amd64.c
 ==============================================================================
 --- stable/7/sys/pci/agp_amd64.c	Wed Jan 21 17:07:23 2009	(r187538)
 +++ stable/7/sys/pci/agp_amd64.c	Wed Jan 21 17:07:46 2009	(r187539)
 @@ -167,14 +167,16 @@ agp_amd64_attach(device_t dev)
  {
  	struct agp_amd64_softc *sc = device_get_softc(dev);
  	struct agp_gatt *gatt;
 +	uint32_t devid;
  	int i, n, error;
  
 -	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++)
 -		if (pci_cfgregread(0, i, 3, 0, 4) == 0x11031022) {
 +	for (i = 0, n = 0; i < PCI_SLOTMAX && n < AMD64_MAX_MCTRL; i++) {
 +		devid = pci_cfgregread(0, i, 3, 0, 4);
 +		if (devid == 0x11031022 || devid == 0x12031022) {
  			sc->mctrl[n] = i;
  			n++;
  		}
 -
 +	}
  	if (n == 0)
  		return (ENXIO);
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
