From owner-freebsd-smp@FreeBSD.ORG Sun Aug 28 02:48:49 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81E3316A41F for ; Sun, 28 Aug 2005 02:48:49 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-5.paradise.net.nz (bm-5a.paradise.net.nz [202.0.58.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EB7843D45 for ; Sun, 28 Aug 2005 02:48:48 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-2.paradise.net.nz (smtp-2a.paradise.net.nz [202.0.32.195]) by linda-5.paradise.net.nz (Paradise.net.nz) with ESMTP id <0ILW0096YVTBOF@linda-5.paradise.net.nz> for freebsd-smp@freebsd.org; Sun, 28 Aug 2005 14:48:47 +1200 (NZST) Received: from [192.168.1.11] (218-101-45-94.paradise.net.nz [218.101.45.94]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id 9D2609E9A0 for ; Sun, 28 Aug 2005 14:47:54 +1200 (NZST) Date: Sun, 28 Aug 2005 14:47:53 +1200 From: Mark Kirkwood To: freebsd-smp@freebsd.org Message-id: <431125D9.2090401@paradise.net.nz> MIME-version: 1.0 Content-type: multipart/mixed; boundary=------------090403080900000406070508 X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) Subject: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2005 02:48:49 -0000 This is a multi-part message in MIME format. --------------090403080900000406070508 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I had previously posted something very similar to -current with BETA2, but received no replies. Also the SMP factor might make this more appropriate here :-) Tyan S2510 dual PIII 6.0-BETA3 (dmesg attached for case with USB disabled): kernel(SMP) + bios(USB disabled) -> hang at reboot whereas kernel(SMP) + bios(USB) -> reboot ok As I am still a kernel debugger newbie (and because the hang state was unresponsive to keyboard break), I added a few printfs instead to pin down where the hang was. It appears to be in: src/sys/i386/i386/vm_machdep.c:cpu_reset_real() specifically: #if !defined(BROKEN_KEYBOARD_RESET) printf("cpu_reset_real: case !BROKEN_KEYBOARD_RESET \n"); /* <==== HANGS AFTER DISPLAYING ==== */ DELAY(1000000); /* * Attempt to do a CPU reset via the keyboard controller, * do not turn off GateA20, as any machine that fails * to do the reset here would then end up in no man's land. */ outb(IO_KBD + 4, 0xFE); /* <==== DEDUCE HANG HERE ==== */ DELAY(500000); /* wait 0.5 sec to see if that did it */ printf("Keyboard reset did not work, attempting CPU shutdown\n"); DELAY(1000000); /* wait 1 sec for printf to complete */ #endif (I have spattered the nice clean source with printf's and DELAY's... but you get the idea). So outb(IO_KBD + 4, 0xFE) *looks* like the culprit. So anybody have any ideas why *SMP* is triggering this? Or why it is happening anyway? cheers Mark --------------090403080900000406070508 Content-Type: text/plain; name="dmesg.nousb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg.nousb" Copyright (c) 1992-2005 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 5.4-RELEASE #3: Sat Aug 13 11:57:03 NZST 2005 root@istral.markir.net:/usr/obj/usr/src/sys/STANDARD Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (996.85-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x387fbff real memory = 2147483648 (2048 MB) avail memory = 2100244480 (2002 MB) MPTable: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Assuming intbase of 0 ioapic1: Assuming intbase of 16 ioapic0 irqs 0-15 on motherboard ioapic1 irqs 16-31 on motherboard npx0: on motherboard npx0: INT 16 interface cpu0 on motherboard cpu1 on motherboard pcib0: pcibus 0 on motherboard pci0: on pcib0 pci0: at device 1.0 (no driver attached) fxp0: port 0xd400-0xd43f mem 0xfe900000-0xfe9fffff,0xfeafe000-0xfeafefff irq 20 at device 4.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:e0:81:02:4c:6a fxp1: port 0xd000-0xd03f mem 0xfe700000-0xfe7fffff,0xfeafd000-0xfeafdfff irq 21 at device 5.0 on pci0 miibus1: on fxp1 inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: Ethernet address: 00:e0:81:02:4c:6b isab0: port 0x580-0x58f at device 15.0 on pci0 isa0: on isab0 atapci0: port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 15.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 ohci0: mem 0xfffff000-0xffffffff at device 15.2 on pci0 pcib0: unable to route slot 15 INTA ohci0: Could not allocate irq device_attach: ohci0 attach returned 6 pcib1: pcibus 1 on motherboard pci1: on pcib1 atapci1: port 0xef90-0xef9f,0xefa8-0xefab,0xefa0-0xefa7,0xefac-0xefaf,0xefe0-0xefe7 mem 0xfebf0000-0xfebfffff irq 27 at device 2.0 on pci1 ata2: channel #0 on atapci1 ata3: channel #1 on atapci1 orm0: at iomem 0xd2800-0xd37ff,0xd1800-0xd27ff,0xc8000-0xd17ff,0xc0000-0xc7fff on isa0 pmtimer0 on isa0 atkbdc0: at port 0x64,0x60 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 fdc0: at port 0x3f0-0x3f5 irq 6 drq 2 on isa0 fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) Timecounters tick every 10.000 msec acd0: CDRW at ata0-master PIO4 ad4: 39205MB [79656/16/63] at ata2-master UDMA133 ad5: 39205MB [79656/16/63] at ata2-slave UDMA133 ad6: 39205MB [79656/16/63] at ata3-master UDMA133 ad7: 39205MB [79656/16/63] at ata3-slave UDMA133 ar0: 156822MB [19991/255/63] status: READY subdisks: disk0 READY on ad4 at ata2-master disk1 READY on ad6 at ata3-master disk2 READY on ad5 at ata2-slave disk3 READY on ad7 at ata3-slave SMP: AP CPU #1 Launched! Mounting root from ufs:/dev/ar0s1a --------------090403080900000406070508-- From owner-freebsd-smp@FreeBSD.ORG Sun Aug 28 08:59:24 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E307D16A41F for ; Sun, 28 Aug 2005 08:59:24 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-4.paradise.net.nz (bm-4a.paradise.net.nz [202.0.58.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59DB143D45 for ; Sun, 28 Aug 2005 08:59:24 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-1.paradise.net.nz (smtp-1a.paradise.net.nz [202.0.32.194]) by linda-4.paradise.net.nz (Paradise.net.nz) with ESMTP id <0ILX008SWCYYI2@linda-4.paradise.net.nz> for freebsd-smp@freebsd.org; Sun, 28 Aug 2005 20:59:23 +1200 (NZST) Received: from [192.168.1.11] (218-101-45-94.paradise.net.nz [218.101.45.94]) by smtp-1.paradise.net.nz (Postfix) with ESMTP id 5FF4E82D8D for ; Sun, 28 Aug 2005 20:59:22 +1200 (NZST) Date: Sun, 28 Aug 2005 20:59:19 +1200 From: Mark Kirkwood In-reply-to: <431125D9.2090401@paradise.net.nz> To: freebsd-smp@freebsd.org Message-id: <43117CE7.9040703@paradise.net.nz> MIME-version: 1.0 Content-type: multipart/mixed; boundary=------------040409010908060104000808 X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <431125D9.2090401@paradise.net.nz> Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2005 08:59:25 -0000 This is a multi-part message in MIME format. --------------040409010908060104000808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sorry - I attached the wrong dmesg (same machine, but running 5.4 doh!) FWIW here are two dmesg, one with usb disabled (from 3 Aug, so is still BETA2) and one with usb enabled (from 24 Aug). Mark Kirkwood wrote: > I had previously posted something very similar to -current with BETA2, > but received no replies. Also the SMP factor might make this more > appropriate here :-) > > Tyan S2510 dual PIII 6.0-BETA3 (dmesg attached for case with USB disabled): > --------------040409010908060104000808 Content-Type: text/plain; name="dmesg.nousb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg.nousb" Copyright (c) 1992-2005 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 6.0-BETA2 #0: Wed Aug 3 08:22:24 UTC 2005 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (996.85-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x387fbff real memory = 2147483648 (2048 MB) avail memory = 2096541696 (1999 MB) MPTable: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Assuming intbase of 0 ioapic1: Assuming intbase of 16 ioapic0 irqs 0-15 on motherboard ioapic1 irqs 16-31 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface cpu0 on motherboard cpu1 on motherboard pcib0: pcibus 0 on motherboard pci0: on pcib0 pci0: at device 1.0 (no driver attached) fxp0: port 0xd400-0xd43f mem 0xfeafe000-0xfeafefff,0xfe900000-0xfe9fffff irq 20 at device 4.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:e0:81:02:4c:6a fxp1: port 0xd000-0xd03f mem 0xfeafd000-0xfeafdfff,0xfe700000-0xfe7fffff irq 21 at device 5.0 on pci0 miibus1: on fxp1 inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: Ethernet address: 00:e0:81:02:4c:6b isab0: port 0x580-0x58f at device 15.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 15.1 on pci0 ata0: on atapci0 ata1: on atapci0 ohci0: mem 0xfffff000-0xffffffff at device 15.2 on pci0 pcib0: unable to route slot 15 INTA ohci0: Could not allocate irq device_attach: ohci0 attach returned 6 pcib1: pcibus 1 on motherboard pci1: on pcib1 atapci1: port 0xefe0-0xefe7,0xefac-0xefaf,0xefa0-0xefa7,0xefa8-0xefab,0xef90-0xef9f mem 0xfebf0000-0xfebfffff irq 27 at device 2.0 on pci1 ata2: on atapci1 ata3: on atapci1 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xd17ff,0xd1800-0xd27ff,0xd2800-0xd37ff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (memory) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) Timecounters tick every 1.000 msec acd0: CDRW at ata0-master PIO4 ad4: 39205MB at ata2-master UDMA133 ad5: 39205MB at ata2-slave UDMA133 ad6: 39205MB at ata3-master UDMA133 ad7: 39205MB at ata3-slave UDMA133 ATA PseudoRAID loaded ar0: 156822MB status: READY ar0: disk0 READY using ad4 at ata2-master ar0: disk1 READY using ad6 at ata3-master ar0: disk2 READY using ad5 at ata2-slave ar0: disk3 READY using ad7 at ata3-slave SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ar0s2a lock order reversal 1st 0xc097b240 UMA lock (UMA lock) @ /usr/src/sys/vm/uma_core.c:1494 2nd 0xc1060144 system map (system map) @ /usr/src/sys/vm/vm_map.c:2317 KDB: stack backtrace: kdb_backtrace(0,ffffffff,c0930358,c0930498,c08bace4) at kdb_backtrace+0x29 witness_checkorder(c1060144,9,c08714b6,90d) at witness_checkorder+0x564 _mtx_lock_flags(c1060144,0,c08714b6,90d) at _mtx_lock_flags+0x5b _vm_map_lock(c10600c0,c08714b6,90d) at _vm_map_lock+0x26 vm_map_remove(c10600c0,c365b000,c365c000,e6a40c08,c077ee01) at vm_map_remove+0x1f kmem_free(c10600c0,c365b000,1000,e6a40c38,c077e7ae) at kmem_free+0x25 page_free(c365b000,1000,2) at page_free+0x29 zone_drain(c104a780) at zone_drain+0x26a zone_foreach(c077e544,e6a40cec,c079062f,c354a300,e6a40c74) at zone_foreach+0x37 uma_reclaim(c354a300,e6a40c74,0,c0926980,e6a40c80) at uma_reclaim+0x12 vm_pageout_scan(0,c097b6a0,0,c08729a3,5c3) at vm_pageout_scan+0x103 vm_pageout(0,e6a40d38,0,c07913e8,0) at vm_pageout+0x2c3 fork_exit(c07913e8,0,e6a40d38) at fork_exit+0xa0 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip = 0, esp = 0xe6a40d6c, ebp = 0 --- --------------040409010908060104000808 Content-Type: text/plain; name="dmesg" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg" Copyright (c) 1992-2005 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 6.0-BETA3 #4: Wed Aug 24 21:05:50 NZST 2005 postgres@ikker.markir.net:/usr/obj/usr/src/sys/GENERIC WARNING: WITNESS option enabled, expect reduced performance. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel Pentium III (996.85-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x686 Stepping = 6 Features=0x387fbff real memory = 2147483648 (2048 MB) avail memory = 2096541696 (1999 MB) MPTable: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Assuming intbase of 0 ioapic1: Assuming intbase of 16 ioapic0 irqs 0-15 on motherboard ioapic1 irqs 16-31 on motherboard npx0: [FAST] npx0: on motherboard npx0: INT 16 interface cpu0 on motherboard cpu1 on motherboard pcib0: pcibus 0 on motherboard pci0: on pcib0 pci0: at device 1.0 (no driver attached) fxp0: port 0xd400-0xd43f mem 0xfeafe000-0xfeafefff,0xfe900000-0xfe9fffff irq 20 at device 4.0 on pci0 miibus0: on fxp0 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:e0:81:02:4c:6a fxp1: port 0xd000-0xd03f mem 0xfeafd000-0xfeafdfff,0xfe700000-0xfe7fffff irq 21 at device 5.0 on pci0 miibus1: on fxp1 inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: Ethernet address: 00:e0:81:02:4c:6b isab0: port 0x580-0x58f at device 15.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 15.1 on pci0 ata0: on atapci0 ata1: on atapci0 ohci0: mem 0xfeafc000-0xfeafcfff irq 10 at device 15.2 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 uhub0: (0x1166) OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 4 ports with 4 removable, self powered pcib1: pcibus 1 on motherboard pci1: on pcib1 atapci1: port 0xefe0-0xefe7,0xefac-0xefaf,0xefa0-0xefa7,0xefa8-0xefab,0xef90-0xef9f mem 0xfebf0000-0xfebfffff irq 27 at device 2.0 on pci1 ata2: on atapci1 ata3: on atapci1 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xd17ff,0xd1800-0xd27ff,0xd2800-0xd37ff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (memory) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) unknown: can't assign resources (port) Timecounters tick every 1.000 msec acd0: CDRW at ata0-master PIO4 ad4: 39205MB at ata2-master UDMA133 ad5: 39205MB at ata2-slave UDMA133 ad6: 39205MB at ata3-master UDMA133 ad7: 39205MB at ata3-slave UDMA133 ar0: 156822MB status: READY ar0: disk0 READY using ad4 at ata2-master ar0: disk1 READY using ad6 at ata3-master ar0: disk2 READY using ad5 at ata2-slave ar0: disk3 READY using ad7 at ata3-slave SMP: AP CPU #1 Launched! Trying to mount root from ufs:/dev/ar0s2a --------------040409010908060104000808-- From owner-freebsd-smp@FreeBSD.ORG Mon Aug 29 15:56:40 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF2B616A42A; Mon, 29 Aug 2005 15:56:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 733FF43D53; Mon, 29 Aug 2005 15:56:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 29 Aug 2005 12:11:54 -0400 From: John Baldwin To: freebsd-smp@freebsd.org Date: Mon, 29 Aug 2005 11:57:24 -0400 User-Agent: KMail/1.8 References: <431125D9.2090401@paradise.net.nz> <43117CE7.9040703@paradise.net.nz> In-Reply-To: <43117CE7.9040703@paradise.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508291157.26619.jhb@FreeBSD.org> Cc: imp@FreeBSD.org, Mark Kirkwood Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 15:56:40 -0000 On Sunday 28 August 2005 04:59 am, Mark Kirkwood wrote: > Sorry - I attached the wrong dmesg (same machine, but running 5.4 doh!) > > FWIW here are two dmesg, one with usb disabled (from 3 Aug, so is still > BETA2) and one with usb enabled (from 24 Aug). > > Mark Kirkwood wrote: > > I had previously posted something very similar to -current with BETA2, > > but received no replies. Also the SMP factor might make this more > > appropriate here :-) > > > > Tyan S2510 dual PIII 6.0-BETA3 (dmesg attached for case with USB > > disabled): Ok, your BIOS is being a PITA. :) First off, can you try setting 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes the problem? When USB is disabled, your BIOS writes 0xffffffff to its BAR instead of 0x0 which conflicts with where the BIOS is mapped so that when the box reboots it tries to execute the USB controller's registers instead of the BIOS code to reboot, hence the hang. :) Note the ohci0 lines from the dmesg's: dmesg.nousb: ohci0: mem 0xfffff000-0xffffffff at device 15.2 on pci0 pcib0: unable to route slot 15 INTA ohci0: Could not allocate irq device_attach: ohci0 attach returned 6 dmesg.usb: ohci0: mem 0xfeafc000-0xfeafcfff irq 10 at device 15.2 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: on ohci0 usb0: USB revision 1.0 I think the real fix is that we should treat BARs whose value is identical to what it would be if tbe value 0xffffffff is written to it as invalid just as we treat BARs with a value of 0 as invalid. Warner (cc'd) might be able to come up with a patch for that faster than I could. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-smp@FreeBSD.ORG Tue Aug 30 00:51:28 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D9FA16A41F; Tue, 30 Aug 2005 00:51:28 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-5.paradise.net.nz (bm-5a.paradise.net.nz [202.0.58.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E58643D4C; Tue, 30 Aug 2005 00:51:28 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-3.paradise.net.nz (smtp-3a.paradise.net.nz [202.0.32.196]) by linda-5.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IM0008KBFPRHN@linda-5.paradise.net.nz>; Tue, 30 Aug 2005 12:51:27 +1200 (NZST) Received: from [192.168.1.11] (218-101-13-128.paradise.net.nz [218.101.13.128]) by smtp-3.paradise.net.nz (Postfix) with ESMTP id 309CEAE3C8; Tue, 30 Aug 2005 12:51:27 +1200 (NZST) Date: Tue, 30 Aug 2005 12:51:26 +1200 From: Mark Kirkwood In-reply-to: <200508291157.26619.jhb@FreeBSD.org> To: John Baldwin Message-id: <4313AD8E.7080906@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-6 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <431125D9.2090401@paradise.net.nz> <43117CE7.9040703@paradise.net.nz> <200508291157.26619.jhb@FreeBSD.org> Cc: imp@FreeBSD.org, freebsd-smp@freebsd.org Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 00:51:28 -0000 John Baldwin wrote: > Ok, your BIOS is being a PITA. :) First off, can you try setting > 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes the > problem? > Sure does, thanks for looking at this! Cheers Mark From owner-freebsd-smp@FreeBSD.ORG Tue Aug 30 18:45:53 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2893F16A41F; Tue, 30 Aug 2005 18:45:53 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FE7F43D48; Tue, 30 Aug 2005 18:45:52 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 30 Aug 2005 15:01:10 -0400 From: John Baldwin To: freebsd-smp@freebsd.org Date: Tue, 30 Aug 2005 14:22:45 -0400 User-Agent: KMail/1.8 References: <431125D9.2090401@paradise.net.nz> <200508291157.26619.jhb@FreeBSD.org> <4313AD8E.7080906@paradise.net.nz> In-Reply-To: <4313AD8E.7080906@paradise.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508301422.46354.jhb@FreeBSD.org> Cc: imp@freebsd.org, Mark Kirkwood Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 18:45:53 -0000 On Monday 29 August 2005 08:51 pm, Mark Kirkwood wrote: > John Baldwin wrote: > > Ok, your BIOS is being a PITA. :) First off, can you try setting > > 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes the > > problem? > > Sure does, thanks for looking at this! Ok, don't go away. :) Warner or I can work on a patch to fix this then that won't require you to set that tunable. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-smp@FreeBSD.ORG Tue Aug 30 18:59:59 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D871716A41F; Tue, 30 Aug 2005 18:59:59 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0F4643D53; Tue, 30 Aug 2005 18:59:57 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j7UIx2mH062418; Tue, 30 Aug 2005 12:59:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 30 Aug 2005 12:59:25 -0600 (MDT) Message-Id: <20050830.125925.124085095.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200508301422.46354.jhb@FreeBSD.org> References: <200508291157.26619.jhb@FreeBSD.org> <4313AD8E.7080906@paradise.net.nz> <200508301422.46354.jhb@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.village.org [127.0.0.1]); Tue, 30 Aug 2005 12:59:02 -0600 (MDT) Cc: freebsd-smp@freebsd.org, markir@paradise.net.nz Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 19:00:00 -0000 In message: <200508301422.46354.jhb@FreeBSD.org> John Baldwin writes: : On Monday 29 August 2005 08:51 pm, Mark Kirkwood wrote: : > John Baldwin wrote: : > > Ok, your BIOS is being a PITA. :) First off, can you try setting : > > 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes the : > > problem? : > : > Sure does, thanks for looking at this! : : Ok, don't go away. :) Warner or I can work on a patch to fix this then that : won't require you to set that tunable. I think that might be very hard to do that. While some (bogus) BIOSes set the maps to be all f's for devices they have disabled, many devices default to this value on power up. Since we have to perform lazy resource assignment for these devices, it may be difficult to differentiate between the unassigned case and the disabled case. Is there something I'm missing as to how we can tell the difference between these two cases? Warner From owner-freebsd-smp@FreeBSD.ORG Tue Aug 30 20:35:15 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C271316A468 for ; Tue, 30 Aug 2005 20:35:15 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A02743D49 for ; Tue, 30 Aug 2005 20:35:15 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Tue, 30 Aug 2005 16:50:33 -0400 From: John Baldwin To: "M. Warner Losh" Date: Tue, 30 Aug 2005 16:23:57 -0400 User-Agent: KMail/1.8 References: <200508291157.26619.jhb@FreeBSD.org> <200508301422.46354.jhb@FreeBSD.org> <20050830.125925.124085095.imp@bsdimp.com> In-Reply-To: <20050830.125925.124085095.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508301623.57973.jhb@FreeBSD.org> Cc: freebsd-smp@freebsd.org, markir@paradise.net.nz Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 20:35:15 -0000 On Tuesday 30 August 2005 02:59 pm, M. Warner Losh wrote: > In message: <200508301422.46354.jhb@FreeBSD.org> > > John Baldwin writes: > : On Monday 29 August 2005 08:51 pm, Mark Kirkwood wrote: > : > John Baldwin wrote: > : > > Ok, your BIOS is being a PITA. :) First off, can you try setting > : > > 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes > : > > the problem? > : > > : > Sure does, thanks for looking at this! > : > : Ok, don't go away. :) Warner or I can work on a patch to fix this then > : that won't require you to set that tunable. > > I think that might be very hard to do that. > > While some (bogus) BIOSes set the maps to be all f's for devices they > have disabled, many devices default to this value on power up. Since > we have to perform lazy resource assignment for these devices, it may > be difficult to differentiate between the unassigned case and the > disabled case. Is there something I'm missing as to how we can tell > the difference between these two cases? That should be identical cases. The problem currently is that we think that 0xffffffff is valid and we turn on the MEMEN bit in the PCI command register, so when the box goes to reboot it tries to execute the BIOS code that is normally mapped at 0xffff0000 and ends up executing what that BAR maps instead, hence his hang. Basically, I think we should treat 0xffffffff just like we treat 0x0. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-smp@FreeBSD.ORG Tue Aug 30 21:09:10 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAD0A16A41F; Tue, 30 Aug 2005 21:09:10 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3432043D46; Tue, 30 Aug 2005 21:09:10 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.3) with ESMTP id j7UL7Q3s063650; Tue, 30 Aug 2005 15:07:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 30 Aug 2005 15:07:50 -0600 (MDT) Message-Id: <20050830.150750.91757991.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200508301623.57973.jhb@FreeBSD.org> References: <200508301422.46354.jhb@FreeBSD.org> <20050830.125925.124085095.imp@bsdimp.com> <200508301623.57973.jhb@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.village.org [127.0.0.1]); Tue, 30 Aug 2005 15:07:27 -0600 (MDT) Cc: freebsd-smp@freebsd.org, markir@paradise.net.nz Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2005 21:09:10 -0000 In message: <200508301623.57973.jhb@FreeBSD.org> John Baldwin writes: : On Tuesday 30 August 2005 02:59 pm, M. Warner Losh wrote: : > In message: <200508301422.46354.jhb@FreeBSD.org> : > : > John Baldwin writes: : > : On Monday 29 August 2005 08:51 pm, Mark Kirkwood wrote: : > : > John Baldwin wrote: : > : > > Ok, your BIOS is being a PITA. :) First off, can you try setting : > : > > 'hw.pci.enable_io_modes=0' from the loader and seeing if that fixes : > : > > the problem? : > : > : > : > Sure does, thanks for looking at this! : > : : > : Ok, don't go away. :) Warner or I can work on a patch to fix this then : > : that won't require you to set that tunable. : > : > I think that might be very hard to do that. : > : > While some (bogus) BIOSes set the maps to be all f's for devices they : > have disabled, many devices default to this value on power up. Since : > we have to perform lazy resource assignment for these devices, it may : > be difficult to differentiate between the unassigned case and the : > disabled case. Is there something I'm missing as to how we can tell : > the difference between these two cases? : : That should be identical cases. The problem currently is that we think that : 0xffffffff is valid and we turn on the MEMEN bit in the PCI command register, : so when the box goes to reboot it tries to execute the BIOS code that is : normally mapped at 0xffff0000 and ends up executing what that BAR maps : instead, hence his hang. Basically, I think we should treat 0xffffffff just : like we treat 0x0. We can treat 0xfffffxxxx the same as we treat '0' fairly easily enough in pci_add_map. However, this is different than treating the device as being disabled. What will likely happen is that we'll allocate fresh resources for the device, in effect re-enabling it. If that's OK, then I'd agree that the fix is a one liner (well, more with comment updates). Warner From owner-freebsd-smp@FreeBSD.ORG Wed Aug 31 05:25:48 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5720A16A41F; Wed, 31 Aug 2005 05:25:48 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-2.paradise.net.nz (bm-2a.paradise.net.nz [202.0.58.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E88A443D45; Wed, 31 Aug 2005 05:25:47 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-3.paradise.net.nz (smtp-3a.paradise.net.nz [202.0.32.196]) by linda-2.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IM200EBYN2X25@linda-2.paradise.net.nz>; Wed, 31 Aug 2005 17:25:46 +1200 (NZST) Received: from [192.168.1.11] (218-101-45-36.paradise.net.nz [218.101.45.36]) by smtp-3.paradise.net.nz (Postfix) with ESMTP id 11C37AF07A; Wed, 31 Aug 2005 17:23:05 +1200 (NZST) Date: Wed, 31 Aug 2005 17:23:02 +1200 From: Mark Kirkwood In-reply-to: <200508301422.46354.jhb@FreeBSD.org> To: John Baldwin Message-id: <43153EB6.6060909@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-6 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <431125D9.2090401@paradise.net.nz> <200508291157.26619.jhb@FreeBSD.org> <4313AD8E.7080906@paradise.net.nz> <200508301422.46354.jhb@FreeBSD.org> Cc: imp@freebsd.org, freebsd-smp@freebsd.org Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 05:25:48 -0000 John Baldwin wrote: > Ok, don't go away. :) Warner or I can work on a patch to fix this then that > won't require you to set that tunable. Great! (Not going anywhere...busy subjecting my 6.0 Beta3 test system to non-stop iozone hammering ....) Cheers Mark From owner-freebsd-smp@FreeBSD.ORG Wed Aug 31 19:57:51 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E8B616A41F for ; Wed, 31 Aug 2005 19:57:51 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5678D43D46 for ; Wed, 31 Aug 2005 19:57:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 31 Aug 2005 16:12:51 -0400 From: John Baldwin To: "M. Warner Losh" Date: Wed, 31 Aug 2005 15:56:18 -0400 User-Agent: KMail/1.8 References: <200508301422.46354.jhb@FreeBSD.org> <200508301623.57973.jhb@FreeBSD.org> <20050830.150750.91757991.imp@bsdimp.com> In-Reply-To: <20050830.150750.91757991.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508311556.19878.jhb@FreeBSD.org> Cc: freebsd-smp@freebsd.org, markir@paradise.net.nz Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 19:57:51 -0000 On Tuesday 30 August 2005 05:07 pm, M. Warner Losh wrote: > In message: <200508301623.57973.jhb@FreeBSD.org> > > John Baldwin writes: > : On Tuesday 30 August 2005 02:59 pm, M. Warner Losh wrote: > : > In message: <200508301422.46354.jhb@FreeBSD.org> > : > > : > John Baldwin writes: > : > : On Monday 29 August 2005 08:51 pm, Mark Kirkwood wrote: > : > : > John Baldwin wrote: > : > : > > Ok, your BIOS is being a PITA. :) First off, can you try setting > : > : > > 'hw.pci.enable_io_modes=0' from the loader and seeing if that > : > : > > fixes the problem? > : > : > > : > : > Sure does, thanks for looking at this! > : > : > : > : Ok, don't go away. :) Warner or I can work on a patch to fix this > : > : then that won't require you to set that tunable. > : > > : > I think that might be very hard to do that. > : > > : > While some (bogus) BIOSes set the maps to be all f's for devices they > : > have disabled, many devices default to this value on power up. Since > : > we have to perform lazy resource assignment for these devices, it may > : > be difficult to differentiate between the unassigned case and the > : > disabled case. Is there something I'm missing as to how we can tell > : > the difference between these two cases? > : > : That should be identical cases. The problem currently is that we think > : that 0xffffffff is valid and we turn on the MEMEN bit in the PCI command > : register, so when the box goes to reboot it tries to execute the BIOS > : code that is normally mapped at 0xffff0000 and ends up executing what > : that BAR maps instead, hence his hang. Basically, I think we should > : treat 0xffffffff just like we treat 0x0. > > We can treat 0xfffffxxxx the same as we treat '0' fairly easily enough > in pci_add_map. However, this is different than treating the device > as being disabled. What will likely happen is that we'll allocate > fresh resources for the device, in effect re-enabling it. If that's > OK, then I'd agree that the fix is a one liner (well, more with > comment updates). Yes, that's ok. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-smp@FreeBSD.ORG Wed Aug 31 20:18:56 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E62D16A41F; Wed, 31 Aug 2005 20:18:56 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D228A43D48; Wed, 31 Aug 2005 20:18:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j7VKHkCc012669; Wed, 31 Aug 2005 14:17:46 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 31 Aug 2005 14:18:12 -0600 (MDT) Message-Id: <20050831.141812.45157237.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: <200508311556.19878.jhb@FreeBSD.org> References: <200508301623.57973.jhb@FreeBSD.org> <20050830.150750.91757991.imp@bsdimp.com> <200508311556.19878.jhb@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 31 Aug 2005 14:17:46 -0600 (MDT) Cc: freebsd-smp@freebsd.org, markir@paradise.net.nz Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 20:18:56 -0000 In message: <200508311556.19878.jhb@FreeBSD.org> John Baldwin writes: : Yes, that's ok. OK. I think that the following is sufficient. Please test and let me know. Index: pci.c =================================================================== RCS file: /cache/ncvs/src/sys/dev/pci/pci.c,v retrieving revision 1.292 diff -u -r1.292 pci.c --- pci.c 3 Jun 2005 19:41:06 -0000 1.292 +++ pci.c 31 Aug 2005 20:12:36 -0000 @@ -826,9 +826,14 @@ * If base is 0, then we have problems. It is best to ignore * such entries for the moment. These will be allocated later if * the driver specifically requests them. + * + * Similarlly treat maps whose values is the same as the test value + * read back. These maps have had all f's written to them by the + * BIOS in an attempt to disable the resources. */ - if (base == 0) + if (base == 0 || map == testval) return 1; + /* * This code theoretically does the right thing, but has * undesirable side effects in some cases where peripherals Warner From owner-freebsd-smp@FreeBSD.ORG Thu Sep 1 00:59:16 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2501716A41F; Thu, 1 Sep 2005 00:59:16 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-4.paradise.net.nz (bm-4a.paradise.net.nz [202.0.58.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id B403F43D45; Thu, 1 Sep 2005 00:59:13 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-1.paradise.net.nz (smtp-1a.paradise.net.nz [202.0.32.194]) by linda-4.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IM400LC45EOXI@linda-4.paradise.net.nz>; Thu, 01 Sep 2005 12:59:12 +1200 (NZST) Received: from [192.168.1.11] (218-101-14-123.paradise.net.nz [218.101.14.123]) by smtp-1.paradise.net.nz (Postfix) with ESMTP id BDB6D82D24; Thu, 01 Sep 2005 12:59:11 +1200 (NZST) Date: Thu, 01 Sep 2005 12:59:10 +1200 From: Mark Kirkwood In-reply-to: <20050831.141812.45157237.imp@bsdimp.com> To: "M. Warner Losh" Message-id: <4316525E.7070903@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <200508301623.57973.jhb@FreeBSD.org> <20050830.150750.91757991.imp@bsdimp.com> <200508311556.19878.jhb@FreeBSD.org> <20050831.141812.45157237.imp@bsdimp.com> Cc: freebsd-smp@freebsd.org Subject: Re: 6.0 BETA3 reboot hangs on SMP system if BIOS USB disabled X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 00:59:16 -0000 Just tested now - Reboots correctly with usb disabled (also checked I had not fiddled with hw.pci.enable_io_modes). Cheers Mark M. Warner Losh wrote: > In message: <200508311556.19878.jhb@FreeBSD.org> > John Baldwin writes: > : Yes, that's ok. > > OK. I think that the following is sufficient. Please test and let me > know. > > Index: pci.c > =================================================================== > RCS file: /cache/ncvs/src/sys/dev/pci/pci.c,v > retrieving revision 1.292 > diff -u -r1.292 pci.c > --- pci.c 3 Jun 2005 19:41:06 -0000 1.292 > +++ pci.c 31 Aug 2005 20:12:36 -0000 > @@ -826,9 +826,14 @@ > * If base is 0, then we have problems. It is best to ignore > * such entries for the moment. These will be allocated later if > * the driver specifically requests them. > + * > + * Similarlly treat maps whose values is the same as the test value > + * read back. These maps have had all f's written to them by the > + * BIOS in an attempt to disable the resources. > */ > - if (base == 0) > + if (base == 0 || map == testval) > return 1; > + > /* > * This code theoretically does the right thing, but has > * undesirable side effects in some cases where peripherals > > > > Warner > _______________________________________________ > freebsd-smp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-smp > To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org" > > From owner-freebsd-smp@FreeBSD.ORG Fri Sep 2 13:09:46 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 818EC16A41F for ; Fri, 2 Sep 2005 13:09:46 +0000 (GMT) (envelope-from pestalent1@hotmail.com) Received: from hotmail.com (bay104-dav2.bay104.hotmail.com [65.54.175.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D0A643D46 for ; Fri, 2 Sep 2005 13:09:46 +0000 (GMT) (envelope-from pestalent1@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 2 Sep 2005 06:09:46 -0700 Message-ID: Received: from 65.54.175.202 by BAY104-DAV2.phx.gbl with DAV; Fri, 02 Sep 2005 13:09:46 +0000 X-Originating-IP: [65.54.175.202] X-Originating-Email: [pestalent1@hotmail.com] X-Sender: pestalent1@hotmail.com From: "Pete" To: Date: Fri, 2 Sep 2005 09:10:08 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.3790.1830 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830 X-OriginalArrivalTime: 02 Sep 2005 13:09:46.0207 (UTC) FILETIME=[974EDEF0:01C5AFBF] X-Mailman-Approved-At: Fri, 02 Sep 2005 13:16:52 +0000 Subject: dual processor support X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2005 13:09:46 -0000 PLEASE HELP, I am using freebsd 5.4 on a gigabyte ga-6vtxd with dual 733 pent3. How do I enable dual processor support??? THANKS From owner-freebsd-smp@FreeBSD.ORG Fri Sep 2 13:26:48 2005 Return-Path: X-Original-To: freebsd-smp@freebsd.org Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C708F16A41F for ; Fri, 2 Sep 2005 13:26:48 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: from smtpgate2.pacific.net.sg (smtpgate2.pacific.net.sg [203.120.90.28]) by mx1.FreeBSD.org (Postfix) with SMTP id DAAF643D48 for ; Fri, 2 Sep 2005 13:26:47 +0000 (GMT) (envelope-from oceanare@pacific.net.sg) Received: (qmail 8260 invoked from network); 2 Sep 2005 13:26:45 -0000 Received: from maxwell2.pacific.net.sg (203.120.90.192) by smtpgate2.pacific.net.sg with SMTP; 2 Sep 2005 13:26:42 -0000 Received: from [192.168.0.107] ([210.24.246.71]) by maxwell2.pacific.net.sg with ESMTP id <20050902132642.GZKV28012.maxwell2.pacific.net.sg@[192.168.0.107]>; Fri, 2 Sep 2005 21:26:42 +0800 Message-ID: <431852FA.1010303@pacific.net.sg> Date: Fri, 02 Sep 2005 21:26:18 +0800 From: Erich Dollansky Organization: oceanare pte ltd User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050802) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pete References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-smp@freebsd.org Subject: Re: dual processor support X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2005 13:26:48 -0000 Hi, Pete wrote: > PLEASE HELP, > I am using freebsd 5.4 on a gigabyte ga-6vtxd with dual 733 pent3. > How do I enable dual processor support??? you must build a custom kernel with SMP and APIC enabled. Consult the handbook for the details. Erich PS: The sample entries in your kernel configuration file: # # SMP # options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC > THANKS > _______________________________________________ > freebsd-smp@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-smp > To unsubscribe, send any mail to "freebsd-smp-unsubscribe@freebsd.org" >