From owner-freebsd-hardware@FreeBSD.ORG Wed Aug 1 19:31:30 2007 Return-Path: Delivered-To: freebsd-hardware@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E3D16A418 for ; Wed, 1 Aug 2007 19:31:30 +0000 (UTC) (envelope-from andrea.franceschini@postecom.it) Received: from relay-pt2.poste.it (relay-pt2.poste.it [62.241.5.253]) by mx1.freebsd.org (Postfix) with ESMTP id 006AF13C465 for ; Wed, 1 Aug 2007 19:31:29 +0000 (UTC) (envelope-from andrea.franceschini@postecom.it) Received: from knute.cs.poste.it (192.168.44.52) by relay-pt2.poste.it (7.3.122) id 46AFBF480001388E for freebsd-hardware@FreeBSD.ORG; Wed, 1 Aug 2007 21:11:21 +0200 Received: from knute.cs.poste.it (localhost [127.0.0.1]) by knute.cs.poste.it (8.14.1/8.12.10) with ESMTP id l71JBLu3038172 for ; Wed, 1 Aug 2007 21:11:21 +0200 (CEST) (envelope-from andrea.franceschini@postecom.it) Received: (from andrea@localhost) by knute.cs.poste.it (8.14.1/8.12.10/Submit) id l71JBK7T038171 for freebsd-hardware@FreeBSD.ORG; Wed, 1 Aug 2007 21:11:20 +0200 (CEST) (envelope-from andrea.franceschini@postecom.it) X-Authentication-Warning: knute.cs.poste.it: andrea set sender to andrea.franceschini@postecom.it using -f Date: Wed, 1 Aug 2007 21:11:20 +0200 From: Andrea Franceschini To: freebsd-hardware@FreeBSD.ORG Message-ID: <20070801191120.GB81152@postecom.it> Mail-Followup-To: freebsd-hardware@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: Sun GEM Gigabit Ethernet support on x86 FreeBSD X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 19:31:30 -0000 Hi, I'm trying to use an PCI SUN-GEM gigabit ethernet adapter on x86 based server with FreeBSD. It seems that the module if_gem actually exists but it relies on OpenFirmware to read board data (such as mac-address), thus it doesn't work on X86 FreeBSD. To my comprension this is because the x86 platform lacks support for openfirmware. Nonetheless, it seems that the same board is supported on other O.S. like OpenBSD or Linux using specific code that bypass openfirmware reading directly the data from PCI Expansion ROM. Actually, even FreeBSD uses the same trick but it does so for another SUN board (if_hme), so I thought that it was worth the try to add the missing code on if_gem device. After a few(!!) tries I managed to access the PCI Expansion ROM but I found out that it was empty, or at least full of 0xFF... At the beginning I thought that something was wrong with my code but when I finally managed to dump the ROM contents using the tool 'pciroms' I found out that actually the ROM content was '1'-filled. So what I'm wondering what I'm doing wrong. This is the code that should read the Expansion ROM reg: #define PCI_ROM_REG 0x30 #define PCI_ROM_ENABLE 0x00000001 #define PCI_ROM_ADDR_MASK 0xfffff800 #define PCI_ROM_ADDR(mr) \ ((mr) & PCI_ROM_ADDR_MASK) #define PCI_ROM_SIZE(mr) \ (PCI_ROM_ADDR(mr) & -PCI_ROM_ADDR(mr)) rrid=PCI_ROM_REG; address = pci_read_config(dev, PCI_ROM_REG,4); device_printf(dev,"valore dell'address %08x\n",address); pci_write_config(dev, PCI_ROM_REG, 0xfffffffe,4); mask = pci_read_config(dev, PCI_ROM_REG,4); address |= PCI_ROM_ENABLE; pci_write_config(dev, PCI_ROM_REG, address,4); size = PCI_ROM_SIZE(mask); bus_set_resource(dev, SYS_RES_MEMORY, rrid,(u_long )&rrid,size); rres = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rrid, RF_ACTIVE); if ( rres == NULL) { device_printf(dev, "could not map PROM registers\n"); error = ENXIO; goto fail_sres; } romt = rman_get_bustag(rres); romh = rman_get_bushandle(rres); /* Read PCI expansion PROM header. */ bus_space_read_region_1(romt, romh, 0, buf, sizeof(buf)); for (i=0; i<1048576 ; i++ ) { if ( buf[i] != 0xff ) { device_printf(dev,"Memory address %d = %x \n",i,buf[i]); } } Should I look elsewhere for the VPD to be found ? There's some particular init sequence to do in order to have the Expansion ROM loaded with the correct code? Any advice or suggestion is more than welcome :) Thanks From owner-freebsd-hardware@FreeBSD.ORG Thu Aug 2 21:08:19 2007 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A5416A419; Thu, 2 Aug 2007 21:08:19 +0000 (UTC) (envelope-from johan@stromnet.se) Received: from av7-2-sn3.vrr.skanova.net (av7-2-sn3.vrr.skanova.net [81.228.9.182]) by mx1.freebsd.org (Postfix) with ESMTP id 677BF13C458; Thu, 2 Aug 2007 21:08:19 +0000 (UTC) (envelope-from johan@stromnet.se) Received: by av7-2-sn3.vrr.skanova.net (Postfix, from userid 502) id 6F93738032; Thu, 2 Aug 2007 22:40:27 +0200 (CEST) Received: from smtp3-2-sn3.vrr.skanova.net (smtp3-2-sn3.vrr.skanova.net [81.228.9.102]) by av7-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 39C9B37E74; Thu, 2 Aug 2007 22:40:27 +0200 (CEST) Received: from phomca.stromnet.se (90-224-172-102-no129.tbcn.telia.com [90.224.172.102]) by smtp3-2-sn3.vrr.skanova.net (Postfix) with ESMTP id 2DF9737E45; Thu, 2 Aug 2007 22:41:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by phomca.stromnet.se (Postfix) with ESMTP id D0394B820; Thu, 2 Aug 2007 22:41:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at stromnet.se Received: from phomca.stromnet.se ([127.0.0.1]) by localhost (phomca.stromnet.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qo12Rna0tt58; Thu, 2 Aug 2007 22:41:17 +0200 (CEST) Received: from [172.28.1.102] (jstrom-mb.stromnet.se [172.28.1.102]) by phomca.stromnet.se (Postfix) with ESMTP id 01FC0B81A; Thu, 2 Aug 2007 22:41:16 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <7A201B4E-9B61-4074-93B9-42BD23B35AA9@stromnet.se> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Johan_Str=F6m?= Date: Thu, 2 Aug 2007 22:41:13 +0200 To: freebsd-hardware@freebsd.org, freebsd-smp@freebsd.org X-Mailer: Apple Mail (2.752.3) Cc: Subject: Single Core2Duo Quadcore vs. two dualcore Xeon? X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2007 21:08:19 -0000 Hello I'm in the process of purchasing a new server. I'm currently looking =20 at two Supermicro based options, one with a Core 2 Duo Q6600 Quadcore =20= 2.4GHz 2x4MB (on a PDSMi+ board) , and another with two Xeon 5110 =20 dualcore 1.6GHz 4MB (on a X7DVL-i board). Both configurations would have 4GB (2x2Gb) memory (to begin with, 4 =20 slots on the boards so max 8GB), and I'm thinking about 4x 500GB =20 disks in a raid10 config on a 3Ware 9550SX. What my question is, from the performance point of view, what would =20 be best? Two dualcores or a single quadcore? I'm thinking about =20 memory bandwidth and such... Bus bandwitdh (to ethernet and disks)... Looking from the upgrade point of view I guess two dualcores can be =20 replaced with two quadcores, but on the other hand, if that will be =20 necessary then another box is probably a better solution... Is there any known problems with FreeBSD and these stuff? =46rom what =20= I've understood Supermicro is pretty FreeBSD-friendly and should work =20= fine... The box will be used mainly with a jail running MySQL and Apache 2, =20 and a number of other jails which will take fare less power... So =20 mainly mysql & apache. If someone have any clues about which system performs best, or any =20 other input, everything is appreciated! Thanks -- Johan Str=F6m Stromnet johan@stromnet.se http://www.stromnet.se/