kern/81259: aac(4) update -- CPU ID for 2410SA controllers, other cosmetic changes

Jeremy Chadwick freebsd at
Thu May 19 12:30:14 GMT 2005

>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
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 19 12:30:10 GMT 2005
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 5.4-STABLE i386
Parodius Networking
System: FreeBSD icarus.home.lan 5.4-STABLE FreeBSD 5.4-STABLE #0: Thu May 19 04:48:24 PDT 2005 root at icarus.home.lan:/usr/obj/usr/src/sys/ICARUS i386
	Please toss this PR over to Scott Long <scottl at>.

	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: <Adaptec SCSI RAID 2410SA> 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.
	Install an Adaptec 2410SA controller and have fun.  :-)
	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), 
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 @@
-	CPUMPC_824x,
+	CPUPPC_603e,
+	CPUI960_302,
 } AAC_CpuSubType;

More information about the freebsd-bugs mailing list