From owner-freebsd-smp Sun Oct 20 13:11:28 2002 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 75F9A37B401 for ; Sun, 20 Oct 2002 13:11:27 -0700 (PDT) Received: from mrslate.anderson.ucla.edu (mrslate.anderson.ucla.edu [164.67.163.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E1B543E6E for ; Sun, 20 Oct 2002 13:11:27 -0700 (PDT) (envelope-from jros@anderson.ucla.edu) Received: (from nobody@localhost) by mrslate.anderson.ucla.edu (8.11.6/8.11.6) id g9KKBQw14284; Sun, 20 Oct 2002 13:11:26 -0700 (PDT) X-Authentication-Warning: mrslate.anderson.ucla.edu: nobody set sender to jros@anderson.ucla.edu using -f To: freebsd-smp@FreeBSD.org Subject: Question on porting freebsd smp Message-ID: <1035144686.3db30dee79f4c@webmail.anderson.ucla.edu> Date: Sun, 20 Oct 2002 13:11:26 -0700 (PDT) From: jros@anderson.ucla.edu Cc: jros@anderson.ucla.edu MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.8 X-Originating-IP: 208.178.183.62 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi all, I have been working on porting the tcp/ip freebsd 4.5 to user space. My idea is to have a piece of code that i can run in many different architectures. So far i have succeded to have freebsd tcp/ip (the complete networking suite) running on Linux user space, windows user space and metaware (i am today running an over-weekend stress test with 1000 http connections on the linux user space and so far so good). Eventually i will do measures of tcp/ip performance for my research so that would be my contribution back to the community that i am hoping. I am actually pleased to work with freebsd code, it is very well written and a lot of fun. I want to go one step further and test the multiprocessor capabilities of the code. So far i have been able to succeed on my own on the port, but in order to speed me up, i was really hoping if i could get some insights fromthe freebsd team. For instance, the ip routing table needs to be locked if several cpus are to share it, which is the case under the smp escenario. I think that if i can get to know where the hardware dependable instruction that takes care of the locks for smp is, then it should be hopefully straightforward for me to go and port that instruction to a linux user space lock instruction of my own. Then i could virtually simulate in user space the smp capabilities using threads sharing the same memory space. So one generic question is: can somebody tell me what do i need in order to do a port of the freebsd smp? If that is too generic... maybe we can start with more especific questions: What compiler flags do i need to set to enable smp? Is there a centralized lock that i can just go and port? Is there a unique lock for smp or are there many locks? if many, where are they defined? Any other parameters that i should be aware of? (I am using freebsd 4.5) I think that should be enough for me to get started. Thanks so much! Jordi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Mon Oct 21 19:59: 9 2002 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 8F56737B401 for ; Mon, 21 Oct 2002 19:59:06 -0700 (PDT) Received: from ignatius.schwartz-pr.com (ignatius.schwartz-pr.com [12.30.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E604243E3B for ; Mon, 21 Oct 2002 19:59:05 -0700 (PDT) (envelope-from jfiorelli@schwartz-pr.com) Received: from dhcp-hst2-81.schwartz-pr.com (dhcp-hst2-81.schwartz-pr.com [12.30.3.81]) by ignatius.schwartz-pr.com (Postfix) with ESMTP id 8015ACBA for ; Mon, 21 Oct 2002 22:58:48 -0400 (EDT) Subject: Re: panic: mpfps Base Table HOSED! From: Jess Fiorelli To: FreeBSD-SMP@FreeBSD.org In-Reply-To: <20021016194156.GA81711@laptop.lambertfam.org> References: <20021016194156.GA81711@laptop.lambertfam.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 21 Oct 2002 22:45:34 -0400 Message-Id: <1035254734.1558.21.camel@dhcp-hst2-81> Mime-Version: 1.0 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello. Just wanted to send a quick note to the list letting people know that I finally got this problem with the intel l440gx motherboard and an SMP kernel solved... I'm not sure exactly what did it, but what I did was disable the scsi bios on the onboard scsi card (AIC-7896) that's not being used, and also disabled "Enable Extended Int13" on both the RAID card and the onboard scsi. Finally... It only took a few months, but it now boots the SMP kernel. I no longer have a 1ghz dead weight sitting in the machine! Jess On Wed, 2002-10-16 at 15:41, Scott Lambert wrote: > I, like at least one other person in the archives, am having panics on > attempting to boot an SMP FreeBSD 4.7-RELEASE kernel on an L440GX based > P3 motherboard whether the BIOS is set for MP 1.4 or 1.1. > > The loader loads the kernel then: > > panic: mpfps Base Table HOSED! > mp_lock = 0000000b; cpuid 0; lapic.id = 00000000 > Uptime 0s > > That is hand copied, I may have missed an "=" after cpuid. > > UP kernel uname -a: > FreeBSD www.firstview.com 4.7-RELEASE FreeBSD 4.7-RELEASE #5: Tue Oct 15 19:03:26 EDT 2002 root@ns4.inch.com:/usr/obj/usr/src/sys/GENERIC i386 > > The other individual from the archives, Jess Fiorelli, seems to have an > Adaptec 2100s RAID card. I have an Adaptec 3200S RAID controller with > recent firmware. > > I inherited the box and have been unable to take it down long enough to > disassemble it to find out the exact model and brand of the motherboard. > I only recently managed to crack the case far enough to see the second > CPU. > > John Baldwin seems to think that the problem with Mr. Fiorelli's box is > that some adaptor is loading it's BIOS over the top of the MP table. > > mptable(1) shows my mptable being FUBAR in a manner similar to > Mr. Fiorelli's. > > I have three devices that seem to load BIOS additions: > > The Adaptec 3200S: > asr0: mem 0xf6000000-0xf7ffffff irq 11 at device 11.1 on pci0 > asr0: major=154 > asr0: ADAPTEC 3200S FW Rev. 370F, 2 channel, 256 CCBs, Protocol I2O > > An Adaptec aic7896/97: > ahc0: port 0x2000-0x20ff mem 0xf4100000-0xf4100fff irq 10 at device 12.0 on pci0 > ahc0: Reading SEEPROM...done. > ahc0: Manual LVD Termination > ahc0: BIOS eeprom is present > ahc0: Secondary High byte termination Enabled > ahc0: Secondary Low byte termination Enabled > ahc0: Primary Low Byte termination Enabled > ahc0: Primary High Byte termination Enabled > ahc0: Downloading Sequencer Program... 416 instructions downloaded > aic7896/97: Ultra2 Wide Channel A, SCSI Id=7, 32/253 SCBs > ahc1: port 0x2400-0x24ff mem 0xf4101000-0xf4101fff irq 10 at device 12.1 on pci0 > ahc1: Reading SEEPROM...done. > ahc1: Manual LVD Termination > ahc1: BIOS eeprom is present > ahc1: Secondary High byte termination Enabled > ahc1: Secondary Low byte termination Enabled > ahc1: Primary Low Byte termination Enabled > ahc1: Primary High Byte termination Enabled > ahc1: Downloading Sequencer Program... 416 instructions downloaded > using shared irq10. > aic7896/97: Ultra2 Wide Channel B, SCSI Id=7, 32/253 SCBs > > An Intel EtherExpress Pro: > fxp0: port 0x2800-0x283f mem 0xf4000000-0xf40fffff,0xf4102000-0xf4102fff irq 5 at device 14.0 on pci0 > fxp0: using memory space register mapping > fxp0: Ethernet address 00:d0:b7:a8:4c:10 > fxp0: PCI IDs: 8086 1229 8086 3000 0008 > fxp0: Dynamic Standby mode is disabled > > The motherboard is running a PheonixBIOS 4.0 revision 6 (I think. The > 3200S BIOS clears the screen too fast.) > > Could it be possible to use the BIOS to mark the MP table address space > as reserved? I can't afford to have this server down for a quick dig > through the BIOS unless there is a chance of success. If it is possible > I'd like to have someone smarter than me give me some idea as to what > that address space should be. > > I think it would be the 16 bytes starting at: > > physical address: 0x000f6ab0 > > or the 89 bytes starting at: > > physical address: 0x0009f560 > > Or are those values already stomped on? > > Full dmesg.boot of boot -v and the mptable output are at : > http://www.lambertfam.org/~lambert/L440GX-SMP/ > > Not that it matters, the SMP kernel config is GENERIC with SCSI_DELAY > 5000 and the smp options un-commented. > > -- > Scott Lambert KC5MLE Unix SysAdmin > lambert@lambertfam.org > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-smp" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message From owner-freebsd-smp Tue Oct 22 19:29:17 2002 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 4723137B401 for ; Tue, 22 Oct 2002 19:29:10 -0700 (PDT) Received: from brodie.zefram.net (dsl092-065-196.bos1.dsl.speakeasy.net [66.92.65.196]) by mx1.FreeBSD.org (Postfix) with SMTP id 259F743E65 for ; Tue, 22 Oct 2002 19:29:09 -0700 (PDT) (envelope-from zefram@zefram.net) Received: (qmail 29973 invoked by uid 1000); 23 Oct 2002 02:28:54 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 23 Oct 2002 02:28:54 -0000 Date: Tue, 22 Oct 2002 22:28:54 -0400 (EDT) From: John Gillis To: FreeBSD-SMP@FreeBSD.org Subject: Compaq Proliant DL580 Message-ID: <20021022221533.A28477-100000@brodie.zefram.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I wrote in a week or two ago about hanging problems with the FreeBSD 4.7 kernel on SMP boot of a dual Xeon 700 2MB cache, but receieved no responses. I decided to try out the new SMPng, and I got excited when mptable didn't report my extended tables hosed... but the boot still failed. After putting some debugging information in both kernels, I found the place where the hang occurs, whether this helps or not. In both kernels, it is in the same place: It fails in the function start_ap, specifically line 2146 of sys/i386/i386/mp_machdep.c A while loop is entered, and apparently the condition never changes from true. Here are the lines up to the problem area, which is designated with a star. ----------------------------- /* do an INIT IPI: assert RESET */ icr_lo = lapic.icr_lo & 0xfff00000; lapic.icr_lo = icr_lo | 0x0000c500; /* wait for pending status end */ * while (lapic.icr_lo & APIC_DELSTAT_MASK) /* spin */ ; ----------------------------- If there's anything I can do to help out diagnose this problem, I want to. I want to make sure this works for the good of FreeBSD and for my own. Right now my partner is trying to convince me to switch to Redhat, on which this platform works 100%. Anything I can do to help or further diagnose, please contact me. I've included my mptables output and also the dmesg from the booting uniprocessor kernel (SMP doesn't get far enough to mount the hard drives). Thanks, John ----------------------------- MPTable's output: =============================================================================== MPTable, version 2.0.15 ------------------------------------------------------------------------------- MP Floating Pointer Structure: location: BIOS physical address: 0x000f4fd0 signature: '_MP_' length: 16 bytes version: 1.4 checksum: 0x00 mode: Virtual Wire ------------------------------------------------------------------------------- MP Config Table Header: physical address: 0x000f2f1e signature: 'PCMP' base table length: 492 version: 1.4 checksum: 0xd0 OEM ID: 'COMPAQ ' Product ID: 'PROLIANT ' OEM table pointer: 0x00000000 OEM table size: 0 entry count: 53 local APIC address: 0xfee00000 extended table length: 172 extended table checksum: 241 ------------------------------------------------------------------------------- MP Config Base Table Entries: -- Processors: APIC ID Version State Family Model Step Flags 0 0x10 BSP, usable 6 2 1 0x0381 2 0x10 AP, usable 6 10 1 0x383fbff -- Bus: Bus ID Type 0 PCI 1 PCI 2 PCI 15 ISA -- I/O APICs: APIC ID Version State Address 8 0x11 usable 0xfec00000 -- I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# INT active-lo level 1 6:A 8 16 INT active-lo level 1 6:B 8 17 INT active-lo level 1 6:C 8 16 INT active-lo level 1 6:D 8 17 INT active-lo level 1 8:A 8 18 INT active-lo level 1 8:B 8 19 INT active-lo level 1 8:C 8 18 INT active-lo level 1 8:D 8 19 INT active-lo level 1 9:A 8 20 INT active-lo level 1 9:B 8 21 INT active-lo level 1 9:C 8 20 INT active-lo level 1 9:D 8 21 INT active-lo level 1 5:A 8 30 INT active-lo level 2 5:A 8 30 INT active-lo level 2 6:A 8 22 INT active-lo level 2 6:B 8 23 INT active-lo level 2 6:C 8 22 INT active-lo level 2 6:D 8 23 INT active-lo level 2 7:A 8 24 INT active-lo level 2 7:B 8 25 INT active-lo level 2 7:C 8 24 INT active-lo level 2 7:D 8 25 INT active-lo level 0 7:A 8 26 INT active-lo level 0 7:B 8 27 INT active-lo level 0 7:C 8 26 INT active-lo level 0 7:D 8 27 INT active-lo level 0 4:A 8 29 INT active-lo level 0 4:B 8 28 INT active-hi edge 15 1 8 1 INT active-hi edge 15 0 8 2 INT active-hi edge 15 3 8 3 INT active-hi edge 15 4 8 4 INT active-hi edge 15 5 8 5 INT active-hi edge 15 6 8 6 INT active-hi edge 15 7 8 7 INT active-hi edge 15 8 8 8 INT active-hi edge 15 9 8 9 INT active-hi edge 15 10 8 10 INT active-hi edge 15 11 8 11 INT active-hi edge 15 12 8 12 INT active-lo level 15 13 8 13 INT active-hi edge 15 14 8 14 INT active-hi edge 15 15 8 15 -- Local Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT conforms conforms 15 0 255 0 NMI conforms conforms 15 0 255 1 -- MPTABLE OUT OF ORDER! I/O Ints: Type Polarity Trigger Bus ID IRQ APIC ID PIN# ExtINT conforms conforms 15 0 8 0 ------------------------------------------------------------------------------- MP Config Extended Table Entries: -- System Address Space bus ID: 0 address type: I/O address address base: 0x0 address range: 0x2810 -- System Address Space bus ID: 0 address type: memory address address base: 0xf3000000 address range: 0x4a00000 -- System Address Space bus ID: 1 address type: I/O address address base: 0x0 address range: 0x0 -- System Address Space bus ID: 1 address type: memory address address base: 0xf7a00000 address range: 0x100000 -- System Address Space bus ID: 2 address type: I/O address address base: 0x3000 address range: 0x1000 -- System Address Space bus ID: 2 address type: memory address address base: 0xf7b00000 address range: 0x500000 -- System Address Space bus ID: 0 address type: memory address address base: 0xa0000 address range: 0x60000 -- Bus Heirarchy bus ID: 15 bus info: 0x01 parent bus ID: 0 -- Compatibility Bus Address bus ID: 0 address modifier: add predefined range: 0x00000000 -- Compatibility Bus Address bus ID: 1 address modifier: subtract predefined range: 0x00000000 -- Compatibility Bus Address bus ID: 2 address modifier: subtract predefined range: 0x00000000 =============================================================================== dmesg uniprocessor output: Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-DP1 #0: Sun Apr 7 02:51:42 GMT 2002 murray@builder.freebsdmall.com:/usr/src/sys/i386/compile/GENERIC Preloaded elf kernel "/boot/GENERIC/kernel" at 0xc053e000. Preloaded elf module "/boot/kernel/acpi.ko" at 0xc053e0ac. Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 701596679 Hz CPU: Pentium III/Pentium III Xeon/Celeron (701.60-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x6a1 Stepping = 1 Features=0x383f9ff real memory = 536854528 (524272K bytes) avail memory = 516558848 (504452K bytes) Pentium Pro MTRR support enabled npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard ACPI-0458: *** Error: GPE0 block overlaps the GPE1 block acpi0: could not enable ACPI: AE_BAD_VALUE device_probe_and_attach: acpi0 attach returned 6 pcib2: at pcibus 2 on motherboard pci2: on pcib2 pci2: at device 5.0 (no driver attached) pcib0: at pcibus 0 on motherboard pci0: on pcib0 pci0: at device 3.0 (no driver attached) ida0: port 0x2000-0x20ff mem 0xf5000000-0xf5ffffff,0xf6000000-0xf6ffffff irq 3 at device 4.0 on pci0 ida0: drives=3 firm_rev=1.42 idad0: on ida0 idad0: 4087MB (8372160 sectors), blocksize=512 idad1: on ida0 idad1: 2040MB (4177920 sectors), blocksize=512 idad2: on ida0 idad2: 996MB (2040000 sectors), blocksize=512 pci0: at device 5.0 (no driver attached) isab0: port 0-0xf at device 15.0 on pci0 isa0: on isab0 atapci0: port 0x2800-0x280f at device 15.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pcib7: at pcibus 7 on motherboard pci7: on pcib7 pci7: at device 5.0 (no driver attached) pcib1: at device 7.0 on pci7 pci1: on pcib1 fxp0: port 0x3000-0x303f mem 0xf7e00000-0xf7efffff,0xf7ff0000-0xf7ff0fff irq 10 at device 4.0 on pci1 fxp0: Ethernet address 00:02:a5:13:15:04 inphy0: on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: port 0x3040-0x307f mem 0xf7c00000-0xf7cfffff,0xf7df0000-0xf7df0fff irq 11 at device 5.0 on pci1 fxp1: Ethernet address 00:02:a5:13:15:05 inphy1: on miibus1 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto eisa0: on motherboard mainboard0: on eisa0 slot 0 orm0: