Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2002 10:17:32 -0700 (PDT)
From:      "Thomas D. Dean" <tomdean@speakeasy.org>
To:        freebsd-hackers@freeBSD.org
Cc:        wvengen@stack.nl
Subject:   ASUS A7n266-E, nVidia nForce IGP-128 and SMBus
Message-ID:  <200206111717.g5BHHW1G002401@asus.tddhome>
In-Reply-To: <20020611163122.796474d2.wvengen@stack.nl> (message from Willem van Engen on Tue, 11 Jun 2002 16:31:22 %2B0200)
References:  <200206100201.g5A21Etw001441@asus.tddhome> <20020611163122.796474d2.wvengen@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
I moved this discussion to -hackers, as suggested.  I tried -hardware,
but, no response.

I have an ASUS A7N266-E motherboard with the nVidia nForce IGP-128
Northbridge chip, nVidia nForce MCP Southbridge chip, and AMD XP 1800.

# uname -a
FreeBSD asus 4.6-RC FreeBSD 4.6-RC #8: Mon Jun 10 19:11:16 PDT 2002 \
    root@asus:/usr/src/sys/compile/ASUS  i386

The nVidia chip is not supported.  I want to access the SMBus to add
some devices.

Of course, ASUS and nVidia will not provide the information necessary
to do this easily!

I have attached the output of pciconf -lv and dmesg w/ bootverbose.

From a previos discussion, the smbus drivers provide the smbus
attached to one of several busses, iicsmb, bti2c, intsmb, alsmb,
ichsmb, amdsmb, or viapropm.

The nearest one to my motherboard is:

pci---amdpm---amdsmb---smbus---smb

The nVidia chip is similar to the definitions in sys/pci/pcireg.h and
from lm-sensors, rumored to be similar to the AMD-758 chipset.

I tried patching sys/pci/amdpm.c to recognize the nVidia chip.  No
glory.  The maps are at 0x10.  Amdpm.c uses a map from 0x58 for the
power management stuff.  I guess, see below, the proper map is at
0x18.

# pciconf -r pci0:1:1 0x00:0xff
0x01b410de 0x00b00001 0x0c0500c1 0x00800000
0x00005001 0x00005501 0x00005101 0x00000000
0x00000000 0x00000000 0x00000000 0x0c111043
0x00000000 0x00000044 0x00000000 0x01030105
0x0c111043 0xc0020001 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000
...
0x00000000 0x00000000 0x00000000 0x00000000

The chip has 3 map registers containing 0x00005001, 0x00005501, and
0x00005101, respectively.  These are map pointers.  I assume these are
physical addresses?  How do I determine the block sizes?  What is in
these memory blocks?

I cobbled together a kld from amdpm, smbus, etc.  Loading it produced
some information.  But, I could not unload it and it did nothing...
Also, the 0x5500 memory block was duplicated by some of the underlying
code...  One line from the console:

SMBus0: <NVidia nForce Power Management Controller> port
        0x5500-0x550f,0x5100-0x511f,0x5500-0x550f,0x5000-0x500f irq 5
        at device 1.1 on pci0

I think the blocks are 5000:501f, 5500:550f, and 5100:511f.  From
sizes, I think the 5100:511f block is power management. If so, I can
guess at some of the definitions.

The PCIR_HEADERTYPE is 0x80.  What is PCIM_MFDEV?  Modified Device?
The header appears to be a type 0 with PCIR_SUBVEND_2 and
PCIR_SUBDEV_2 from the type 2 header.

PCIR_CAP_PTR is the start of the capaility list, the the only
capability lword being 0xc0020001.  Where do I get the definition of
this lword?

tomdean

==== pciconf -lv ======================================
chip0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x01a410de rev=0xb2 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce AGP Controller'
    class    = bridge
    subclass = HOST-PCI
none0@pci0:0:1: class=0x050000 card=0x0c111043 chip=0x01ac10de rev=0xb2 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce 220/420 Memory Controller'
    class    = memory
    subclass = RAM
none1@pci0:0:2: class=0x050000 card=0x0c111043 chip=0x01ad10de rev=0xb2 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce 220/420 Memory Controller'
    class    = memory
    subclass = RAM
none2@pci0:0:3: class=0x050000 card=0x0c111043 chip=0x01ab10de rev=0xb2 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce 420 Memory Controller (DDR)'
    class    = memory
    subclass = RAM
isab0@pci0:1:0: class=0x060100 card=0x0c111043 chip=0x01b210de rev=0xc3 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce HUB Interface'
    class    = bridge
    subclass = PCI-ISA
none3@pci0:1:1: class=0x0c0500 card=0x0c111043 chip=0x01b410de rev=0xc1 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce SMBus Controller'
    class    = serial bus
    subclass = SMBus
ohci0@pci0:2:0: class=0x0c0310 card=0x0c111043 chip=0x01c210de rev=0xc3 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce OHCI USB Controller'
    class    = serial bus
    subclass = USB
ohci1@pci0:3:0: class=0x0c0310 card=0x0c111043 chip=0x01c210de rev=0xc3 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce OHCI USB Controller'
    class    = serial bus
    subclass = USB
pcib1@pci0:8:0: class=0x060400 card=0x00000044 chip=0x01b810de rev=0xc2 hdr=0x01
    vendor   = 'Nvidia Corporation'
    device   = 'nForce PCI Bridge'
    class    = bridge
    subclass = PCI-PCI
atapci0@pci0:9:0:       class=0x01018a card=0x0c111043 chip=0x01bc10de rev=0xc3 hdr=0x00
    vendor   = 'Nvidia Corporation'
    device   = 'nForce ATA Controller'
    class    = mass storage
    subclass = ATA
pcib2@pci0:30:0:        class=0x060400 card=0x00000000 chip=0x01b710de rev=0xb2 hdr=0x01
    vendor   = 'Nvidia Corporation'
    device   = 'nForce AGP Host to PCI Bridge'
    class    = bridge
    subclass = PCI-PCI
rl0@pci1:2:0:   class=0x020000 card=0x805b1043 chip=0x813910ec rev=0x10 hdr=0x00
    vendor   = 'Realtek Semiconductor'
    device   = 'RT8139 (A/B/C/8130) Fast Ethernet Adapter'
    class    = network
    subclass = ethernet
none4@pci2:0:0: class=0x030000 card=0x003a1002 chip=0x51591002 rev=0x00 hdr=0x00
    vendor   = 'ATI Technologies'
    device   = 'Radeon VE QY'
    class    = display
    subclass = VGA

==== from dmesg - only the last boot ==================
syncing disks... 8 1 
done
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.6-RC #8: Mon Jun 10 19:11:16 PDT 2002
    root@asus:/usr/src/sys/compile/ASUS
Calibrating clock(s) ... TSC clock: 1536760511 Hz, i8254 clock: 1193137 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
CPU: AMD Athlon(TM) XP 1800+ (1536.83-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0480000<<b19>,AMIE,DSP,3DNow!>
Data TLB: 32 entries, fully associative
Instruction TLB: 16 entries, fully associative
L1 data cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L1 instruction cache: 64 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
L2 internal cache: 256 kbytes, 64 bytes/line, 1 lines/tag, 8-way associative
real memory  = 536788992 (524208K bytes)
Physical memory chunk(s):
0x00001000 - 0x0009efff, 647168 bytes (158 pages)
0x0034e000 - 0x1ffe3fff, 533291008 bytes (130198 pages)
avail memory = 519471104 (507296K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00f2180
bios32: Entry = 0xf1870 (c00f1870)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0x1a70
pnpbios: Found PnP BIOS data at 0xc00fbe80
pnpbios: Entry = f0000:beb0  Rev = 1.0
pnpbios: OEM ID cd041
Other BIOS signatures found:
ACPI: 000f7d30
Preloaded elf kernel "kernel" at 0xc0327000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc032709c.
Pentium Pro MTRR support enabled
md0: Malloc disk
Creating DISK md0
pci_open(1):    mode 1 addr port (0x0cf8) is 0x80000000
pci_open(1a):   mode1res=0x80000000 (0x80000000)
pci_cfgcheck:   device 0 [class=060000] [hdr=80] is there (id=01a410de)
Using $PIR table, 14 entries at 0xc00f2070
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
found-> vendor=0x10de, dev=0x01a4, revid=0xb2
        class=06-00-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
pci_add_map vendor 10de device 1a4  reg 10  map f8000008  base f8000000 
        map[10]: type 1, range 32, base f8000000, size 26
found-> vendor=0x10de, dev=0x01ac, revid=0xb2
        class=05-00-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
found-> vendor=0x10de, dev=0x01ad, revid=0xb2
        class=05-00-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
found-> vendor=0x10de, dev=0x01ab, revid=0xb2
        class=05-00-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
found-> vendor=0x10de, dev=0x01b2, revid=0xc3
        class=06-01-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
found-> vendor=0x10de, dev=0x01b4, revid=0xc1
        class=0c-05-00, hdrtype=0x00, mfdev=1
        subordinatebus=0        secondarybus=0
        intpin=a, irq=5
pci_add_map vendor 10de device 1b4  reg 10  map 5001  base 5000 
        map[10]: type 1, range 32, base 00005000, size  4
pci_add_map vendor 10de device 1b4  reg 14  map 5501  base 5500 
        map[14]: type 1, range 32, base 00005500, size  4
pci_add_map vendor 10de device 1b4  reg 18  map 5101  base 5100 
        map[18]: type 1, range 32, base 00005100, size  5
found-> vendor=0x10de, dev=0x01c2, revid=0xc3
        class=0c-03-10, hdrtype=0x00, mfdev=0
        subordinatebus=0        secondarybus=0
        intpin=a, irq=10
pci_add_map vendor 10de device 1c2  reg 10  map ef000000  base ef000000 
        map[10]: type 1, range 32, base ef000000, size 12
found-> vendor=0x10de, dev=0x01c2, revid=0xc3
        class=0c-03-10, hdrtype=0x00, mfdev=0
        subordinatebus=0        secondarybus=0
        intpin=a, irq=10
pci_add_map vendor 10de device 1c2  reg 10  map ee800000  base ee800000 
        map[10]: type 1, range 32, base ee800000, size 12
found-> vendor=0x10de, dev=0x01b8, revid=0xc2
        class=06-04-00, hdrtype=0x01, mfdev=0
        subordinatebus=1        secondarybus=1
found-> vendor=0x10de, dev=0x01bc, revid=0xc3
        class=01-01-8a, hdrtype=0x00, mfdev=0
        subordinatebus=0        secondarybus=0
pci_add_map vendor 10de device 1bc  reg 20  map b801  base b800 
        map[20]: type 1, range 32, base 0000b800, size  4
found-> vendor=0x10de, dev=0x01b7, revid=0xb2
        class=06-04-00, hdrtype=0x01, mfdev=0
        subordinatebus=2        secondarybus=2
pci0: <PCI bus> on pcib0
pci0: <unknown card> (vendor=0x10de, dev=0x01ac) at 0.1
pci0: <unknown card> (vendor=0x10de, dev=0x01ad) at 0.2
pci0: <unknown card> (vendor=0x10de, dev=0x01ab) at 0.3
isab0: <PCI to ISA bridge (vendor=10de device=01b2)> at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <unknown card> (vendor=0x10de, dev=0x01b4) at 1.1 irq 5
ohci0: <OHCI (generic) USB controller> mem 0xef000000-0xef000fff irq 10 at device 2.0 on pci0
ohci0: (New OHCI DeviceId=0x01c210de)
usb0: OHCI version 1.0
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: (unknown) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xee800000-0xee800fff irq 10 at device 3.0 on pci0
ohci1: (New OHCI DeviceId=0x01c210de)
        using shared irq10.
usb1: OHCI version 1.0
usb1: <OHCI (generic) USB controller> on ohci1
usb1: USB revision 1.0
uhub1: (unknown) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
pcib1: <PCI to PCI bridge (vendor=10de device=01b8)> at device 8.0 on pci0
found-> vendor=0x10ec, dev=0x8139, revid=0x10
        class=02-00-00, hdrtype=0x00, mfdev=0
        subordinatebus=0        secondarybus=0
        intpin=a, irq=5
pci_add_map vendor 10ec device 8139  reg 10  map c801  base c800 
        map[10]: type 1, range 32, base 0000c800, size  8
pci_add_map vendor 10ec device 8139  reg 14  map ed000000  base ed000000 
        map[14]: type 1, range 32, base ed000000, size  8
pci1: <PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xc800-0xc8ff mem 0xed000000-0xed0000ff irq 5 at device 2.0 on pci1
rl0: Ethernet address: 00:e0:18:5a:03:fc
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
bpf: rl0 attached
atapci0: <nVIDIA nForce ATA100 controller> port 0xb800-0xb80f at device 9.0 on pci0
ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xb800
ata0: mask=03 ostat0=50 ostat2=50
ata0-master: ATAPI 00 00
ata0-slave: ATAPI 00 00
ata0: mask=03 stat0=50 stat1=50
ata0-master: ATA 01 a5
ata0-slave: ATA 01 a5
ata0: devices=03
ata0: at 0x1f0 irq 14 on atapci0
ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xb808
ata1: mask=03 ostat0=50 ostat2=00
ata1-master: ATAPI 14 eb
ata1-slave: ATAPI 7f 7f
ata1: mask=03 stat0=00 stat1=00
ata1: devices=04
ata1: at 0x170 irq 15 on atapci0
pcib2: <PCI to PCI bridge (vendor=10de device=01b7)> at device 30.0 on pci0
found-> vendor=0x1002, dev=0x5159, revid=0x00
        class=03-00-00, hdrtype=0x00, mfdev=0
        subordinatebus=0        secondarybus=0
        intpin=a, irq=11
pci_add_map vendor 1002 device 5159  reg 10  map f0000008  base f0000000 
        map[10]: type 1, range 32, base f0000000, size 27
pci_add_map vendor 1002 device 5159  reg 14  map a801  base a800 
        map[14]: type 1, range 32, base 0000a800, size  8
pci_add_map vendor 1002 device 5159  reg 18  map ec800000  base ec800000 
        map[18]: type 1, range 32, base ec800000, size 16
pci2: <PCI bus> on pcib2
pci2: <ATI model 5159 graphics accelerator> (vendor=0x1002, dev=0x5159) at 0.0 irq 11
ata-: ata0 exists, using next available unit number
ata-: ata1 exists, using next available unit number
Trying Read_Port at 203
Trying Read_Port at 243
Trying Read_Port at 283
Trying Read_Port at 2c3
Trying Read_Port at 303
Trying Read_Port at 343
Trying Read_Port at 383
Trying Read_Port at 3c3
isa_probe_children: disabling PnP devices
isa_probe_children: probing non-PnP devices
orm0: <Option ROM> at iomem 0xc0000-0xcafff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ata2 failed to probe at port 0x1f0 irq 14 on isa0
ata3 failed to probe at port 0x170 irq 15 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
atkbd: the current kbd controller command byte 0047
atkbd: keyboard ID 0x41ab (2)
kbd0 at atkbd0
kbd0: atkbd0, AT 101/102 (2), config:0x1, flags:0x3d0000
psm0: current command byte:0047
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0-00, 2 buttons
psm0: config:00000000, flags:00000000, packet size:3
psm0: syncmask:c0, syncbits:00
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fb0: vga0, vga, type:VGA (5), flags:0x7007f
fb0: port:0x3c0-0x3df, crtc:0x3d4, mem:0xa0000 0x20000
fb0: init mode:24, bios mode:3, current mode:24
fb0: window:0xc00b8000 size:32k gran:32k, buf:0 size:32k
VGA parameters upon power-up
50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 55 81 
bf 1f 00 4f 0d 0e 00 00 07 80 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
VGA parameters in BIOS for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81 
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
EGA/VGA parameters to be used for mode 24
50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81 
bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 
b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 
3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff 
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sc0: fb0, kbd0, terminal emulator: sc (syscons terminal)
sio0: irq maps: 0x41 0x51 0x41 0x41
sio0 at port 0x3f8-0x3ff irq 4 flags 0x90 on isa0
sio0: type 16550A
sio1: irq maps: 0x41 0x49 0x41 0x41
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: parallel port found at 0x378
ppc0: using extended I/O port range
ppc0: ECP SPP ECP+EPP SPP
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
bpf: lp0 attached
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
isa_probe_children: probing PnP devices
BIOS Geometries:
 0:03fffe3f 0..1023=1024 cylinders, 0..254=255 heads, 1..63=63 sectors
 1:03fffe3f 0..1023=1024 cylinders, 0..254=255 heads, 1..63=63 sectors
 0 accounted for
Device configuration finished.
bpf: ppp0 attached
new masks: bio 68c440, tty 63109a, net 6710ba
bpf: lo0 attached
ad0: success setting UDMA5 on nVIDIA chip
Creating DISK ad0
ar: FreeBSD check1 failed
ad0: <IC35L080AVVA07-0/VA4OA50K> ATA-5 disk at ata0-master
ad0: 78533MB (160836480 sectors), 159560 C, 16 H, 63 S, 512 B
ad0: 16 secs/int, 1 depth queue, UDMA100
ad0: piomode=4 dmamode=2 udmamode=5 cblid=1
ad1: success setting UDMA5 on nVIDIA chip
Creating DISK ad1
ar: FreeBSD check1 failed
ad1: <IC35L080AVVA07-0/VA4OA50K> ATA-5 disk at ata0-slave
ad1: 78533MB (160836480 sectors), 159560 C, 16 H, 63 S, 512 B
ad1: 16 secs/int, 1 depth queue, UDMA100
ad1: piomode=4 dmamode=2 udmamode=5 cblid=1
ata1-master: piomode=4 dmamode=2 udmamode=2 dmaflag=1
ata1-master: success setting PIO4 on generic chip
acd0: <CREATIVE CD5233E-N/0.20> CDROM drive at ata1 as master
acd0:  128KB buffer, PIO4
acd0: Reads: CD-R, CD-RW, CD-DA stream, packet
acd0: Writes:
acd0: Audio: play, 255 volume levels
acd0: Mechanism: ejectable tray, unlocked
acd0: Medium: no/blank disc
Mounting root from ufs:/dev/ad0s3a
ad0s1: type 0x6, start 63, end = 192779, size 192717 : OK
ad0s2: type 0x7, start 192780, end = 21157604, size 20964825 : OK
ad0s3: type 0xa5, start 21157605, end = 84068144, size 62910540 : OK
ad0s4: type 0xa5, start 84068145, end = 160826714, size 76758570 : OK
start_init: trying /sbin/init
ad1s1: type 0xa5, start 63, end = 160826714, size 160826652 : OK
ad1s1: type 0xa5, start 63, end = 160826714, size 160826652 : OK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206111717.g5BHHW1G002401>