From nobody@FreeBSD.org  Fri Jun  3 20:09:59 2011
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 C297A106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Jun 2011 20:09:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id B16868FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Jun 2011 20:09:59 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p53K9xZU046395
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 Jun 2011 20:09:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p53K9xem046394;
	Fri, 3 Jun 2011 20:09:59 GMT
	(envelope-from nobody)
Message-Id: <201106032009.p53K9xem046394@red.freebsd.org>
Date: Fri, 3 Jun 2011 20:09:59 GMT
From: Tino <tinotom@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: amdsbwd driver does not attach
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157568
>Category:       kern
>Synopsis:       amdsbwd driver does not attach
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    avg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 03 20:10:08 UTC 2011
>Closed-Date:    Wed Jun 22 07:22:30 UTC 2011
>Last-Modified:  Wed Jun 22 07:22:30 UTC 2011
>Originator:     Tino
>Release:        8.2-STABLE
>Organization:
None
>Environment:
System: FreeBSD stone 8.2-STABLE FreeBSD 8.2-STABLE #9: Wed Jun 1 22:14:01 CEST 2011 tinotom@stone:/storage/systembuild/usr/src/sys/STONE amd64
>Description:
amdsbwd driver does not attach to wd with the following error (from /var/run/dmesg.boot):

amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem 0xbafe00-0xbafe03,0xbafe04-0xbafe07 on isa0
amdsbwd0: bus_alloc_resource for ctrl failed device_attach: amdsbwd0 attach returned 6

The mainboard is an E35M1-I deluxe from Asus ( http://www.asus.com/Motherboards/AMD_CPU_on_Board/E35M1I_DELUXE/ )
compile options in make.conf:

CFLAGS=-O -pipe
NOPROFILE=true

        Here's kernel boot:

Copyright (c) 1992-2011 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 is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-STABLE #9: Wed Jun  1 22:14:01 CEST 2011
    tinotom@stone:/storage/systembuild/usr/src/sys/STONE amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD E-350 Processor (1599.97-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x500f10  Family = 14  Model = 1  Stepping = 0
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802209<SSE3,MON,SSSE3,CX16,POPCNT>
  AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
  AMD Features2=0x35ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,IBS,SKINIT,WDT>
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 7821377536 (7459 MB)
ACPI APIC Table: <ALASKA A M I>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20101013/tbfadt-655)
ioapic0: Changing APIC ID to 0
ioapic0 <Version 2.1> irqs 0-23 on motherboard
Cuse4BSD v0.1.14 @ /dev/cuse
kbd1 at kbdmux0
acpi0: <ALASKA A M I> on motherboard
acpi0: [ITHREAD]
ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20101013/psargs-464)
ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20101013/nsinit-452)
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xf000-0xf0ff mem 0xc0000000-0xcfffffff,0xfeb00000-0xfeb3ffff,0xfe700000-0xfe7fffff irq 18 at device 1.0 on pci0
pci0: <multimedia, HDA> at device 1.1 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 4.0 on pci0
pci1: <ACPI PCI bus> on pcib1
ahci0: <ATI IXP700 AHCI SATA controller> port 0xf140-0xf147,0xf130-0xf133,0xf120-0xf127,0xf110-0xf113,0xf100-0xf10f mem 0xfeb4b000-0xfeb4b3ff irq 19 at device 17.0 on pci0
ahci0: [ITHREAD]
ahci0: AHCI v1.20 with 6 6Gbps ports, Port Multiplier supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: [ITHREAD]
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: [ITHREAD]
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich2: [ITHREAD]
ahcich3: <AHCI channel> at channel 3 on ahci0
ahcich3: [ITHREAD]
ahcich4: <AHCI channel> at channel 4 on ahci0
ahcich4: [ITHREAD]
ahcich5: <AHCI channel> at channel 5 on ahci0
ahcich5: [ITHREAD]
ohci0: <OHCI (generic) USB controller> mem 0xfeb4a000-0xfeb4afff irq 18 at device 18.0 on pci0
ohci0: [ITHREAD]
usbus0: <OHCI (generic) USB controller> on ohci0
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfeb49000-0xfeb490ff irq 17 at device 18.2 on pci0
ehci0: [ITHREAD]
usbus1: EHCI version 1.0
usbus1: <EHCI (generic) USB 2.0 controller> on ehci0
ohci1: <OHCI (generic) USB controller> mem 0xfeb48000-0xfeb48fff irq 18 at device 19.0 on pci0
ohci1: [ITHREAD]
usbus2: <OHCI (generic) USB controller> on ohci1
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfeb47000-0xfeb470ff irq 17 at device 19.2 on pci0
ehci1: [ITHREAD]
usbus3: EHCI version 1.0
usbus3: <EHCI (generic) USB 2.0 controller> on ehci1
pci0: <serial bus, SMBus> at device 20.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
pcib2: <ACPI PCI-PCI bridge> at device 20.4 on pci0
pci2: <ACPI PCI bus> on pcib2
ohci2: <OHCI (generic) USB controller> mem 0xfeb46000-0xfeb46fff irq 18 at device 20.5 on pci0
ohci2: [ITHREAD]
usbus4: <OHCI (generic) USB controller> on ohci2
pcib3: <ACPI PCI-PCI bridge> at device 21.0 on pci0
pci3: <ACPI PCI bus> on pcib3
ath0: <Atheros 9285> mem 0xfea00000-0xfea0ffff irq 16 at device 0.0 on pci3
ath0: [ITHREAD]
ath0: AR9285 mac 192.2 RF5133 phy 14.0
pcib4: <ACPI PCI-PCI bridge> at device 21.1 on pci0
pci4: <ACPI PCI bus> on pcib4
re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xd0004000-0xd0004fff,0xd0000000-0xd0003fff irq 17 at device 0.0 on pci4
re0: Using 1 MSI-X message
re0: Chip rev. 0x2c000000
re0: MAC rev. 0x00000000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Ethernet address: f4:6d:04:d9:94:74
re0: [ITHREAD]
pcib5: <ACPI PCI-PCI bridge> at device 21.2 on pci0
pci5: <ACPI PCI bus> on pcib5
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xfe900000-0xfe901fff irq 18 at device 0.0 on pci5
xhci0: [ITHREAD]
xhci0: 32 byte context size.
usbus5 on xhci0
pcib6: <ACPI PCI-PCI bridge> at device 21.3 on pci0
pci6: <ACPI PCI bus> on pcib6
xhci1: <XHCI (generic) USB 3.0 controller> mem 0xfe800000-0xfe801fff irq 19 at device 0.0 on pci6
xhci1: [ITHREAD]
xhci1: 32 byte context size.
usbus6 on xhci1
ohci3: <OHCI (generic) USB controller> mem 0xfeb45000-0xfeb45fff irq 18 at device 22.0 on pci0
ohci3: [ITHREAD]
usbus7: <OHCI (generic) USB controller> on ohci3
ehci2: <EHCI (generic) USB 2.0 controller> mem 0xfeb44000-0xfeb440ff irq 17 at device 22.2 on pci0
ehci2: [ITHREAD]
usbus8: EHCI version 1.0
usbus8: <EHCI (generic) USB 2.0 controller> on ehci2
amdtemp0: <AMD K8 Thermal Sensors> on hostb4
acpi_button0: <Power Button> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: [FILTER]
amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem 0xbafe00-0xbafe03,0xbafe04-0xbafe07 on isa0
amdsbwd0: bus_alloc_resource for ctrl failed
device_attach: amdsbwd0 attach returned 6
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
ZFS filesystem version 4
ZFS storage pool version 15
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert enabled, nat loadable, rule-based forwarding disabled, default to accept, logging disabled
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 5.0Gbps Super Speed USB v3.0
usbus6: 5.0Gbps Super Speed USB v3.0
usbus7: 12Mbps Full Speed USB v1.0
usbus8: 480Mbps High Speed USB v2.0
ugen0.1: <ATI> at usbus0
uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <ATI> at usbus1
uhub1: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen2.1: <ATI> at usbus2
uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <ATI> at usbus3
uhub3: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
ugen4.1: <ATI> at usbus4
uhub4: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen5.1: <0x1033> at usbus5
uhub5: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus5
ugen6.1: <0x1033> at usbus6
uhub6: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus6
ugen7.1: <ATI> at usbus7
uhub7: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus7
ugen8.1: <ATI> at usbus8
uhub8: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus8
ada0 at ahcich1 bus 0 scbus1 target 0 lun 0
ada0: <ST32000542AS CC34> ATA-8 SATA 2.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
ada1 at ahcich2 bus 0 scbus2 target 0 lun 0
ada1: <ST31500541AS CC34> ATA-8 SATA 2.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 1430799MB (2930277168 512 byte sectors: 16H 63S/T 16383C)
ada2 at ahcich4 bus 0 scbus4 target 0 lun 0
ada2: <WDC WD20EARS-00MVWB0 51.0AB51> ATA-8 SATA 2.x device
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
SMP: AP CPU #1 Launched!
uhub4: 2 ports with 2 removable, self powered
uhub7: 4 ports with 4 removable, self powered
uhub0: 5 ports with 5 removable, self powered
uhub2: 5 ports with 5 removable, self powered
uhub5: 4 ports with 4 removable, self powered
uhub6: 4 ports with 4 removable, self powered
Root mount waiting for: usbus8 usbus5 usbus3 usbus1
ugen5.2: <American Power Conversion> at usbus5
uhub8: 4 ports with 4 removable, self powered
uhub1: 5 ports with 5 removable, self powered
uhub3: 5 ports with 5 removable, self powered
Root mount waiting for: usbus8 usbus1
Trying to mount root from zfs:zfs/root
ugen7.2: <vendor 0x0cf3> at usbus7
ugen0.2: <ADMtek> at usbus0
aue0: <ADMtek USB To LAN Converter, rev 1.10/2.01, addr 2> on usbus0
miibus1: <MII bus> on aue0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on aue0
ue0: Ethernet address: 00:60:6e:00:05:dc
wlan0: Ethernet address: e0:b9:a2:7f:dc:1e

        Here's the output of pciconf -lv:

hostb0@pci0:0:0:0:      class=0x060000 card=0x84a51043 chip=0x15101022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:0:1:0:     class=0x030000 card=0x84a51043 chip=0x98021002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = display
    subclass   = VGA
none0@pci0:0:1:1:       class=0x040300 card=0x84a51043 chip=0x13141002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = multimedia
    subclass   = HDA
pcib1@pci0:0:4:0:       class=0x060400 card=0x12341022 chip=0x15121022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = PCI-PCI
ahci0@pci0:0:17:0:      class=0x010601 card=0x84961043 chip=0x43911002 rev=0x40 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 SATA Controller [AHCI mode]'
    class      = mass storage
    subclass   = SATA
ohci0@pci0:0:18:0:      class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:18:2:      class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
ohci1@pci0:0:19:0:      class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci1@pci0:0:19:2:      class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
none1@pci0:0:20:0:      class=0x0c0500 card=0x84961043 chip=0x43851002 rev=0x42 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'ATI SMBus (ATI RD600/RS600)'
    class      = serial bus
    subclass   = SMBus
isab0@pci0:0:20:3:      class=0x060100 card=0x84961043 chip=0x439d1002 rev=0x40 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 LPC host controller'
    class      = bridge
    subclass   = PCI-ISA
pcib2@pci0:0:20:4:      class=0x060401 card=0x00000000 chip=0x43841002 rev=0x40 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 PCI to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
ohci2@pci0:0:20:5:      class=0x0c0310 card=0x84961043 chip=0x43991002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI2 Controller'
    class      = serial bus
    subclass   = USB
pcib3@pci0:0:21:0:      class=0x060400 card=0x00001002 chip=0x43a01002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:21:1:      class=0x060400 card=0x00001002 chip=0x43a11002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:21:2:      class=0x060400 card=0x00001002 chip=0x43a21002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = bridge
    subclass   = PCI-PCI
pcib6@pci0:0:21:3:      class=0x060400 card=0x00001002 chip=0x43a31002 rev=0x00 hdr=0x01
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    class      = bridge
    subclass   = PCI-PCI
ohci3@pci0:0:22:0:      class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ehci2@pci0:0:22:2:      class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'SB700 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
hostb1@pci0:0:24:0:     class=0x060000 card=0x00000000 chip=0x17001022 rev=0x43 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:24:1:     class=0x060000 card=0x00000000 chip=0x17011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:     class=0x060000 card=0x00000000 chip=0x17021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:     class=0x060000 card=0x00000000 chip=0x17031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:4:     class=0x060000 card=0x00000000 chip=0x17041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb6@pci0:0:24:5:     class=0x060000 card=0x00000000 chip=0x17181022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb7@pci0:0:24:6:     class=0x060000 card=0x00000000 chip=0x17161022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
hostb8@pci0:0:24:7:     class=0x060000 card=0x00000000 chip=0x17191022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices (AMD)'
    class      = bridge
    subclass   = HOST-PCI
ath0@pci0:3:0:0:        class=0x028000 card=0x1d891a3b chip=0x002b168c rev=0x01 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    device     = 'Atheros AR9285 Wireless LAN 802.11 a/b/g/n Controller (AR928x)'
    class      = network
re0@pci0:4:0:0: class=0x020000 card=0x84321043 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
xhci0@pci0:5:0:0:       class=0x0c0330 card=0x84131043 chip=0x01941033 rev=0x03 hdr=0x00
    vendor     = 'NEC Electronics Hong Kong'
    class      = serial bus
    subclass   = USB
xhci1@pci0:6:0:0:       class=0x0c0330 card=0x84131043 chip=0x01941033 rev=0x03 hdr=0x00
    vendor     = 'NEC Electronics Hong Kong'
    class      = serial bus
    subclass   = USB


>How-To-Repeat:
It happens on every boot. The driver does not attach at all.
>Fix:
No fix found

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->avg 
Responsible-Changed-By: avg 
Responsible-Changed-When: Sat Jun 4 07:04:29 UTC 2011 
Responsible-Changed-Why:  
Take. 

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

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, tinotom@gmail.com
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 04 Jun 2011 10:08:50 +0300

 Can you please provide a verbose dmesg?
 Just select verbose boot in the loader menu.
 
 -- 
 Andriy Gapon

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 04 Jun 2011 10:18:32 +0200

 This is a multi-part message in MIME format.
 --------------070803060005070503090200
 Content-Type: text/plain; charset=x-viet-vps
 Content-Transfer-Encoding: 7bit
 
 On 6/4/11 9:08 AM, Andriy Gapon wrote:
 > 
 > Can you please provide a verbose dmesg?
 > Just select verbose boot in the loader menu.
 > 
 Hi,
 
 thank you for your interest.
 Please find attached the verbose /var/run/dmesg.boot
 Thank you,
 
 --
 Tino
 
 --------------070803060005070503090200
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
  name="dmesg.boot"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="dmesg.boot"
 
 Table 'FACP' at 0xa7a694d0
 Table 'APIC' at 0xa7a695c8
 APIC: Found table at 0xa7a695c8
 APIC: Using the MADT enumerator.
 MADT: Found CPU APIC ID 0 ACPI ID 1: enabled
 SMP: Added CPU 0 (AP)
 MADT: Found CPU APIC ID 1 ACPI ID 2: enabled
 SMP: Added CPU 1 (AP)
 Copyright (c) 1992-2011 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 is a registered trademark of The FreeBSD Foundation.
 FreeBSD 8.2-STABLE #9: Wed Jun  1 22:14:01 CEST 2011
     tinotom@stone:/storage/systembuild/usr/src/sys/STONE amd64
 Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff80c6a000.
 Preloaded elf obj module "/boot/kernel/zfs.ko" at 0xffffffff80c6a320.
 Preloaded elf obj module "/boot/kernel/opensolaris.ko" at 0xffffffff80c6a948.
 Preloaded /boot/zfs/zpool.cache "/boot/zfs/zpool.cache" at 0xffffffff80c6aef8.
 Preloaded elf obj module "/boot/modules/cuse4bsd.ko" at 0xffffffff80c6af58.
 Preloaded elf obj module "/boot/kernel/ahci.ko" at 0xffffffff80c6b508.
 Timecounter "i8254" frequency 1193182 Hz quality 0
 Calibrating TSC clock ... TSC clock: 1599971943 Hz
 CPU: AMD E-350 Processor (1599.97-MHz K8-class CPU)
   Origin = "AuthenticAMD"  Id = 0x500f10  Family = 14  Model = 1  Stepping = 0
   Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
   Features2=0x802209<SSE3,MON,SSSE3,CX16,POPCNT>
   AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
   AMD Features2=0x35ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,IBS,SKINIT,WDT>
   TSC: P-state invariant
 L1 2MB data TLB: 8 entries, fully associative
 L1 2MB instruction TLB: 8 entries, fully associative
 L1 4KB data TLB: 40 entries, fully associative
 L1 4KB instruction TLB: 0 entries, 0-way associative
 L1 data cache: 32 kbytes, 64 bytes/line, 1 lines/tag, 8-way associative
 L1 instruction cache: 32 kbytes, 64 bytes/line, 1 lines/tag, 2-way associative
 L2 2MB unified TLB: 0 entries, disabled/not present
 L2 4KB data TLB: 512 entries, 4-way associative
 L2 4KB instruction TLB: 512 entries, 4-way associative
 L2 unified cache: 512 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative
 real memory  = 8589934592 (8192 MB)
 Physical memory chunk(s):
 0x0000000000001000 - 0x0000000000099fff, 626688 bytes (153 pages)
 0x0000000000c9e000 - 0x00000000a7a19fff, 2799157248 bytes (683388 pages)
 0x00000000a7d8c000 - 0x00000000a7efffff, 1523712 bytes (372 pages)
 0x0000000100001000 - 0x000000022e1a7fff, 5068451840 bytes (1237415 pages)
 avail memory = 7821377536 (7459 MB)
 ACPI APIC Table: <ALASKA A M I>
 INTR: Adding local APIC 1 as a target
 FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 FreeBSD/SMP: 1 package(s) x 2 core(s)
  cpu0 (BSP): APIC ID:  0
  cpu1 (AP): APIC ID:  1
 APIC: CPU 0 has ACPI ID 1
 APIC: CPU 1 has ACPI ID 2
 x86bios:   IVT 0x000000-0x0004ff at 0xffffff0000000000
 x86bios:  SSEG 0x010000-0x01ffff at 0xffffff8000022000
 x86bios:  EBDA 0x09d000-0x09ffff at 0xffffff000009d000
 x86bios:   ROM 0x0a0000-0x0effff at 0xffffff00000a0000
 ULE: setup cpu 0
 ULE: setup cpu 1
 ACPI: RSDP 0xf0430 00024 (v02 ALASKA)
 ACPI: XSDT 0xa7a63068 00054 (v01 ALASKA    A M I 01072009 AMI  00010013)
 ACPI: FACP 0xa7a694d0 000F4 (v04 ALASKA    A M I 01072009 AMI  00010013)
 ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20101013/tbfadt-655)
 ACPI: DSDT 0xa7a63150 0637C (v02 ALASKA    A M I 00000000 INTL 20051117)
 ACPI: FACS 0xa7cdff80 00040
 ACPI: APIC 0xa7a695c8 00062 (v03 ALASKA    A M I 01072009 AMI  00010013)
 ACPI: MCFG 0xa7a69630 0003C (v01 ALASKA    A M I 01072009 MSFT 00010013)
 ACPI: HPET 0xa7a69670 00038 (v01 ALASKA    A M I 01072009 AMI  00000004)
 ACPI: SSDT 0xa7a696a8 003DE (v01 AMD    POWERNOW 00000001 AMD  00000001)
 ACPI: SSDT 0xa7a69a88 012FA (v02    AMD     ALIB 00000001 MSFT 04000000)
 MADT: Found IO APIC ID 0, Interrupt 0 at 0xfec00000
 ioapic0: Changing APIC ID to 0
 ioapic0: Routing external 8259A's -> intpin 0
 MADT: Interrupt override: source 0, irq 2
 ioapic0: Routing IRQ 0 -> intpin 2
 MADT: Interrupt override: source 9, irq 9
 ioapic0: intpin 9 trigger: level
 ioapic0: intpin 9 polarity: low
 lapic: Routing NMI -> LINT1
 lapic: LINT1 trigger: edge
 lapic: LINT1 polarity: high
 ioapic0 <Version 2.1> irqs 0-23 on motherboard
 cpu0 BSP:
      ID: 0x00000000   VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff
   lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
   timer: 0x000100ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400
 Cuse4BSD v0.1.14 @ /dev/cuse
 wlan: <802.11 Link Layer>
 io: <I/O>
 kbd: new array size 4
 kbd1 at kbdmux0
 mem: <memory>
 null: <null device, zero device>
 random: <entropy source, Software, Yarrow>
 acpi0: <ALASKA A M I> on motherboard
 PCIe: Memory Mapped configuration base @ 0xe0000000
 ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 0 vector 48
 acpi0: [MPSAFE]
 acpi0: [ITHREAD]
 ACPI: Executed 3 blocks of module-level executable AML code
 ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20101013/psargs-464)
 ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20101013/nsinit-452)
 acpi0: Power Button (fixed)
 ACPI timer: 1/2 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/1 1/2 -> 10
 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
 cpu0: <ACPI CPU> on acpi0
 cpu1: <ACPI CPU> on acpi0
 pci_link0:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link1:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link2:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link3:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link4:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link5:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link6:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 pci_link7:        Index  IRQ  Rtd  Ref  IRQs
   Initial Probe       0  255   N     0  4 7 10 11 14 15
   Validation          0  255   N     0  4 7 10 11 14 15
   After Disable       0  255   N     0  4 7 10 11 14 15
 acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
 acpi_hpet0: vend: 0x4353 rev: 0x10 num: 2 hz: 14318180 opts: legacy_route
 Timecounter "HPET" frequency 14318180 Hz quality 900
 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
 pci0: <ACPI PCI bus> on pcib0
 pci0: domain=0, physical bus=0
 found-> vendor=0x1022, dev=0x1510, revid=0x00
         domain=0, bus=0, slot=0, func=0
         class=06-00-00, hdrtype=0x00, mfdev=0
         cmdreg=0x0006, statreg=0x0220, cachelnsz=0 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1002, dev=0x9802, revid=0x00
         domain=0, bus=0, slot=1, func=0
         class=03-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=11
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
         map[10]: type Prefetchable Memory, range 32, base 0xc0000000, size 28, enabled
         map[14]: type I/O Port, range 32, base 0xf000, size  8, enabled
         map[18]: type Memory, range 32, base 0xfeb00000, size 18, enabled
         map[24]: type Memory, range 32, base 0xfe700000, size 20, enabled
 pcib0: matched entry for 0.1.INTA
 pcib0: slot 1 INTA hardwired to IRQ 18
 found-> vendor=0x1002, dev=0x1314, revid=0x00
         domain=0, bus=0, slot=1, func=1
         class=04-03-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=b, irq=10
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
         map[10]: type Memory, range 32, base 0xfeb40000, size 14, enabled
 pcib0: matched entry for 0.1.INTB
 pcib0: slot 1 INTB hardwired to IRQ 19
 found-> vendor=0x1022, dev=0x1512, revid=0x00
         domain=0, bus=0, slot=4, func=0
         class=06-04-00, hdrtype=0x01, mfdev=0
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=7
         powerspec 3  supports D0 D3  current D0
         MSI supports 1 message, 64 bit
 pcib0: matched entry for 0.4.INTA
 pcib0: slot 4 INTA hardwired to IRQ 16
 found-> vendor=0x1002, dev=0x4391, revid=0x40
         domain=0, bus=0, slot=17, func=0
         class=01-06-01, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x0230, cachelnsz=0 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=10
         map[10]: type I/O Port, range 32, base 0xf140, size  3, enabled
         map[14]: type I/O Port, range 32, base 0xf130, size  2, enabled
         map[18]: type I/O Port, range 32, base 0xf120, size  3, enabled
         map[1c]: type I/O Port, range 32, base 0xf110, size  2, enabled
         map[20]: type I/O Port, range 32, base 0xf100, size  4, enabled
         map[24]: type Memory, range 32, base 0xfeb4b000, size 10, enabled
 pcib0: matched entry for 0.17.INTA
 pcib0: slot 17 INTA hardwired to IRQ 19
 found-> vendor=0x1002, dev=0x4397, revid=0x00
         domain=0, bus=0, slot=18, func=0
         class=0c-03-10, hdrtype=0x00, mfdev=1
         cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=11
         map[10]: type Memory, range 32, base 0xfeb4a000, size 12, enabled
 pcib0: matched entry for 0.18.INTA
 pcib0: slot 18 INTA hardwired to IRQ 18
 unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xfeb4a000
 ohci early: SMM active, request owner change
 found-> vendor=0x1002, dev=0x4396, revid=0x00
         domain=0, bus=0, slot=18, func=2
         class=0c-03-20, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x02b0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=b, irq=7
         powerspec 2  supports D0 D1 D2 D3  current D0
         map[10]: type Memory, range 32, base 0xfeb49000, size  8, enabled
 pcib0: matched entry for 0.18.INTB
 pcib0: slot 18 INTB hardwired to IRQ 17
 unknown: Reserved 0x100 bytes for rid 0x10 type 3 at 0xfeb49000
 found-> vendor=0x1002, dev=0x4397, revid=0x00
         domain=0, bus=0, slot=19, func=0
         class=0c-03-10, hdrtype=0x00, mfdev=1
         cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=11
         map[10]: type Memory, range 32, base 0xfeb48000, size 12, enabled
 pcib0: matched entry for 0.19.INTA
 pcib0: slot 19 INTA hardwired to IRQ 18
 unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xfeb48000
 ohci early: SMM active, request owner change
 found-> vendor=0x1002, dev=0x4396, revid=0x00
         domain=0, bus=0, slot=19, func=2
         class=0c-03-20, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x02b0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=b, irq=7
         powerspec 2  supports D0 D1 D2 D3  current D0
         map[10]: type Memory, range 32, base 0xfeb47000, size  8, enabled
 pcib0: matched entry for 0.19.INTB
 pcib0: slot 19 INTB hardwired to IRQ 17
 unknown: Reserved 0x100 bytes for rid 0x10 type 3 at 0xfeb47000
 found-> vendor=0x1002, dev=0x4385, revid=0x42
         domain=0, bus=0, slot=20, func=0
         class=0c-05-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0403, statreg=0x0220, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1002, dev=0x439d, revid=0x40
         domain=0, bus=0, slot=20, func=3
         class=06-01-00, hdrtype=0x00, mfdev=1
         cmdreg=0x000f, statreg=0x0220, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1002, dev=0x4384, revid=0x40
         domain=0, bus=0, slot=20, func=4
         class=06-04-01, hdrtype=0x01, mfdev=1
         cmdreg=0x0027, statreg=0x02a0, cachelnsz=0 (dwords)
         lattimer=0x40 (1920 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1002, dev=0x4399, revid=0x00
         domain=0, bus=0, slot=20, func=5
         class=0c-03-10, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=c, irq=11
         map[10]: type Memory, range 32, base 0xfeb46000, size 12, enabled
 pcib0: matched entry for 0.20.INTC
 pcib0: slot 20 INTC hardwired to IRQ 18
 unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xfeb46000
 ohci early: SMM active, request owner change
 found-> vendor=0x1002, dev=0x43a0, revid=0x00
         domain=0, bus=0, slot=21, func=0
         class=06-04-00, hdrtype=0x01, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=255
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
 found-> vendor=0x1002, dev=0x43a1, revid=0x00
         domain=0, bus=0, slot=21, func=1
         class=06-04-00, hdrtype=0x01, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=255
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
 found-> vendor=0x1002, dev=0x43a2, revid=0x00
         domain=0, bus=0, slot=21, func=2
         class=06-04-00, hdrtype=0x01, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=255
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
 found-> vendor=0x1002, dev=0x43a3, revid=0x00
         domain=0, bus=0, slot=21, func=3
         class=06-04-00, hdrtype=0x01, mfdev=1
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x10 (4000 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=255
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
 found-> vendor=0x1002, dev=0x4397, revid=0x00
         domain=0, bus=0, slot=22, func=0
         class=0c-03-10, hdrtype=0x00, mfdev=1
         cmdreg=0x0007, statreg=0x02a0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=11
         map[10]: type Memory, range 32, base 0xfeb45000, size 12, enabled
 pcib0: matched entry for 0.22.INTA
 pcib0: slot 22 INTA hardwired to IRQ 18
 unknown: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xfeb45000
 ohci early: SMM active, request owner change
 found-> vendor=0x1002, dev=0x4396, revid=0x00
         domain=0, bus=0, slot=22, func=2
         class=0c-03-20, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x02b0, cachelnsz=16 (dwords)
         lattimer=0x20 (960 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=b, irq=7
         powerspec 2  supports D0 D1 D2 D3  current D0
         map[10]: type Memory, range 32, base 0xfeb44000, size  8, enabled
 pcib0: matched entry for 0.22.INTB
 pcib0: slot 22 INTB hardwired to IRQ 17
 unknown: Reserved 0x100 bytes for rid 0x10 type 3 at 0xfeb44000
 found-> vendor=0x1022, dev=0x1700, revid=0x43
         domain=0, bus=0, slot=24, func=0
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1701, revid=0x00
         domain=0, bus=0, slot=24, func=1
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1702, revid=0x00
         domain=0, bus=0, slot=24, func=2
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1703, revid=0x00
         domain=0, bus=0, slot=24, func=3
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0010, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1704, revid=0x00
         domain=0, bus=0, slot=24, func=4
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1718, revid=0x00
         domain=0, bus=0, slot=24, func=5
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1716, revid=0x00
         domain=0, bus=0, slot=24, func=6
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 found-> vendor=0x1022, dev=0x1719, revid=0x00
         domain=0, bus=0, slot=24, func=7
         class=06-00-00, hdrtype=0x00, mfdev=1
         cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
 vgapci0: <VGA-compatible display> port 0xf000-0xf0ff mem 0xc0000000-0xcfffffff,0xfeb00000-0xfeb3ffff,0xfe700000-0xfe7fffff irq 18 at device 1.0 on pci0
 pci0: <multimedia, HDA> at device 1.1 (no driver attached)
 pcib1: <ACPI PCI-PCI bridge> irq 16 at device 4.0 on pci0
 pcib1:   domain            0
 pcib1:   secondary bus     1
 pcib1:   subordinate bus   1
 pcib1:   I/O decode        0xfff000-0xfff
 pcib1:   no prefetched decode
 pci1: <ACPI PCI bus> on pcib1
 pci1: domain=0, physical bus=1
 ahci0: <ATI IXP700 AHCI SATA controller> port 0xf140-0xf147,0xf130-0xf133,0xf120-0xf127,0xf110-0xf113,0xf100-0xf10f mem 0xfeb4b000-0xfeb4b3ff irq 19 at device 17.0 on pci0
 ahci0: Reserved 0x400 bytes for rid 0x24 type 3 at 0xfeb4b000
 ioapic0: routing intpin 19 (PCI IRQ 19) to lapic 0 vector 49
 ahci0: [MPSAFE]
 ahci0: [ITHREAD]
 ahci0: AHCI v1.20 with 6 6Gbps ports, Port Multiplier supported
 ahci0: Caps: 64bit NCQ SNTF MPS ALP AL CLO 6Gbps PM PMD SSC PSC 32cmd 6ports
 ahci0: Caps2:
 ahcich0: <AHCI channel> at channel 0 on ahci0
 ahcich0: [MPSAFE]
 ahcich0: [ITHREAD]
 ahcich0: Caps:
 ahcich1: <AHCI channel> at channel 1 on ahci0
 ahcich1: [MPSAFE]
 ahcich1: [ITHREAD]
 ahcich1: Caps:
 ahcich2: <AHCI channel> at channel 2 on ahci0
 ahcich2: [MPSAFE]
 ahcich2: [ITHREAD]
 ahcich2: Caps:
 ahcich3: <AHCI channel> at channel 3 on ahci0
 ahcich3: [MPSAFE]
 ahcich3: [ITHREAD]
 ahcich3: Caps:
 ahcich4: <AHCI channel> at channel 4 on ahci0
 ahcich4: [MPSAFE]
 ahcich4: [ITHREAD]
 ahcich4: Caps:
 ahcich5: <AHCI channel> at channel 5 on ahci0
 ahcich5: [MPSAFE]
 ahcich5: [ITHREAD]
 ahcich5: Caps:
 ohci0: <OHCI (generic) USB controller> mem 0xfeb4a000-0xfeb4afff irq 18 at device 18.0 on pci0
 ioapic0: routing intpin 18 (PCI IRQ 18) to lapic 0 vector 50
 ohci0: [MPSAFE]
 ohci0: [ITHREAD]
 usbus0: <OHCI (generic) USB controller> on ohci0
 usbus0: bpf attached
 ohci0: usbpf: Attached
 ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfeb49000-0xfeb490ff irq 17 at device 18.2 on pci0
 ioapic0: routing intpin 17 (PCI IRQ 17) to lapic 0 vector 51
 ehci0: [MPSAFE]
 ehci0: [ITHREAD]
 ehci0: Dropped interrupts workaround enabled
 usbus1: EHCI version 1.0
 usbus1: <EHCI (generic) USB 2.0 controller> on ehci0
 usbus1: bpf attached
 ehci0: usbpf: Attached
 ohci1: <OHCI (generic) USB controller> mem 0xfeb48000-0xfeb48fff irq 18 at device 19.0 on pci0
 ohci1: [MPSAFE]
 ohci1: [ITHREAD]
 usbus2: <OHCI (generic) USB controller> on ohci1
 usbus2: bpf attached
 ohci1: usbpf: Attached
 ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfeb47000-0xfeb470ff irq 17 at device 19.2 on pci0
 ehci1: [MPSAFE]
 ehci1: [ITHREAD]
 ehci1: Dropped interrupts workaround enabled
 usbus3: EHCI version 1.0
 usbus3: <EHCI (generic) USB 2.0 controller> on ehci1
 usbus3: bpf attached
 ehci1: usbpf: Attached
 pci0: <serial bus, SMBus> at device 20.0 (no driver attached)
 isab0: <PCI-ISA bridge> at device 20.3 on pci0
 isa0: <ISA bus> on isab0
 pcib2: <ACPI PCI-PCI bridge> at device 20.4 on pci0
 pcib2:   domain            0
 pcib2:   secondary bus     2
 pcib2:   subordinate bus   2
 pcib2:   I/O decode        0xf000-0xfff
 pcib2:   no prefetched decode
 pcib2:   Subtractively decoded bridge.
 pcib2: could not get PCI interrupt routing table for \\_SB_.PCI0.P0PC - AE_NOT_FOUND
 pci2: <ACPI PCI bus> on pcib2
 pci2: domain=0, physical bus=2
 ohci2: <OHCI (generic) USB controller> mem 0xfeb46000-0xfeb46fff irq 18 at device 20.5 on pci0
 ohci2: [MPSAFE]
 ohci2: [ITHREAD]
 usbus4: <OHCI (generic) USB controller> on ohci2
 usbus4: bpf attached
 ohci2: usbpf: Attached
 pcib3: <ACPI PCI-PCI bridge> at device 21.0 on pci0
 pcib3:   domain            0
 pcib3:   secondary bus     3
 pcib3:   subordinate bus   3
 pcib3:   I/O decode        0xfff000-0xfff
 pcib3:   memory decode     0xfea00000-0xfeafffff
 pcib3:   no prefetched decode
 pci3: <ACPI PCI bus> on pcib3
 pci3: domain=0, physical bus=3
 found-> vendor=0x168c, dev=0x002b, revid=0x01
         domain=0, bus=3, slot=0, func=0
         class=02-80-00, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=7
         powerspec 3  supports D0 D1 D3  current D0
         MSI supports 1 message
         map[10]: type Memory, range 64, base 0xfea00000, size 16, enabled
 pcib3: requested memory range 0xfea00000-0xfea0ffff: good
 pcib3: matched entry for 3.0.INTA
 pcib3: slot 0 INTA hardwired to IRQ 16
 ath0: <Atheros 9285> mem 0xfea00000-0xfea0ffff irq 16 at device 0.0 on pci3
 ath0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0xfea00000
 ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 0 vector 52
 ath0: [MPSAFE]
 ath0: [ITHREAD]
 ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
 ath0: 11ng MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps
 ath0: AR9285 mac 192.2 RF5133 phy 14.0
 ath0: Use hw queue 1 for WME_AC_BE traffic
 ath0: Use hw queue 0 for WME_AC_BK traffic
 ath0: Use hw queue 2 for WME_AC_VI traffic
 ath0: Use hw queue 3 for WME_AC_VO traffic
 ath0: Use hw queue 8 for CAB traffic
 ath0: Use hw queue 9 for beacons
 ath0: using multicast key search
 pcib4: <ACPI PCI-PCI bridge> at device 21.1 on pci0
 pcib4:   domain            0
 pcib4:   secondary bus     4
 pcib4:   subordinate bus   4
 pcib4:   I/O decode        0xe000-0xefff
 pcib4:   prefetched decode 0xd0000000-0xd00fffff
 pci4: <ACPI PCI bus> on pcib4
 pci4: domain=0, physical bus=4
 found-> vendor=0x10ec, dev=0x8168, revid=0x06
         domain=0, bus=4, slot=0, func=0
         class=02-00-00, hdrtype=0x00, mfdev=0
         cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=7
         powerspec 3  supports D0 D1 D2 D3  current D0
         MSI supports 1 message, 64 bit
         MSI-X supports 4 messages in map 0x20
         map[10]: type I/O Port, range 32, base 0xe000, size  8, enabled
 pcib4: requested I/O range 0xe000-0xe0ff: in range
         map[18]: type Prefetchable Memory, range 64, base 0xd0004000, size 12, enabled
 pcib4: requested memory range 0xd0004000-0xd0004fff: good
         map[20]: type Prefetchable Memory, range 64, base 0xd0000000, size 14, enabled
 pcib4: requested memory range 0xd0000000-0xd0003fff: good
 pcib4: matched entry for 4.0.INTA
 pcib4: slot 0 INTA hardwired to IRQ 17
 re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xd0004000-0xd0004fff,0xd0000000-0xd0003fff irq 17 at device 0.0 on pci4
 re0: Reserved 0x1000 bytes for rid 0x18 type 3 at 0xd0004000
 re0: MSI count : 1
 re0: MSI-X count : 4
 re0: Reserved 0x4000 bytes for rid 0x20 type 3 at 0xd0000000
 re0: attempting to allocate 1 MSI-X vectors (4 supported)
 msi: routing MSI-X IRQ 256 to local APIC 0 vector 53
 re0: using IRQ 256 for MSI-X
 re0: Using 1 MSI-X message
 re0: Chip rev. 0x2c000000
 re0: MAC rev. 0x00000000
 miibus0: <MII bus> on re0
 rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
 rgephy0:  10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
 re0: bpf attached
 re0: Ethernet address: f4:6d:04:d9:94:74
 re0: [MPSAFE]
 re0: [ITHREAD]
 pcib5: <ACPI PCI-PCI bridge> at device 21.2 on pci0
 pcib5:   domain            0
 pcib5:   secondary bus     5
 pcib5:   subordinate bus   5
 pcib5:   I/O decode        0xfff000-0xfff
 pcib5:   memory decode     0xfe900000-0xfe9fffff
 pcib5:   no prefetched decode
 pci5: <ACPI PCI bus> on pcib5
 pci5: domain=0, physical bus=5
 found-> vendor=0x1033, dev=0x0194, revid=0x03
         domain=0, bus=5, slot=0, func=0
         class=0c-03-30, hdrtype=0x00, mfdev=0
         cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=11
         powerspec 3  supports D0 D3  current D0
         MSI supports 8 messages, 64 bit
         MSI-X supports 8 messages in map 0x10
         map[10]: type Memory, range 64, base 0xfe900000, size 13, enabled
 pcib5: requested memory range 0xfe900000-0xfe901fff: good
 pcib5: matched entry for 5.0.INTA
 pcib5: slot 0 INTA hardwired to IRQ 18
 xhci0: <XHCI (generic) USB 3.0 controller> mem 0xfe900000-0xfe901fff irq 18 at device 0.0 on pci5
 xhci0: Reserved 0x2000 bytes for rid 0x10 type 3 at 0xfe900000
 xhci0: [MPSAFE]
 xhci0: [ITHREAD]
 xhci0: 32 byte context size.
 usbus5 on xhci0
 usbus5: bpf attached
 xhci0: usbpf: Attached
 pcib6: <ACPI PCI-PCI bridge> at device 21.3 on pci0
 pcib6:   domain            0
 pcib6:   secondary bus     6
 pcib6:   subordinate bus   6
 pcib6:   I/O decode        0xfff000-0xfff
 pcib6:   memory decode     0xfe800000-0xfe8fffff
 pcib6:   no prefetched decode
 pci6: <ACPI PCI bus> on pcib6
 pci6: domain=0, physical bus=6
 found-> vendor=0x1033, dev=0x0194, revid=0x03
         domain=0, bus=6, slot=0, func=0
         class=0c-03-30, hdrtype=0x00, mfdev=0
         cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=10
         powerspec 3  supports D0 D3  current D0
         MSI supports 8 messages, 64 bit
         MSI-X supports 8 messages in map 0x10
         map[10]: type Memory, range 64, base 0xfe800000, size 13, enabled
 pcib6: requested memory range 0xfe800000-0xfe801fff: good
 pcib6: matched entry for 6.0.INTA
 pcib6: slot 0 INTA hardwired to IRQ 19
 xhci1: <XHCI (generic) USB 3.0 controller> mem 0xfe800000-0xfe801fff irq 19 at device 0.0 on pci6
 xhci1: Reserved 0x2000 bytes for rid 0x10 type 3 at 0xfe800000
 xhci1: [MPSAFE]
 xhci1: [ITHREAD]
 xhci1: 32 byte context size.
 usbus6 on xhci1
 usbus6: bpf attached
 xhci1: usbpf: Attached
 ohci3: <OHCI (generic) USB controller> mem 0xfeb45000-0xfeb45fff irq 18 at device 22.0 on pci0
 ohci3: [MPSAFE]
 ohci3: [ITHREAD]
 usbus7: <OHCI (generic) USB controller> on ohci3
 usbus7: bpf attached
 ohci3: usbpf: Attached
 ehci2: <EHCI (generic) USB 2.0 controller> mem 0xfeb44000-0xfeb440ff irq 17 at device 22.2 on pci0
 ehci2: [MPSAFE]
 ehci2: [ITHREAD]
 ehci2: Dropped interrupts workaround enabled
 usbus8: EHCI version 1.0
 usbus8: <EHCI (generic) USB 2.0 controller> on ehci2
 usbus8: bpf attached
 ehci2: usbpf: Attached
 amdtemp0: <AMD K8 Thermal Sensors> on hostb4
 acpi_button0: <Power Button> on acpi0
 atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
 atrtc0: registered as a time-of-day clock (resolution 1000000us)
 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
 ioapic0: routing intpin 4 (ISA IRQ 4) to lapic 0 vector 54
 uart0: [FILTER]
 uart0: fast interrupt
 acpi0: wakeup code va 0xffffff81cf351000 pa 0x4000
 isa_probe_children: disabling PnP devices
 atrtc: atrtc0 already exists; skipping it
 sc: sc0 already exists; skipping it
 uart: uart0 already exists; skipping it
 isa_probe_children: probing non-PnP devices
 amdsbwd0: memory base address = 0x00bafe00
 amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem 0xbafe00-0xbafe03,0xbafe04-0xbafe07 on isa0
 amdsbwd0: bus_alloc_resource for ctrl failed
 device_attach: amdsbwd0 attach returned 6
 sc0: <System console> at flags 0x100 on isa0
 sc0: VGA <16 virtual consoles, flags=0x300>
 sc0: fb0, kbd1, terminal emulator: scteken (teken terminal)
 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 atkbd0: <AT Keyboard> irq 1 on atkbdc0
 kbd0 at atkbd0
 kbd0: atkbd0, generic (0), config:0x0, flags:0x3f0000
 ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 55
 atkbd0: [GIANT-LOCKED]
 atkbd0: [ITHREAD]
 psm0: current command byte:0065
 psm0: failed to reset the aux device.
 fdc0 failed to probe at port 0x3f0 irq 6 drq 2 on isa0
 ppc0 failed to probe at irq 7 on isa0
 uart1: <ns8250> failed to probe at port 0x2f8-0x2ff irq 3 on isa0
 isa_probe_children: probing PnP devices
 hwpstate0: <Cool`n'Quiet 2.0> on cpu0
 Device configuration finished.
 procfs registered
 ZFS filesystem version 4
 ZFS storage pool version 15
 lapic: Divisor 2, Frequency 99998268 Hz
 Timecounter "TSC" frequency 1599971943 Hz quality -100
 Timecounters tick every 1.000 msec
 vlan: initialized, using hash tables with chaining
 ipfw2 (+ipv6) initialized, divert enabled, nat loadable, rule-based forwarding disabled, default to accept, logging disabled
 ipfw0: bpf attached
 lo0: bpf attached
 usbus0: 12Mbps Full Speed USB v1.0
 usbus1: 480Mbps High Speed USB v2.0
 usbus2: 12Mbps Full Speed USB v1.0
 usbus3: 480Mbps High Speed USB v2.0
 usbus4: 12Mbps Full Speed USB v1.0
 usbus5: 5.0Gbps Super Speed USB v3.0
 usbus6: 5.0Gbps Super Speed USB v3.0
 usbus7: 12Mbps Full Speed USB v1.0
 usbus8: 480Mbps High Speed USB v2.0
 ahcich0: AHCI reset...
 ahcich0: SATA connect timeout time=10000us status=00000000
 ahcich0: AHCI reset: device not found
 ahcich1: AHCI reset...
 ahcich1: SATA connect time=900us status=00000123
 ahcich1: AHCI reset: device found
 ahcich2: AHCI reset...
 ahcich2: SATA connect time=900us status=00000123
 ahcich2: AHCI reset: device found
 ahcich3: AHCI reset...
 ahcich3: SATA connect timeout time=10000us status=00000000
 ahcich3: AHCI reset: device not found
 ahcich4: AHCI reset...
 ahcich4: SATA connect time=1000us status=00000123
 ahcich4: AHCI reset: device found
 ahcich5: AHCI reset...
 ahcich5: SATA connect timeout time=10000us status=00000000
 ahcich5: AHCI reset: device not found
 ugen0.1: <ATI> at usbus0
 uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
 ugen1.1: <ATI> at usbus1
 uhub1: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
 ugen2.1: <ATI> at usbus2
 uhub2: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
 ugen3.1: <ATI> at usbus3
 uhub3: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
 ugen4.1: <ATI> at usbus4
 uhub4: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
 ugen5.1: <0x1033> at usbus5
 uhub5: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus5
 ugen6.1: <0x1033> at usbus6
 uhub6: <0x1033 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus6
 ugen7.1: <ATI> at usbus7
 uhub7: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus7
 ugen8.1: <ATI> at usbus8
 uhub8: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus8
 ahcich1: AHCI reset: device ready after 100ms
 ahcich2: AHCI reset: device ready after 100ms
 ahcich4: AHCI reset: device ready after 100ms
 (aprobe1:ahcich1:0:15:0): SIGNATURE: 0000
 (aprobe0:ahcich1:0:0:0): SIGNATURE: 0000
 (aprobe2:ahcich2:0:15:0): SIGNATURE: 0000
 (aprobe1:ahcich2:0:0:0): SIGNATURE: 0000
 (aprobe4:ahcich4:0:15:0): SIGNATURE: 0000
 (aprobe2:ahcich4:0:0:0): SIGNATURE: 0000
 pass0 at ahcich1 bus 0 scbus1 target 0 lun 0
 pass0: <ST32000542AS CC34> ATA-8 SATA 2.x device
 pass0: Serial Number 5XW1HR1B
 pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 pass0: Command Queueing enabled
 pass1 at ahcich2 bus 0 scbus2 target 0 lun 0
 pass1: <ST31500541AS CC34> ATA-8 SATA 2.x device
 pass1: Serial Number 9XW03Y0L
 pass1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 pass1: Command Queueing enabled
 pass2 at ahcich4 bus 0 scbus4 target 0 lun 0
 pass2: <WDC WD20EARS-00MVWB0 51.0AB51> ATA-8 SATA 2.x device
 pass2: Serial Number WD-WMAZA0801237
 pass2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 pass2: Command Queueing enabled
 ada0 at ahcich1 bus 0 scbus1 target 0 lun 0
 ada0: <ST32000542AS CC34> ATA-8 SATA 2.x device
 ada0: Serial Number 5XW1HR1B
 ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 ada0: Command Queueing enabled
 ada0: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
 ada1 at ahcich2 bus 0 scbus2 target 0 lun 0
 ada1: <ST31500541AS CC34> ATA-8 SATA 2.x device
 ada1: Serial Number 9XW03Y0L
 ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 ada1: Command Queueing enabled
 ada1: 1430799MB (2930277168 512 byte sectors: 16H 63S/T 16383C)
 ada2 at ahcich4 bus 0 scbus4 target 0 lun 0
 ada2: <WDC WD20EARS-00MVWB0 51.0AB51> ATA-8 SATA 2.x device
 ada2: Serial Number WD-WMAZA0801237
 ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 ada2: Command Queueing enabled
 ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)
 SMP: AP CPU #1 Launched!
 cpu1 AP:
      ID: 0x01000000   VER: 0x80050010 LDR: 0x00000000 DFR: 0xffffffff
   lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff
   timer: 0x000200ef therm: 0x00010000 err: 0x000000f0 pmc: 0x00010400
 ioapic0: routing intpin 4 (ISA IRQ 4) to lapic 1 vector 48
 ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 1 vector 49
 ioapic0: routing intpin 18 (PCI IRQ 18) to lapic 1 vector 50
 msi: Assigning MSI-X IRQ 256 to local APIC 1 vector 51
 GEOM: new disk ada0
 GEOM: new disk ada1
 GEOM: new disk ada2
 uhub4: 2 ports with 2 removable, self powered
 uhub7: 4 ports with 4 removable, self powered
 uhub0: 5 ports with 5 removable, self powered
 uhub2: 5 ports with 5 removable, self powered
 uhub5: 4 ports with 4 removable, self powered
 uhub6: 4 ports with 4 removable, self powered
 Root mount waiting for: usbus8 usbus5 usbus3 usbus1
 ugen5.2: <American Power Conversion> at usbus5
 uhub8: 4 ports with 4 removable, self powered
 uhub1: 5 ports with 5 removable, self powered
 uhub3: 5 ports with 5 removable, self powered
 Root mount waiting for: usbus3 usbus1
 Trying to mount root from zfs:zfs/root
 ugen7.2: <vendor 0x0cf3> at usbus7
 ugen2.2: <vendor 0x04d9> at usbus2
 ukbd0: <vendor 0x04d9 product 0x1203, class 0/0, rev 2.00/2.70, addr 2> on usbus2
 kbd2 at ukbd0
 kbd2: ukbd0, generic (0), config:0x0, flags:0x3d0000
 uhid0: <vendor 0x04d9 product 0x1203, class 0/0, rev 2.00/2.70, addr 2> on usbus2
 ugen0.2: <ADMtek> at usbus0
 aue0: <ADMtek USB To LAN Converter, rev 1.10/2.01, addr 2> on usbus0
 miibus1: <MII bus> on aue0
 ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
 ukphy0: OUI 0x000749, model 0x0001, rev. 1
 ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 ue0: <USB Ethernet> on aue0
 ue0: bpf attached
 ue0: Ethernet address: 00:60:6e:00:05:dc
 start_init: trying /sbin/init
 wlan0: bpf attached
 wlan0: bpf attached
 wlan0: Ethernet address: e0:b9:a2:7f:dc:1e
 tun0: bpf attached
 
 
 --------------070803060005070503090200--

From: Andriy Gapon <avg@FreeBSD.org>
To: Tino <tinotom@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 04 Jun 2011 12:45:16 +0300

 on 04/06/2011 11:18 Tino said the following:
 > On 6/4/11 9:08 AM, Andriy Gapon wrote:
 >>
 >> Can you please provide a verbose dmesg?
 >> Just select verbose boot in the loader menu.
 >>
 > Hi,
 > 
 > thank you for your interest.
 > Please find attached the verbose /var/run/dmesg.boot
 
 Thanks.  It seems like I've rushed a little bit and haven't noticed what kind of
 system you have.  This is a new chipset for which there is no public
 specifications available yet.  So I don't know if it has a watchdog and if it
 has the same interface.  So I am not sure if amdsbwd is supposed to work for
 you.  Address reported here looks strange/unexpected:
 amdsbwd0: memory base address = 0x00bafe00
 
 This chipset has the same device ID for SMBus PCI device, but a different
 revision.  Yours:
 none1@pci0:0:20:0: class=0x0c0500 card=0x84961043 chip=0x43851002 rev=0x42 hdr=0x00
 Mine:
 intsmb0@pci0:0:20:0:    class=0x0c0500 card=0x43851458 chip=0x43851002 rev=0x3a
 hdr=0x00
 
 Likely I will have to limit revision numbers which amdsbwd supports.
 But until AMD publishes the specifications I am afraid I can't provide amdsbwd
 support for you.
 
 -- 
 Andriy Gapon

From: Andriy Gapon <avg@FreeBSD.org>
To: Tino <tinotom@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 04 Jun 2011 13:00:46 +0300

 on 04/06/2011 12:45 Andriy Gapon said the following:
 > Likely I will have to limit revision numbers which amdsbwd supports.
 > But until AMD publishes the specifications I am afraid I can't provide amdsbwd
 > support for you.
 
 But, just in case, could you please report the following?
 $ pciconf -r pci0:0:20:0 0x00:0xfc
 
 -- 
 Andriy Gapon

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 04 Jun 2011 12:32:13 +0200

 On 6/4/11 12:00 PM, Andriy Gapon wrote:
 > on 04/06/2011 12:45 Andriy Gapon said the following:
 >> Likely I will have to limit revision numbers which amdsbwd supports.
 >> But until AMD publishes the specifications I am afraid I can't provide amdsbwd
 >> support for you.
 > 
 > But, just in case, could you please report the following?
 > $ pciconf -r pci0:0:20:0 0x00:0xfc
 > 
 This is the output of pciconf -r pci0:0:20:0 0x00:0xfc :
 
 43851002 02200403 0c050042 00800000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 84961043
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 00000000 00000000 00000000 00000000
 
 please do not hesitate to contact me for any further tries I can do.
 Thank you very much,
 best regards,
 
 --
 Tino

From: Garrett Wollman <wollman@hergotha.csail.mit.edu>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sat, 4 Jun 2011 17:07:48 -0400 (EDT)

 tinotom@gmail.com writes:
 
 >amdsbwd driver does not attach to wd with the following error (from
 >/var/run/dmesg.boot):
 >
 >amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem
 >0xbafe00-0xbafe03,0xbafe04-0xbafe07 on isa0
 >amdsbwd0: bus_alloc_resource for ctrl failed device_attach: amdsbwd0
 >attach returned 6
 
 Identical symptoms here:
 
 amdsbwd0: <AMD SB600/SB7xx Watchdog Timer> at iomem 0xb8fe00-0xb8fe03,0xb8fe04-0xb8fe07 on isa0
 amdsbwd0: bus_alloc_resource for ctrl failed
 device_attach: amdsbwd0 attach returned 6
 
 The processor is reported as:
 
 CPU: AMD Athlon(tm) II X2 250 Processor (3000.18-MHz K8-class CPU)
   Origin = "AuthenticAMD"  Id = 0x100f62  Family = 10  Model = 6  Stepping = 2
   Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,C
 
 The motherboard is an MSI 890FXA-GD70.
 
 -GAWollman
 

From: Andriy Gapon <avg@icyb.net.ua>
To: bug-followup@FreeBSD.org, tinotom@gmail.com
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sun, 05 Jun 2011 13:02:05 +0300

 Also, could you please check with acpidump -dt if your system provides WDDT table?
 
 -- 
 Andriy Gapon

From: Garrett Wollman <wollman@bimajority.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sun, 5 Jun 2011 13:16:48 -0400

 <<On Sun, 05 Jun 2011 10:47:08 +0300, Andriy Gapon <avg@FreeBSD.org> said:
 
 >> The motherboard is an MSI 890FXA-GD70.
 
 > Can you please add pciconf -lv output to the PR?
 
 hostb0@pci0:0:0:0:	class=0x060000 card=0x5a111002 chip=0x5a111002 rev=0x02 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 single slot GFX Hydra'
     class      = bridge
     subclass   = HOST-PCI
 pcib1@pci0:0:2:0:	class=0x060400 card=0x5a111002 chip=0x5a161002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port B)'
     class      = bridge
     subclass   = PCI-PCI
 pcib2@pci0:0:3:0:	class=0x060400 card=0x5a111002 chip=0x5a171002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port C)'
     class      = bridge
     subclass   = PCI-PCI
 pcib3@pci0:0:4:0:	class=0x060400 card=0x5a111002 chip=0x5a181002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port D)'
     class      = bridge
     subclass   = PCI-PCI
 pcib4@pci0:0:5:0:	class=0x060400 card=0x5a111002 chip=0x5a191002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port E)'
     class      = bridge
     subclass   = PCI-PCI
 pcib5@pci0:0:6:0:	class=0x060400 card=0x5a111002 chip=0x5a1a1002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port F)'
     class      = bridge
     subclass   = PCI-PCI
 pcib6@pci0:0:9:0:	class=0x060400 card=0x5a111002 chip=0x5a1c1002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'RD890 PCI to PCI bridge (PCIe gpp port H)'
     class      = bridge
     subclass   = PCI-PCI
 ahci0@pci0:0:17:0:	class=0x010601 card=0x76401462 chip=0x43911002 rev=0x40 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 SATA Controller [AHCI mode]'
     class      = mass storage
     subclass   = SATA
 ohci0@pci0:0:18:0:	class=0x0c0310 card=0x76401462 chip=0x43971002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB OHCI0 Controller'
     class      = serial bus
     subclass   = USB
 ehci0@pci0:0:18:2:	class=0x0c0320 card=0x76401462 chip=0x43961002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB EHCI Controller'
     class      = serial bus
     subclass   = USB
 ohci1@pci0:0:19:0:	class=0x0c0310 card=0x76401462 chip=0x43971002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB OHCI0 Controller'
     class      = serial bus
     subclass   = USB
 ehci1@pci0:0:19:2:	class=0x0c0320 card=0x76401462 chip=0x43961002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB EHCI Controller'
     class      = serial bus
     subclass   = USB
 none0@pci0:0:20:0:	class=0x0c0500 card=0x00000000 chip=0x43851002 rev=0x41 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'ATI SMBus (ATI RD600/RS600)'
     class      = serial bus
     subclass   = SMBus
 hdac1@pci0:0:20:2:	class=0x040300 card=0x76401462 chip=0x43831002 rev=0x40 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'IXP SB600 High Definition Audio Controller'
     class      = multimedia
     subclass   = HDA
 isab0@pci0:0:20:3:	class=0x060100 card=0x76401462 chip=0x439d1002 rev=0x40 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 LPC host controller'
     class      = bridge
     subclass   = PCI-ISA
 pcib7@pci0:0:20:4:	class=0x060401 card=0x00000000 chip=0x43841002 rev=0x40 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'IXP SB600 PCI to PCI Bridge'
     class      = bridge
     subclass   = PCI-PCI
 ohci2@pci0:0:20:5:	class=0x0c0310 card=0x76401462 chip=0x43991002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB OHCI2 Controller'
     class      = serial bus
     subclass   = USB
 pcib8@pci0:0:21:0:	class=0x060400 card=0x00001002 chip=0x43a01002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     class      = bridge
     subclass   = PCI-PCI
 pcib9@pci0:0:21:1:	class=0x060400 card=0x00001002 chip=0x43a11002 rev=0x00 hdr=0x01
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     class      = bridge
     subclass   = PCI-PCI
 ohci3@pci0:0:22:0:	class=0x0c0310 card=0x76401462 chip=0x43971002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB OHCI0 Controller'
     class      = serial bus
     subclass   = USB
 ehci2@pci0:0:22:2:	class=0x0c0320 card=0x76401462 chip=0x43961002 rev=0x00 hdr=0x00
     vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
     device     = 'SB700 USB EHCI Controller'
     class      = serial bus
     subclass   = USB
 hostb1@pci0:0:24:0:	class=0x060000 card=0x00000000 chip=0x12001022 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon64/Opteron/Sempron HyperTransport Technology Configuration'
     class      = bridge
     subclass   = HOST-PCI
 hostb2@pci0:0:24:1:	class=0x060000 card=0x00000000 chip=0x12011022 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon64/Opteron/Sempron Address Map'
     class      = bridge
     subclass   = HOST-PCI
 hostb3@pci0:0:24:2:	class=0x060000 card=0x00000000 chip=0x12021022 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon64/Opteron/Sempron DRAM Controller'
     class      = bridge
     subclass   = HOST-PCI
 hostb4@pci0:0:24:3:	class=0x060000 card=0x00000000 chip=0x12031022 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon64/Opteron/Sempron Miscellaneous Control'
     class      = bridge
     subclass   = HOST-PCI
 hostb5@pci0:0:24:4:	class=0x060000 card=0x00000000 chip=0x12041022 rev=0x00 hdr=0x00
     vendor     = 'Advanced Micro Devices (AMD)'
     device     = '(Family 10h) Athlon64/Opteron/Sempron Link Control'
     class      = bridge
     subclass   = HOST-PCI
 vgapci0@pci0:9:0:0:	class=0x030000 card=0x80601462 chip=0x0a6510de rev=0xa2 hdr=0x00
     vendor     = 'NVIDIA Corporation'
     device     = 'Nvidia 200 Series (GeForce 210)'
     class      = display
     subclass   = VGA
 hdac0@pci0:9:0:1:	class=0x040300 card=0x80601462 chip=0x0be310de rev=0xa1 hdr=0x00
     vendor     = 'NVIDIA Corporation'
     class      = multimedia
     subclass   = HDA
 em0@pci0:8:0:0:	class=0x020000 card=0xa01f8086 chip=0x10d38086 rev=0x00 hdr=0x00
     vendor     = 'Intel Corporation'
     device     = 'Intel 82574L Gigabit Ethernet Controller (82574L)'
     class      = network
     subclass   = ethernet
 none1@pci0:7:0:0:	class=0x0c0010 card=0x76401462 chip=0x34031106 rev=0x00 hdr=0x00
     vendor     = 'VIA Technologies, Inc.'
     class      = serial bus
     subclass   = FireWire
 none2@pci0:4:0:0:	class=0x0c0330 card=0x76401462 chip=0x01941033 rev=0x03 hdr=0x00
     vendor     = 'NEC Electronics Hong Kong'
     class      = serial bus
     subclass   = USB
 none3@pci0:1:0:0:	class=0x010185 card=0x76401462 chip=0x2363197b rev=0x03 hdr=0x00
     vendor     = 'JMicron Technology Corp.'
     device     = 'JMicron JMB362/JMB363 AHCI Controller (JMB36X)'
     class      = mass storage
     subclass   = ATA

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org, tinotom@gmail.com
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sun, 05 Jun 2011 20:28:22 +0300

 Actually AMD has already published SB800 specifications and there are indeed a
 few significant differences.
 Here's my quick attempt at accounting for them:
 http://people.freebsd.org/~avg/amdsbwd-sb800.diff
 
 -- 
 Andriy Gapon

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sun, 05 Jun 2011 22:44:33 +0200

 On 6/5/11 7:28 PM, Andriy Gapon wrote:
 > 
 > Actually AMD has already published SB800 specifications and there are indeed a
 > few significant differences.
 > Here's my quick attempt at accounting for them:
 > http://people.freebsd.org/~avg/amdsbwd-sb800.diff
 > 
 Hi,
 
 I applied the patch, but the driver does not attach again. From
 dmesg.boot now these lines are shown:
 
 amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 amdsbwd0: watchdog hardware is disabled
 device_attach: amdsbwd0 attach returned 6
 
 Perhaps watchdog is forcibly disabled by hardware ?
 However, in bios configuration there is no configuration about watchdog.
 Thank you very much for your interest and feel free to contact me if I
 can be of help,
 bye,
 
 --
 Tino

From: Andriy Gapon <avg@FreeBSD.org>
To: Tino <tinotom@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Mon, 06 Jun 2011 00:11:12 +0300

 on 05/06/2011 23:44 Tino said the following:
 > On 6/5/11 7:28 PM, Andriy Gapon wrote:
 >>
 >> Actually AMD has already published SB800 specifications and there are indeed a
 >> few significant differences.
 >> Here's my quick attempt at accounting for them:
 >> http://people.freebsd.org/~avg/amdsbwd-sb800.diff
 >>
 > Hi,
 > 
 > I applied the patch, but the driver does not attach again. From
 > dmesg.boot now these lines are shown:
 > 
 > amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 > 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 
 This looks better.
 
 > amdsbwd0: watchdog hardware is disabled
 > device_attach: amdsbwd0 attach returned 6
 
 This is not so good.
 
 > Perhaps watchdog is forcibly disabled by hardware ?
 > However, in bios configuration there is no configuration about watchdog.
 > Thank you very much for your interest and feel free to contact me if I
 > can be of help,
 
 Looks like I've made a mistake at one place (at minimum).
 I rerolled the patch at the same URL.
 Alternatively you can edit sys/dev/amdsbwd/amdsbwd.c to change
 AMDSB8_PM_WDT_CTRL => AMDSB8_PM_WDT_EN in the following block:
 
         /*
          * Enable watchdog device (in stopped state)
          * and decoding of its address.
          */
         val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
         val &= ~AMDSB8_WDT_DISABLE;
         val |= AMDSB8_WDT_DEC_EN;
         pmio_write(pmres, AMDSB8_PM_WDT_EN, val);
 
 
 -- 
 Andriy Gapon

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Sun, 05 Jun 2011 23:42:49 +0200

 On 6/5/11 11:11 PM, Andriy Gapon wrote:
 > on 05/06/2011 23:44 Tino said the following:
 >> On 6/5/11 7:28 PM, Andriy Gapon wrote:
 >>>
 >>> Actually AMD has already published SB800 specifications and there are indeed a
 >>> few significant differences.
 >>> Here's my quick attempt at accounting for them:
 >>> http://people.freebsd.org/~avg/amdsbwd-sb800.diff
 >>>
 >> Hi,
 >>
 >> I applied the patch, but the driver does not attach again. From
 >> dmesg.boot now these lines are shown:
 >>
 >> amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 >> 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 > 
 > This looks better.
 > 
 >> amdsbwd0: watchdog hardware is disabled
 >> device_attach: amdsbwd0 attach returned 6
 > 
 > This is not so good.
 > 
 >> Perhaps watchdog is forcibly disabled by hardware ?
 >> However, in bios configuration there is no configuration about watchdog.
 >> Thank you very much for your interest and feel free to contact me if I
 >> can be of help,
 > 
 > Looks like I've made a mistake at one place (at minimum).
 > I rerolled the patch at the same URL.
 > Alternatively you can edit sys/dev/amdsbwd/amdsbwd.c to change
 > AMDSB8_PM_WDT_CTRL => AMDSB8_PM_WDT_EN in the following block:
 > 
 >         /*
 >          * Enable watchdog device (in stopped state)
 >          * and decoding of its address.
 >          */
 >         val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 >         val &= ~AMDSB8_WDT_DISABLE;
 >         val |= AMDSB8_WDT_DEC_EN;
 >         pmio_write(pmres, AMDSB8_PM_WDT_EN, val);
 > 
 > 
 Hi,
 
 I applied the new patch but result is exactly as before:
 
 amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 amdsbwd0: watchdog hardware is disabled
 device_attach: amdsbwd0 attach returned 6
 
 Thank you,
 
 --
 Tino

From: Andriy Gapon <avg@FreeBSD.org>
To: Tino <tinotom@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Mon, 06 Jun 2011 09:30:23 +0300

 on 06/06/2011 00:42 Tino said the following:
 > I applied the new patch but result is exactly as before:
 > 
 > amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 > 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 > amdsbwd0: watchdog hardware is disabled
 > device_attach: amdsbwd0 attach returned 6
 
 Found another bug.  The patch is re-rolled at the same URL.
 
 -- 
 Andriy Gapon

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Mon, 06 Jun 2011 09:38:21 +0200

 On 6/6/11 8:30 AM, Andriy Gapon wrote:
 > on 06/06/2011 00:42 Tino said the following:
 >> I applied the new patch but result is exactly as before:
 >>
 >> amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 >> 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 >> amdsbwd0: watchdog hardware is disabled
 >> device_attach: amdsbwd0 attach returned 6
 > 
 > Found another bug.  The patch is re-rolled at the same URL.
 > 
 Hi,
 
 I reapplied the patch and it seems it is working now! but perhaps too
 much, because I have few seconds before the pc reboots. so I cannot be
 sure if I enabled watchdogd and it is ignored by driver or if I forgot
 to add it in rc.conf.
 However, I was too late for work this morning, so I will investigate
 thoroughly at lunch time or, in the worst case, this evening and
 obviously I 'll let you know.
 Thank you very much!
 have a nice day,
 
 --
 Tino

From: Tino <tinotom@gmail.com>
To: Andriy Gapon <avg@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Mon, 06 Jun 2011 14:50:50 +0200

 On 6/6/11 8:30 AM, Andriy Gapon wrote:
 > on 06/06/2011 00:42 Tino said the following:
 >> I applied the new patch but result is exactly as before:
 >>
 >> amdsbwd0: <AMD SB8xx Watchdog Timer> at iomem
 >> 0xf1800000-0xf1800003,0xf1800004-0xf1800007 on isa0
 >> amdsbwd0: watchdog hardware is disabled
 >> device_attach: amdsbwd0 attach returned 6
 > 
 > Found another bug.  The patch is re-rolled at the same URL.
 > 
 Hi,
 
 your last patch definitely works!
 Machine is hardware reset as expected. Thank you!!
 But in my case the hardware reset comes just before the whole boot
 process finishes and in particular before the watchdogd daemon is
 started, so putting machine in perpetual reboot cycle.
 Could you please suggest me a solution smarter than disabling all
 daemons in rc.conf?
 Should I play with WD_ACTIVE or WD_INTERNAL in src/sys/sys/watchdog.h ?
 Thank you very much,
 best regards,
 
 --
 Tino

From: Andriy Gapon <avg@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/157568: amdsbwd driver does not attach
Date: Tue, 07 Jun 2011 08:51:56 +0300

 Thanks to a lot of great testing and feedback from the reporter
 (tinotom@gmail.com) we have finally got a working version of the driver for
 SB800-series southbridges.  The patch is at the same URL.
 
 I will integrate the changes to FreeBSD source tree.
 
 -- 
 Andriy Gapon

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/157568: commit references a PR
Date: Tue,  7 Jun 2011 06:18:12 +0000 (UTC)

 Author: avg
 Date: Tue Jun  7 06:18:02 2011
 New Revision: 222805
 URL: http://svn.freebsd.org/changeset/base/222805
 
 Log:
   amdsbwd: update to support SB8xx southbridges
   
   Many thanks to Tino <tinotom@gmail.com> for drawing my attention to
   this, for doing a lot of testing and providing great feedback.
   Many thanks to AMD for continuing to release public specifications for
   their chipsets.
   
   PR:		kern/157568
   Tested by:	Tino <tinotom@gmail.com>
   MFC after:	1 week
 
 Modified:
   head/share/man/man4/amdsbwd.4
   head/sys/dev/amdsbwd/amdsbwd.c
 
 Modified: head/share/man/man4/amdsbwd.4
 ==============================================================================
 --- head/share/man/man4/amdsbwd.4	Tue Jun  7 05:04:37 2011	(r222804)
 +++ head/share/man/man4/amdsbwd.4	Tue Jun  7 06:18:02 2011	(r222805)
 @@ -25,12 +25,12 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd November 30, 2009
 +.Dd June 7, 2011
  .Dt AMDSBWD 4
  .Os
  .Sh NAME
  .Nm amdsbwd
 -.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer
 +.Nd device driver for the AMD SB600/SB7xx/SB8xx watchdog timers
  .Sh SYNOPSIS
  To compile this driver into the kernel,
  place the following line in your
 @@ -51,7 +51,7 @@ The
  driver provides
  .Xr watchdog 4
  support for the watchdog timers present on
 -AMD SB600 and SB7xx south bridge chips.
 +AMD SB600, SB7xx and SB8xx southbridges.
  .Sh SEE ALSO
  .Xr watchdog 4 ,
  .Xr watchdog 8 ,
 
 Modified: head/sys/dev/amdsbwd/amdsbwd.c
 ==============================================================================
 --- head/sys/dev/amdsbwd/amdsbwd.c	Tue Jun  7 05:04:37 2011	(r222804)
 +++ head/sys/dev/amdsbwd/amdsbwd.c	Tue Jun  7 06:18:02 2011	(r222805)
 @@ -25,8 +25,8 @@
   */
  
  /*
 - * This is a driver for watchdog timer present in AMD SB600/SB7xx
 - * south bridges and other watchdog timers advertised via WDRT ACPI table.
 + * This is a driver for watchdog timer present in AMD SB600/SB7xx/SB8xx
 + * southbridges.
   * Please see the following specifications for the descriptions of the
   * registers and flags:
   * - AMD SB600 Register Reference Guide, Public Version,  Rev. 3.03 (SB600 RRG)
 @@ -35,11 +35,13 @@
   *   http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf
   * - AMD SB700/710/750 Register Programming Requirements (RPR)
   *   http://developer.amd.com/assets/42413_sb7xx_rpr_pub_1.00.pdf
 + * - AMD SB800-Series Southbridges Register Reference Guide (RRG)
 + *   http://support.amd.com/us/Embedded_TechDocs/45482.pdf
   * Please see the following for Watchdog Resource Table specification:
   * - Watchdog Timer Hardware Requirements for Windows Server 2003 (WDRT)
   *   http://www.microsoft.com/whdc/system/sysinternals/watchdog.mspx
 - * AMD SB600/SB7xx watchdog hardware seems to conform to the above,
 - * but my system doesn't provide the table.
 + * AMD SB600/SB7xx/SB8xx watchdog hardware seems to conform to the above
 + * specifications, but the table hasn't been spotted in the wild yet.
   */
  
  #include <sys/cdefs.h>
 @@ -59,15 +61,15 @@ __FBSDID("$FreeBSD$");
  #include <dev/pci/pcivar.h>
  #include <isa/isavar.h>
  
 -/* RRG 2.3.3.1.1, page 161. */
 +/* SB7xx RRG 2.3.3.1.1. */
  #define	AMDSB_PMIO_INDEX		0xcd6
  #define	AMDSB_PMIO_DATA			(PMIO_INDEX + 1)
  #define	AMDSB_PMIO_WIDTH		2
 -/* RRG 2.3.3.2, page 181. */
 +/* SB7xx RRG 2.3.3.2. */
  #define	AMDSB_PM_RESET_STATUS0		0x44
  #define	AMDSB_PM_RESET_STATUS1		0x45
  #define		AMDSB_WD_RST_STS	0x02
 -/* RRG 2.3.3.2, page 188; RPR 2.36, page 30. */
 +/* SB7xx RRG 2.3.3.2, RPR 2.36. */
  #define	AMDSB_PM_WDT_CTRL		0x69
  #define		AMDSB_WDT_DISABLE	0x01
  #define		AMDSB_WDT_RES_MASK	(0x02 | 0x04)
 @@ -77,7 +79,18 @@ __FBSDID("$FreeBSD$");
  #define		AMDSB_WDT_RES_1S	0x06
  #define	AMDSB_PM_WDT_BASE_LSB		0x6c
  #define	AMDSB_PM_WDT_BASE_MSB		0x6f
 -/* RRG 2.3.4, page 223, WDRT. */
 +/* SB8xx RRG 2.3.3. */
 +#define	AMDSB8_PM_WDT_EN		0x48
 +#define		AMDSB8_WDT_DEC_EN	0x01
 +#define		AMDSB8_WDT_DISABLE	0x02
 +#define	AMDSB8_PM_WDT_CTRL		0x4c
 +#define		AMDSB8_WDT_32KHZ	0x00
 +#define		AMDSB8_WDT_1HZ		0x03
 +#define		AMDSB8_WDT_RES_MASK	0x03
 +#define	AMDSB8_PM_RESET_STATUS0		0xC0
 +#define	AMDSB8_PM_RESET_STATUS1		0xC1
 +#define		AMDSB8_WD_RST_STS	0x20
 +/* SB7xx RRG 2.3.4, WDRT. */
  #define	AMDSB_WD_CTRL			0x00
  #define		AMDSB_WD_RUN		0x01
  #define		AMDSB_WD_FIRED		0x02
 @@ -90,8 +103,9 @@ __FBSDID("$FreeBSD$");
  #define	AMDSB_WDIO_REG_WIDTH		4
  /* WDRT */
  #define	MAXCOUNT_MIN_VALUE		511
 -/* RRG 2.3.1.1, page 122; SB600 RRG 2.3.1.1, page 97. */
 -#define	AMDSB7xx_SMBUS_DEVID		0x43851002
 +/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1.  */
 +#define	AMDSB_SMBUS_DEVID		0x43851002
 +#define	AMDSB8_SMBUS_REVID		0x40
  
  #define	amdsbwd_verbose_printf(dev, ...)	\
  	do {						\
 @@ -265,7 +279,7 @@ amdsbwd_identify(driver_t *driver, devic
  	smb_dev = pci_find_bsf(0, 20, 0);
  	if (smb_dev == NULL)
  		return;
 -	if (pci_get_devid(smb_dev) != AMDSB7xx_SMBUS_DEVID)
 +	if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID)
  		return;
  
  	child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1);
 @@ -273,15 +287,102 @@ amdsbwd_identify(driver_t *driver, devic
  		device_printf(parent, "add amdsbwd child failed\n");
  }
  
 +
 +static void
 +amdsbwd_probe_sb7xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB_PM_WDT_BASE_MSB - i);
 +	}
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_RES_MASK;
 +	val |= AMDSB_WDT_RES_10MS;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/* Enable watchdog device (in stopped state). */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_DISABLE;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/*
 +	 * XXX TODO: Ensure that watchdog decode is enabled
 +	 * (register 0x41, bit 3).
 +	 */
 +	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
 +}
 +
 +static void
 +amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB8_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB8_PM_WDT_EN + 3 - i);
 +	}
 +	*addr &= ~0x07u;
 +
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	val &= ~AMDSB8_WDT_RES_MASK;
 +	val |= AMDSB8_WDT_1HZ;
 +	pmio_write(pmres, AMDSB8_PM_WDT_CTRL, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#02x\n", val);
 +#endif
 +
 +	/*
 +	 * Enable watchdog device (in stopped state)
 +	 * and decoding of its address.
 +	 */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	val &= ~AMDSB8_WDT_DISABLE;
 +	val |= AMDSB8_WDT_DEC_EN;
 +	pmio_write(pmres, AMDSB8_PM_WDT_EN, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	device_printf(dev, "AMDSB8_PM_WDT_EN value = %#02x\n", val);
 +#endif
 +	device_set_desc(dev, "AMD SB8xx Watchdog Timer");
 +}
 +
  static int
  amdsbwd_probe(device_t dev)
  {
  	struct resource		*res;
 +	device_t		smb_dev;
  	uint32_t		addr;
 -	uint32_t		val;
  	int			rid;
  	int			rc;
 -	int			i;
  
  	/* Do not claim some ISA PnP device by accident. */
  	if (isa_get_logicalid(dev) != 0)
 @@ -301,21 +402,16 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Report cause of previous reset for user's convenience. */
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS0);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS1);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 -	if ((val & AMDSB_WD_RST_STS) != 0)
 -		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		amdsbwd_probe_sb7xx(dev, res, &addr);
 +	else
 +		amdsbwd_probe_sb8xx(dev, res, &addr);
 +
 +	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 +	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
  
 -	/* Find base address of memory mapped WDT registers. */
 -	for (addr = 0, i = 0; i < 4; i++) {
 -		addr <<= 8;
 -		addr |= pmio_read(res, AMDSB_PM_WDT_BASE_MSB - i);
 -	}
  	amdsbwd_verbose_printf(dev, "memory base address = %#010x\n", addr);
  	rc = bus_set_resource(dev, SYS_RES_MEMORY, 0, addr + AMDSB_WD_CTRL,
  	    AMDSB_WDIO_REG_WIDTH);
 @@ -330,36 +426,25 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Set watchdog timer tick to 10ms. */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_RES_MASK;
 -	val |= AMDSB_WDT_RES_10MS;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/* Enable watchdog device (in stopped state). */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_DISABLE;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/*
 -	 * XXX TODO: Ensure that watchdog decode is enabled
 -	 * (register 0x41, bit 3).
 -	 */
 -	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 -	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
 -
 -	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
  	return (0);
  }
  
  static int
  amdsbwd_attach_sb(device_t dev, struct amdsbwd_softc *sc)
  {
 +	device_t	smb_dev;
 +
  	sc->max_ticks = UINT16_MAX;
 -	sc->ms_per_tick = 10;
  	sc->rid_ctrl = 0;
  	sc->rid_count = 1;
  
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		sc->ms_per_tick = 10;
 +	else
 +		sc->ms_per_tick = 1000;
 +
  	sc->res_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
  	    &sc->rid_ctrl, RF_ACTIVE);
  	if (sc->res_ctrl == NULL) {
 @@ -388,6 +473,11 @@ amdsbwd_attach(device_t dev)
  	if (rc != 0)
  		goto fail;
  
 +#ifdef AMDSBWD_DEBUG
 +	device_printf(dev, "wd ctrl = %#04x\n", wdctrl_read(sc));
 +	device_printf(dev, "wd count = %#04x\n", wdcount_read(sc));
 +#endif
 +
  	/* Setup initial state of Watchdog Control. */
  	wdctrl_write(sc, AMDSB_WD_FIRED);
  
 _______________________________________________
 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"
 
State-Changed-From-To: open->patched 
State-Changed-By: avg 
State-Changed-When: Tue Jun 7 06:22:59 UTC 2011 
State-Changed-Why:  
Support for SB8xx southbridges is committed to head. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/157568: commit references a PR
Date: Wed, 22 Jun 2011 06:45:50 +0000 (UTC)

 Author: avg
 Date: Wed Jun 22 06:45:34 2011
 New Revision: 223409
 URL: http://svn.freebsd.org/changeset/base/223409
 
 Log:
   MFC r222805: amdsbwd: update to support SB8xx southbridges
   
   PR:		kern/157568
 
 Modified:
   stable/8/share/man/man4/amdsbwd.4
   stable/8/sys/dev/amdsbwd/amdsbwd.c
 Directory Properties:
   stable/8/share/man/man4/   (props changed)
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
 
 Modified: stable/8/share/man/man4/amdsbwd.4
 ==============================================================================
 --- stable/8/share/man/man4/amdsbwd.4	Wed Jun 22 06:27:32 2011	(r223408)
 +++ stable/8/share/man/man4/amdsbwd.4	Wed Jun 22 06:45:34 2011	(r223409)
 @@ -25,12 +25,12 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd November 30, 2009
 +.Dd June 7, 2011
  .Dt AMDSBWD 4
  .Os
  .Sh NAME
  .Nm amdsbwd
 -.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer
 +.Nd device driver for the AMD SB600/SB7xx/SB8xx watchdog timers
  .Sh SYNOPSIS
  To compile this driver into the kernel,
  place the following line in your
 @@ -51,7 +51,7 @@ The
  driver provides
  .Xr watchdog 4
  support for the watchdog timers present on
 -AMD SB600 and SB7xx south bridge chips.
 +AMD SB600, SB7xx and SB8xx southbridges.
  .Sh SEE ALSO
  .Xr watchdog 4 ,
  .Xr watchdog 8 ,
 
 Modified: stable/8/sys/dev/amdsbwd/amdsbwd.c
 ==============================================================================
 --- stable/8/sys/dev/amdsbwd/amdsbwd.c	Wed Jun 22 06:27:32 2011	(r223408)
 +++ stable/8/sys/dev/amdsbwd/amdsbwd.c	Wed Jun 22 06:45:34 2011	(r223409)
 @@ -25,8 +25,8 @@
   */
  
  /*
 - * This is a driver for watchdog timer present in AMD SB600/SB7xx
 - * south bridges and other watchdog timers advertised via WDRT ACPI table.
 + * This is a driver for watchdog timer present in AMD SB600/SB7xx/SB8xx
 + * southbridges.
   * Please see the following specifications for the descriptions of the
   * registers and flags:
   * - AMD SB600 Register Reference Guide, Public Version,  Rev. 3.03 (SB600 RRG)
 @@ -35,11 +35,13 @@
   *   http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf
   * - AMD SB700/710/750 Register Programming Requirements (RPR)
   *   http://developer.amd.com/assets/42413_sb7xx_rpr_pub_1.00.pdf
 + * - AMD SB800-Series Southbridges Register Reference Guide (RRG)
 + *   http://support.amd.com/us/Embedded_TechDocs/45482.pdf
   * Please see the following for Watchdog Resource Table specification:
   * - Watchdog Timer Hardware Requirements for Windows Server 2003 (WDRT)
   *   http://www.microsoft.com/whdc/system/sysinternals/watchdog.mspx
 - * AMD SB600/SB7xx watchdog hardware seems to conform to the above,
 - * but my system doesn't provide the table.
 + * AMD SB600/SB7xx/SB8xx watchdog hardware seems to conform to the above
 + * specifications, but the table hasn't been spotted in the wild yet.
   */
  
  #include <sys/cdefs.h>
 @@ -59,15 +61,15 @@ __FBSDID("$FreeBSD$");
  #include <dev/pci/pcivar.h>
  #include <isa/isavar.h>
  
 -/* RRG 2.3.3.1.1, page 161. */
 +/* SB7xx RRG 2.3.3.1.1. */
  #define	AMDSB_PMIO_INDEX		0xcd6
  #define	AMDSB_PMIO_DATA			(PMIO_INDEX + 1)
  #define	AMDSB_PMIO_WIDTH		2
 -/* RRG 2.3.3.2, page 181. */
 +/* SB7xx RRG 2.3.3.2. */
  #define	AMDSB_PM_RESET_STATUS0		0x44
  #define	AMDSB_PM_RESET_STATUS1		0x45
  #define		AMDSB_WD_RST_STS	0x02
 -/* RRG 2.3.3.2, page 188; RPR 2.36, page 30. */
 +/* SB7xx RRG 2.3.3.2, RPR 2.36. */
  #define	AMDSB_PM_WDT_CTRL		0x69
  #define		AMDSB_WDT_DISABLE	0x01
  #define		AMDSB_WDT_RES_MASK	(0x02 | 0x04)
 @@ -77,7 +79,18 @@ __FBSDID("$FreeBSD$");
  #define		AMDSB_WDT_RES_1S	0x06
  #define	AMDSB_PM_WDT_BASE_LSB		0x6c
  #define	AMDSB_PM_WDT_BASE_MSB		0x6f
 -/* RRG 2.3.4, page 223, WDRT. */
 +/* SB8xx RRG 2.3.3. */
 +#define	AMDSB8_PM_WDT_EN		0x48
 +#define		AMDSB8_WDT_DEC_EN	0x01
 +#define		AMDSB8_WDT_DISABLE	0x02
 +#define	AMDSB8_PM_WDT_CTRL		0x4c
 +#define		AMDSB8_WDT_32KHZ	0x00
 +#define		AMDSB8_WDT_1HZ		0x03
 +#define		AMDSB8_WDT_RES_MASK	0x03
 +#define	AMDSB8_PM_RESET_STATUS0		0xC0
 +#define	AMDSB8_PM_RESET_STATUS1		0xC1
 +#define		AMDSB8_WD_RST_STS	0x20
 +/* SB7xx RRG 2.3.4, WDRT. */
  #define	AMDSB_WD_CTRL			0x00
  #define		AMDSB_WD_RUN		0x01
  #define		AMDSB_WD_FIRED		0x02
 @@ -90,8 +103,9 @@ __FBSDID("$FreeBSD$");
  #define	AMDSB_WDIO_REG_WIDTH		4
  /* WDRT */
  #define	MAXCOUNT_MIN_VALUE		511
 -/* RRG 2.3.1.1, page 122; SB600 RRG 2.3.1.1, page 97. */
 -#define	AMDSB7xx_SMBUS_DEVID		0x43851002
 +/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1.  */
 +#define	AMDSB_SMBUS_DEVID		0x43851002
 +#define	AMDSB8_SMBUS_REVID		0x40
  
  #define	amdsbwd_verbose_printf(dev, ...)	\
  	do {						\
 @@ -265,7 +279,7 @@ amdsbwd_identify(driver_t *driver, devic
  	smb_dev = pci_find_bsf(0, 20, 0);
  	if (smb_dev == NULL)
  		return;
 -	if (pci_get_devid(smb_dev) != AMDSB7xx_SMBUS_DEVID)
 +	if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID)
  		return;
  
  	child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1);
 @@ -273,15 +287,102 @@ amdsbwd_identify(driver_t *driver, devic
  		device_printf(parent, "add amdsbwd child failed\n");
  }
  
 +
 +static void
 +amdsbwd_probe_sb7xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB_PM_WDT_BASE_MSB - i);
 +	}
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_RES_MASK;
 +	val |= AMDSB_WDT_RES_10MS;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/* Enable watchdog device (in stopped state). */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_DISABLE;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/*
 +	 * XXX TODO: Ensure that watchdog decode is enabled
 +	 * (register 0x41, bit 3).
 +	 */
 +	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
 +}
 +
 +static void
 +amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB8_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB8_PM_WDT_EN + 3 - i);
 +	}
 +	*addr &= ~0x07u;
 +
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	val &= ~AMDSB8_WDT_RES_MASK;
 +	val |= AMDSB8_WDT_1HZ;
 +	pmio_write(pmres, AMDSB8_PM_WDT_CTRL, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#02x\n", val);
 +#endif
 +
 +	/*
 +	 * Enable watchdog device (in stopped state)
 +	 * and decoding of its address.
 +	 */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	val &= ~AMDSB8_WDT_DISABLE;
 +	val |= AMDSB8_WDT_DEC_EN;
 +	pmio_write(pmres, AMDSB8_PM_WDT_EN, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	device_printf(dev, "AMDSB8_PM_WDT_EN value = %#02x\n", val);
 +#endif
 +	device_set_desc(dev, "AMD SB8xx Watchdog Timer");
 +}
 +
  static int
  amdsbwd_probe(device_t dev)
  {
  	struct resource		*res;
 +	device_t		smb_dev;
  	uint32_t		addr;
 -	uint32_t		val;
  	int			rid;
  	int			rc;
 -	int			i;
  
  	/* Do not claim some ISA PnP device by accident. */
  	if (isa_get_logicalid(dev) != 0)
 @@ -301,21 +402,16 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Report cause of previous reset for user's convenience. */
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS0);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS1);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 -	if ((val & AMDSB_WD_RST_STS) != 0)
 -		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		amdsbwd_probe_sb7xx(dev, res, &addr);
 +	else
 +		amdsbwd_probe_sb8xx(dev, res, &addr);
 +
 +	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 +	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
  
 -	/* Find base address of memory mapped WDT registers. */
 -	for (addr = 0, i = 0; i < 4; i++) {
 -		addr <<= 8;
 -		addr |= pmio_read(res, AMDSB_PM_WDT_BASE_MSB - i);
 -	}
  	amdsbwd_verbose_printf(dev, "memory base address = %#010x\n", addr);
  	rc = bus_set_resource(dev, SYS_RES_MEMORY, 0, addr + AMDSB_WD_CTRL,
  	    AMDSB_WDIO_REG_WIDTH);
 @@ -330,36 +426,25 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Set watchdog timer tick to 10ms. */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_RES_MASK;
 -	val |= AMDSB_WDT_RES_10MS;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/* Enable watchdog device (in stopped state). */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_DISABLE;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/*
 -	 * XXX TODO: Ensure that watchdog decode is enabled
 -	 * (register 0x41, bit 3).
 -	 */
 -	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 -	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
 -
 -	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
  	return (0);
  }
  
  static int
  amdsbwd_attach_sb(device_t dev, struct amdsbwd_softc *sc)
  {
 +	device_t	smb_dev;
 +
  	sc->max_ticks = UINT16_MAX;
 -	sc->ms_per_tick = 10;
  	sc->rid_ctrl = 0;
  	sc->rid_count = 1;
  
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		sc->ms_per_tick = 10;
 +	else
 +		sc->ms_per_tick = 1000;
 +
  	sc->res_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
  	    &sc->rid_ctrl, RF_ACTIVE);
  	if (sc->res_ctrl == NULL) {
 @@ -388,6 +473,11 @@ amdsbwd_attach(device_t dev)
  	if (rc != 0)
  		goto fail;
  
 +#ifdef AMDSBWD_DEBUG
 +	device_printf(dev, "wd ctrl = %#04x\n", wdctrl_read(sc));
 +	device_printf(dev, "wd count = %#04x\n", wdcount_read(sc));
 +#endif
 +
  	/* Setup initial state of Watchdog Control. */
  	wdctrl_write(sc, AMDSB_WD_FIRED);
  
 _______________________________________________
 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/157568: commit references a PR
Date: Wed, 22 Jun 2011 06:58:58 +0000 (UTC)

 Author: avg
 Date: Wed Jun 22 06:58:42 2011
 New Revision: 223410
 URL: http://svn.freebsd.org/changeset/base/223410
 
 Log:
   MFC r222805: amdsbwd: update to support SB8xx southbridges
   
   PR:		kern/157568
 
 Modified:
   stable/7/share/man/man4/amdsbwd.4
   stable/7/sys/dev/amdsbwd/amdsbwd.c
 Directory Properties:
   stable/7/share/man/man4/   (props changed)
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/share/man/man4/amdsbwd.4
 ==============================================================================
 --- stable/7/share/man/man4/amdsbwd.4	Wed Jun 22 06:45:34 2011	(r223409)
 +++ stable/7/share/man/man4/amdsbwd.4	Wed Jun 22 06:58:42 2011	(r223410)
 @@ -25,12 +25,12 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd November 30, 2009
 +.Dd June 7, 2011
  .Dt AMDSBWD 4
  .Os
  .Sh NAME
  .Nm amdsbwd
 -.Nd device driver for the AMD SB600/SB700/SB710/SB750 watchdog timer
 +.Nd device driver for the AMD SB600/SB7xx/SB8xx watchdog timers
  .Sh SYNOPSIS
  To compile this driver into the kernel,
  place the following line in your
 @@ -51,7 +51,7 @@ The
  driver provides
  .Xr watchdog 4
  support for the watchdog timers present on
 -AMD SB600 and SB7xx south bridge chips.
 +AMD SB600, SB7xx and SB8xx southbridges.
  .Sh SEE ALSO
  .Xr watchdog 4 ,
  .Xr watchdog 8 ,
 
 Modified: stable/7/sys/dev/amdsbwd/amdsbwd.c
 ==============================================================================
 --- stable/7/sys/dev/amdsbwd/amdsbwd.c	Wed Jun 22 06:45:34 2011	(r223409)
 +++ stable/7/sys/dev/amdsbwd/amdsbwd.c	Wed Jun 22 06:58:42 2011	(r223410)
 @@ -25,8 +25,8 @@
   */
  
  /*
 - * This is a driver for watchdog timer present in AMD SB600/SB7xx
 - * south bridges and other watchdog timers advertised via WDRT ACPI table.
 + * This is a driver for watchdog timer present in AMD SB600/SB7xx/SB8xx
 + * southbridges.
   * Please see the following specifications for the descriptions of the
   * registers and flags:
   * - AMD SB600 Register Reference Guide, Public Version,  Rev. 3.03 (SB600 RRG)
 @@ -35,11 +35,13 @@
   *   http://developer.amd.com/assets/43009_sb7xx_rrg_pub_1.00.pdf
   * - AMD SB700/710/750 Register Programming Requirements (RPR)
   *   http://developer.amd.com/assets/42413_sb7xx_rpr_pub_1.00.pdf
 + * - AMD SB800-Series Southbridges Register Reference Guide (RRG)
 + *   http://support.amd.com/us/Embedded_TechDocs/45482.pdf
   * Please see the following for Watchdog Resource Table specification:
   * - Watchdog Timer Hardware Requirements for Windows Server 2003 (WDRT)
   *   http://www.microsoft.com/whdc/system/sysinternals/watchdog.mspx
 - * AMD SB600/SB7xx watchdog hardware seems to conform to the above,
 - * but my system doesn't provide the table.
 + * AMD SB600/SB7xx/SB8xx watchdog hardware seems to conform to the above
 + * specifications, but the table hasn't been spotted in the wild yet.
   */
  
  #include <sys/cdefs.h>
 @@ -59,15 +61,15 @@ __FBSDID("$FreeBSD$");
  #include <dev/pci/pcivar.h>
  #include <isa/isavar.h>
  
 -/* RRG 2.3.3.1.1, page 161. */
 +/* SB7xx RRG 2.3.3.1.1. */
  #define	AMDSB_PMIO_INDEX		0xcd6
  #define	AMDSB_PMIO_DATA			(PMIO_INDEX + 1)
  #define	AMDSB_PMIO_WIDTH		2
 -/* RRG 2.3.3.2, page 181. */
 +/* SB7xx RRG 2.3.3.2. */
  #define	AMDSB_PM_RESET_STATUS0		0x44
  #define	AMDSB_PM_RESET_STATUS1		0x45
  #define		AMDSB_WD_RST_STS	0x02
 -/* RRG 2.3.3.2, page 188; RPR 2.36, page 30. */
 +/* SB7xx RRG 2.3.3.2, RPR 2.36. */
  #define	AMDSB_PM_WDT_CTRL		0x69
  #define		AMDSB_WDT_DISABLE	0x01
  #define		AMDSB_WDT_RES_MASK	(0x02 | 0x04)
 @@ -77,7 +79,18 @@ __FBSDID("$FreeBSD$");
  #define		AMDSB_WDT_RES_1S	0x06
  #define	AMDSB_PM_WDT_BASE_LSB		0x6c
  #define	AMDSB_PM_WDT_BASE_MSB		0x6f
 -/* RRG 2.3.4, page 223, WDRT. */
 +/* SB8xx RRG 2.3.3. */
 +#define	AMDSB8_PM_WDT_EN		0x48
 +#define		AMDSB8_WDT_DEC_EN	0x01
 +#define		AMDSB8_WDT_DISABLE	0x02
 +#define	AMDSB8_PM_WDT_CTRL		0x4c
 +#define		AMDSB8_WDT_32KHZ	0x00
 +#define		AMDSB8_WDT_1HZ		0x03
 +#define		AMDSB8_WDT_RES_MASK	0x03
 +#define	AMDSB8_PM_RESET_STATUS0		0xC0
 +#define	AMDSB8_PM_RESET_STATUS1		0xC1
 +#define		AMDSB8_WD_RST_STS	0x20
 +/* SB7xx RRG 2.3.4, WDRT. */
  #define	AMDSB_WD_CTRL			0x00
  #define		AMDSB_WD_RUN		0x01
  #define		AMDSB_WD_FIRED		0x02
 @@ -90,8 +103,9 @@ __FBSDID("$FreeBSD$");
  #define	AMDSB_WDIO_REG_WIDTH		4
  /* WDRT */
  #define	MAXCOUNT_MIN_VALUE		511
 -/* RRG 2.3.1.1, page 122; SB600 RRG 2.3.1.1, page 97. */
 -#define	AMDSB7xx_SMBUS_DEVID		0x43851002
 +/* SB7xx RRG 2.3.1.1, SB600 RRG 2.3.1.1, SB8xx RRG 2.3.1.  */
 +#define	AMDSB_SMBUS_DEVID		0x43851002
 +#define	AMDSB8_SMBUS_REVID		0x40
  
  #define	amdsbwd_verbose_printf(dev, ...)	\
  	do {						\
 @@ -265,7 +279,7 @@ amdsbwd_identify(driver_t *driver, devic
  	smb_dev = pci_find_bsf(0, 20, 0);
  	if (smb_dev == NULL)
  		return;
 -	if (pci_get_devid(smb_dev) != AMDSB7xx_SMBUS_DEVID)
 +	if (pci_get_devid(smb_dev) != AMDSB_SMBUS_DEVID)
  		return;
  
  	child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "amdsbwd", -1);
 @@ -273,15 +287,102 @@ amdsbwd_identify(driver_t *driver, devic
  		device_printf(parent, "add amdsbwd child failed\n");
  }
  
 +
 +static void
 +amdsbwd_probe_sb7xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB_PM_WDT_BASE_MSB - i);
 +	}
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_RES_MASK;
 +	val |= AMDSB_WDT_RES_10MS;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/* Enable watchdog device (in stopped state). */
 +	val = pmio_read(pmres, AMDSB_PM_WDT_CTRL);
 +	val &= ~AMDSB_WDT_DISABLE;
 +	pmio_write(pmres, AMDSB_PM_WDT_CTRL, val);
 +
 +	/*
 +	 * XXX TODO: Ensure that watchdog decode is enabled
 +	 * (register 0x41, bit 3).
 +	 */
 +	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
 +}
 +
 +static void
 +amdsbwd_probe_sb8xx(device_t dev, struct resource *pmres, uint32_t *addr)
 +{
 +	uint32_t	val;
 +	int		i;
 +
 +	/* Report cause of previous reset for user's convenience. */
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS0);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 +	val = pmio_read(pmres, AMDSB8_PM_RESET_STATUS1);
 +	if (val != 0)
 +		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 +	if ((val & AMDSB8_WD_RST_STS) != 0)
 +		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +
 +	/* Find base address of memory mapped WDT registers. */
 +	for (*addr = 0, i = 0; i < 4; i++) {
 +		*addr <<= 8;
 +		*addr |= pmio_read(pmres, AMDSB8_PM_WDT_EN + 3 - i);
 +	}
 +	*addr &= ~0x07u;
 +
 +	/* Set watchdog timer tick to 1s. */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	val &= ~AMDSB8_WDT_RES_MASK;
 +	val |= AMDSB8_WDT_1HZ;
 +	pmio_write(pmres, AMDSB8_PM_WDT_CTRL, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_CTRL);
 +	amdsbwd_verbose_printf(dev, "AMDSB8_PM_WDT_CTRL value = %#02x\n", val);
 +#endif
 +
 +	/*
 +	 * Enable watchdog device (in stopped state)
 +	 * and decoding of its address.
 +	 */
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	val &= ~AMDSB8_WDT_DISABLE;
 +	val |= AMDSB8_WDT_DEC_EN;
 +	pmio_write(pmres, AMDSB8_PM_WDT_EN, val);
 +#ifdef AMDSBWD_DEBUG
 +	val = pmio_read(pmres, AMDSB8_PM_WDT_EN);
 +	device_printf(dev, "AMDSB8_PM_WDT_EN value = %#02x\n", val);
 +#endif
 +	device_set_desc(dev, "AMD SB8xx Watchdog Timer");
 +}
 +
  static int
  amdsbwd_probe(device_t dev)
  {
  	struct resource		*res;
 +	device_t		smb_dev;
  	uint32_t		addr;
 -	uint32_t		val;
  	int			rid;
  	int			rc;
 -	int			i;
  
  	/* Do not claim some ISA PnP device by accident. */
  	if (isa_get_logicalid(dev) != 0)
 @@ -301,21 +402,16 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Report cause of previous reset for user's convenience. */
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS0);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus0 = %#04x\n", val);
 -	val = pmio_read(res, AMDSB_PM_RESET_STATUS1);
 -	if (val != 0)
 -		amdsbwd_verbose_printf(dev, "ResetStatus1 = %#04x\n", val);
 -	if ((val & AMDSB_WD_RST_STS) != 0)
 -		device_printf(dev, "Previous Reset was caused by Watchdog\n");
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		amdsbwd_probe_sb7xx(dev, res, &addr);
 +	else
 +		amdsbwd_probe_sb8xx(dev, res, &addr);
 +
 +	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 +	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
  
 -	/* Find base address of memory mapped WDT registers. */
 -	for (addr = 0, i = 0; i < 4; i++) {
 -		addr <<= 8;
 -		addr |= pmio_read(res, AMDSB_PM_WDT_BASE_MSB - i);
 -	}
  	amdsbwd_verbose_printf(dev, "memory base address = %#010x\n", addr);
  	rc = bus_set_resource(dev, SYS_RES_MEMORY, 0, addr + AMDSB_WD_CTRL,
  	    AMDSB_WDIO_REG_WIDTH);
 @@ -330,36 +426,25 @@ amdsbwd_probe(device_t dev)
  		return (ENXIO);
  	}
  
 -	/* Set watchdog timer tick to 10ms. */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_RES_MASK;
 -	val |= AMDSB_WDT_RES_10MS;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/* Enable watchdog device (in stopped state). */
 -	val = pmio_read(res, AMDSB_PM_WDT_CTRL);
 -	val &= ~AMDSB_WDT_DISABLE;
 -	pmio_write(res, AMDSB_PM_WDT_CTRL, val);
 -
 -	/*
 -	 * XXX TODO: Ensure that watchdog decode is enabled
 -	 * (register 0x41, bit 3).
 -	 */
 -	bus_release_resource(dev, SYS_RES_IOPORT, rid, res);
 -	bus_delete_resource(dev, SYS_RES_IOPORT, rid);
 -
 -	device_set_desc(dev, "AMD SB600/SB7xx Watchdog Timer");
  	return (0);
  }
  
  static int
  amdsbwd_attach_sb(device_t dev, struct amdsbwd_softc *sc)
  {
 +	device_t	smb_dev;
 +
  	sc->max_ticks = UINT16_MAX;
 -	sc->ms_per_tick = 10;
  	sc->rid_ctrl = 0;
  	sc->rid_count = 1;
  
 +	smb_dev = pci_find_bsf(0, 20, 0);
 +	KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n"));
 +	if (pci_get_revid(smb_dev) < AMDSB8_SMBUS_REVID)
 +		sc->ms_per_tick = 10;
 +	else
 +		sc->ms_per_tick = 1000;
 +
  	sc->res_ctrl = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
  	    &sc->rid_ctrl, RF_ACTIVE);
  	if (sc->res_ctrl == NULL) {
 @@ -388,6 +473,11 @@ amdsbwd_attach(device_t dev)
  	if (rc != 0)
  		goto fail;
  
 +#ifdef AMDSBWD_DEBUG
 +	device_printf(dev, "wd ctrl = %#04x\n", wdctrl_read(sc));
 +	device_printf(dev, "wd count = %#04x\n", wdcount_read(sc));
 +#endif
 +
  	/* Setup initial state of Watchdog Control. */
  	wdctrl_write(sc, AMDSB_WD_FIRED);
  
 _______________________________________________
 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"
 
State-Changed-From-To: patched->closed 
State-Changed-By: avg 
State-Changed-When: Wed Jun 22 07:21:58 UTC 2011 
State-Changed-Why:  
Support for the new chipset has been added. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157568 
>Unformatted:
