From owner-freebsd-bugs@FreeBSD.ORG Thu May 19 12:30:13 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E720416A4CE for ; Thu, 19 May 2005 12:30:13 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F5CE43DC9 for ; Thu, 19 May 2005 12:30:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4JCUADZ009419 for ; Thu, 19 May 2005 12:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4JCUAVK009417; Thu, 19 May 2005 12:30:10 GMT (envelope-from gnats) Resent-Date: Thu, 19 May 2005 12:30:10 GMT Resent-Message-Id: <200505191230.j4JCUAVK009417@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jeremy Chadwick Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CAFB16A4CE for ; Thu, 19 May 2005 12:20:25 +0000 (GMT) Received: from mx1.parodius.com (mx1.parodius.com [64.62.145.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id B708E43DBC for ; Thu, 19 May 2005 12:20:20 +0000 (GMT) (envelope-from jdc@pentarou.parodius.com) Received: from pentarou.parodius.com (localhost [127.0.0.1]) by mx1.parodius.com (8.13.3/8.13.3) with ESMTP id j4JCKKEU090623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2005 05:20:20 -0700 (PDT) (envelope-from jdc@pentarou.parodius.com) Received: (from jdc@localhost) by pentarou.parodius.com (8.13.3/8.13.3/Submit) id j4JCKKRJ090622; Thu, 19 May 2005 05:20:20 -0700 (PDT) (envelope-from jdc) Message-Id: <200505191220.j4JCKKRJ090622@pentarou.parodius.com> Date: Thu, 19 May 2005 05:20:20 -0700 (PDT) From: Jeremy Chadwick To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/81259: aac(4) update -- CPU ID for 2410SA controllers, other cosmetic changes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jeremy Chadwick List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2005 12:30:14 -0000 >Number: 81259 >Category: kern >Synopsis: aac(4) update -- CPU ID for 2410SA controllers, other cosmetic changes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu May 19 12:30:10 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jeremy Chadwick >Release: FreeBSD 5.4-STABLE i386 >Organization: Parodius Networking >Environment: System: FreeBSD icarus.home.lan 5.4-STABLE FreeBSD 5.4-STABLE #0: Thu May 19 04:48:24 PDT 2005 root@icarus.home.lan:/usr/obj/usr/src/sys/ICARUS i386 >Description: Please toss this PR over to Scott Long . A few changes to aac(4): * Adaptec 2410SA controllers (and likely the 2810SA and 21610SA too) display "Unknown processor" for the on-board CPU. NetBSD and OpenBSD's aac driver code had definitions for this processor (though they conflict as to what it really is). I'm going with OpenBSD on this one, since Theo has quite an interest in Adaptec right now, and I'd be surprised if they got it wrong. The actual IC is an Intel GC80302 controller ("IOP" = I/O Processor). The official Adaptec Linux driver doesn't even mention CPUs or their types, so I can't go off of that... * Print out more verbose memory statistics for the cards. I was surprised to see my controller reporting 64MB in the BIOS, yet FreeBSD claiming 48MB. After looking at the code, I realised a portion of it gets assigned to read/write caching, and a portion gets assigned to "execution" (not sure what that is; Scott, please educate me). I thought it'd make more sense to administrators to show the total memory, and how it's delegated. The above two changes now result in this output: aac0: mem 0xf0000000-0xf3ffffff irq 17 at device 2.0 on pci2 aac0: Intel GC80302 IOP 100MHz, 64MB memory (48MB cache, 16MB execution), optional battery not installed * The on-board CPU type which was previously listed as "MPC824x" is actually a PowerPC 603e. OpenBSD and NetBSD both agree on this. So, to keep the code bases and ID tags identical, I changed this for FreeBSD. Also, something I forgot to toss into the patch: the aac(4) manpage needs to be updated to reflect the fact that "options AAC_DEBUG" should *not* be assigned to such things as 'N'. This option takes a numeric argument (0-2), defining the verbosity of the debug output. Assigning it to 'N' like the manpage suggests results in build errors. >How-To-Repeat: Install an Adaptec 2410SA controller and have fun. :-) >Fix: Apply below patch. Patch tested on 5.4-STABLE, works great. This can probably be backported to the 4.x tree as well, but I'll let Scott deal with that. diff -ruN aac.orig/aac.c aac/aac.c --- aac.orig/aac.c Wed Mar 23 01:24:41 2005 +++ aac/aac.c Thu May 19 04:03:36 2005 @@ -2351,9 +2351,13 @@ } info = (struct aac_adapter_info *)&fib->data[0]; - device_printf(sc->aac_dev, "%s %dMHz, %dMB cache memory, %s\n", + device_printf(sc->aac_dev, + "%s %dMHz, %dMB memory (%dMB cache, %dMB execution), %s\n", aac_describe_code(aac_cpu_variant, info->CpuVariant), - info->ClockSpeed, info->BufferMem / (1024 * 1024), + info->ClockSpeed, + info->TotalMem / (1024 * 1024), + info->BufferMem / (1024 * 1024), + info->ExecutionMem / (1024 * 1024), aac_describe_code(aac_battery_platform, info->batteryPlatform)); diff -ruN aac.orig/aac_tables.h aac/aac_tables.h --- aac.orig/aac_tables.h Mon Dec 3 18:39:06 2001 +++ aac/aac_tables.h Thu May 19 04:43:58 2005 @@ -80,9 +80,10 @@ {"i960HX", CPUI960_HX}, {"i960RX", CPUI960_RX}, {"StrongARM SA110", CPUARM_SA110}, - {"MPC824x", CPUMPC_824x}, + {"PowerPC 603e", CPUPPC_603e}, {"Unknown StrongARM", CPUARM_xxx}, {"Unknown PowerPC", CPUPPC_xxx}, + {"Intel GC80302 IOP", CPUI960_302}, {NULL, 0}, {"Unknown processor", 0} }; diff -ruN aac.orig/aacreg.h aac/aacreg.h --- aac.orig/aacreg.h Tue Jan 25 03:39:00 2005 +++ aac/aacreg.h Thu May 19 04:42:50 2005 @@ -427,8 +427,9 @@ CPUI960_RX, CPUARM_SA110, CPUARM_xxx, - CPUMPC_824x, + CPUPPC_603e, CPUPPC_xxx, + CPUI960_302, CPUSUBTYPE__last } AAC_CpuSubType; >Release-Note: >Audit-Trail: >Unformatted: