Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 1997 00:26:33 -0500 (EST)
From:      Kenneth Merry <ken@housing1.stucen.gatech.edu>
To:        kmitch@weenix.guru.org (Keith Mitchell)
Cc:        smp@freebsd.org
Subject:   Re: Adaptec 3940UW and SMP
Message-ID:  <199701150526.AAA25700@housing1.stucen.gatech.edu>
In-Reply-To: <199701150110.UAA00835@weenix.guru.org> from Keith Mitchell at "Jan 14, 97 08:10:58 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
[hackers taken out of CC so folks don't get upset...:)]

Keith Mitchell wrote...
> I am having a problem getting APIC_IO working on my Tyan Tomcat III
> motherboard with SMP.  I originally posted to the smp mailing list and
> was advised to also post here (by Steve Passe).
> 
> The symptoms are:
> 
> 	with the APIC_IO option enabled, the kernel boots and then stops
>         never passing control over to init to finish the boot.  At this
>         point I can usually Ctrl-Alt-Del and reboot although once or twice
>         it actually locked up the computer.  (see boot messages at the
>         bottom of this message)
> 
> 	Without APIC_IO it seems to work ok.
> 
> Unfortunately, I don't have another SCSI controller to try.
> 
> Any ideas??  Let me know if I forgot to include a necessary piece of info.
> 
> 
> Below are various responses from Steve concerning this matter (summary):
> 
> [---- snip of message from steve quoting boot messages.----]
> > ...
> >Probing for devices on PCI bus 1:
> >ahc0 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 10 on pci1:4
> > ...
> >ahc1 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 9 on pci1:5
> > ...
> >Enabled INTs: 1, 2, 4, 6, 7, 8, 9, 10, 12, 16, 19, imen: 0x00f6e829
> 
> as I predicted, it fails to remap the 3940 properly. However it does
> appear to leave it at INTs 10 & 9, and INTs 10 & 9 appear to be enabled.
> 
> 
> [---- Another message from steve ----]
> Might be a missing INT problem.  If you can borrow another disk controller
> (2940/154x/etc) it would be an interesting experiment.   My suspicion is that
> the 3940 is not working correctly in this setup.
> 
>  Unfortunately I don't have alot of time to pursue this right now, I've
> got a "real job" that is consumming my time...  If anything occurs to me
> I'll get back to you.  You might also post a summary of the problem and 
> my suspicions on hackers@freebsd.org.  I worked with STefan to get the original
> PCI stuff working, he might have insite on the 3940 & PCI.



	Well, I seem to have a similar problem.  I too have a 3940UW, and
when I enabled APIC_IO, the kernel would hang right before it should have
gone to init.

	Here's a synopsis of my h/w configuration:

ASUS P/I-P65UP5 w/ C-P6ND cpu card, 2x200MHz, 256K Pentium Pros
128MB ram
Adaptec 3940UW
Quantum Atlas II (Ultra, Wide)
Plextor cdrom
SMC Etherpower 10/100

	Here's boot -v, *without* APIC_IO enabled, don't have a serial
console setup:


=============================================================================
pcibus_setup(1):        mode 1 addr port (0x0cf8) is 0x8000005c
pcibus_setup(1a):       mode1res=0x80000000 (0x80000000)
pcibus_check:   device 0 is there (id=12378086)
Probing for devices on PCI bus 0:
	configuration mode 1 allows 32 devices.
chip0 <Intel 82440FX (Natoma) PCI and memory controller> rev 2 on pci0:0
chip1 <Intel 82371SB PCI-ISA bridge> rev 1 on pci0:1:0
chip2 <Intel 82371SB IDE interface> rev 0 on pci0:1:1
	mapreg[20] type=1 addr=0000e800 size=0010.
de0 <Digital 21140 Fast Ethernet> rev 18 int a irq 10 on pci0:10
	mapreg[10] type=1 addr=0000e000 size=0080.
	mapreg[14] type=0 addr=fa000000 size=0080.
	reg16: ioaddr=0xe000 size=0x80
de0: SMC 9332 21140 [10-100Mb/s] pass 1.2
de0: address 00:00:c0:53:3d:e7
de0: enabling 10baseT port
bpf: de0 attached
chip3 <DEC 21050 PCI-PCI bridge> rev 2 on pci0:11
	bridge from pci0 to pci1 through 1.
	mapping regs: io:2280d0d0 mem:f9f0f900 pmem:fbf0fbf0
vga0 <VGA-compatible display device> rev 1 int a irq 9 on pci0:13
	mapreg[10] type=0 addr=f8800000 size=4000.
	mapreg[14] type=0 addr=fb000000 size=800000.
pci0: uses 8405120 bytes of memory from f8800000 upto fbffffff.
pci0: uses 144 bytes of I/O space from d000 upto e80f.
pci0: subordinate busses from 1 upto 1.
Probing for devices on PCI bus 1:
ahc0 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 11 on pci1:4
	mapreg[10] type=1 addr=0000d800 size=0100.
	[pci1 uses memory from f9000000 to f9ffffff]
	mapreg[14] type=0 addr=f9800000 size=1000.
	reg16: ioaddr=0xd800 size=0x100
ahc0: Reading SEEPROM...done.
ahc0: aic7880 Wide Channel A, SCSI Id=7, 16 SCBs
ahc0: Reseting Channel A
ahc0: Downloading Sequencer Program...Done
ahc0: Probing channel A
ahc0 waiting for scsi devices to settle
ahc0: target 0 using 16Bit transfers
ahc0: target 0 synchronous at 10.0MHz, offset = 0x8
(ahc0:0:0): "QUANTUM XP34550W LXQ1" type 0 fixed SCSI 2
sd0(ahc0:0:0): Direct-Access 4341MB (8890760 512 byte sectors)
sd0(ahc0:0:0): with 5899 cyls, 10 heads, and an average 150 sectors/track
ahc1 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 10 on pci1:5
	mapreg[10] type=1 addr=0000d400 size=0100.
	[pci1 uses memory from f9000000 to f9ffffff]
	mapreg[14] type=0 addr=f9000000 size=1000.
	reg16: ioaddr=0xd400 size=0x100
	using shared irq 10.
ahc1: Reading SEEPROM...done.
ahc1: aic7880 Wide Channel B, SCSI Id=7, 16 SCBs
ahc1: Reseting Channel A
ahc1: Downloading Sequencer Program...Done
ahc1: Probing channel A
ahc1 waiting for scsi devices to settle
ahc1: target 4 synchronous at 10.0MHz, offset = 0xf
(ahc1:4:0): "PLEXTOR CD-ROM PX-12CS 1.00" type 5 removable SCSI 2
cd0(ahc1:4:0): CD-ROM can't get the size
pci1: uses 8192 bytes of memory from f9000000 upto f9800fff.
pci1: uses 512 bytes of I/O space from d400 upto d8ff.
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2: disabled, not probed.
sio3: disabled, not probed.
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
bpf: lp0 attached
lpt1: disabled, not probed.
psm0: current command byte:0047
psm0: status after reset 00 02 64
psm: status b1 03 c8 (get_mouse_buttons)
psm0: status 00 02 64
psm0 at 0x60-0x64 irq 12 on motherboard
psm0: device ID 0, 3 buttons?
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: NEC 72065B
fd0: 1.44MB 3.5in
npx0 on motherboard
npx0: INT 16 interface
apm0: disabled, not probed.
imasks: bio c0000c40, tty c003149a, net c003149a
BIOS Geometries:
 0:0228fe3f 0..552=553 cylinders, 0..254=255 heads, 1..63=63 sectors
 0 accounted for
Device configuration finished.
Considering FFS root f/s.
configure() finished.
DEVFS: ready to run
bpf: tun0 attached
bpf: tun1 attached
bpf: tun2 attached
bpf: sl0 attached
bpf: lo0 attached
IP packet filtering initialized, divert enabled, logging limited to 100 packets/entry
sd0s1: type 0x7, start 63, end = 2040254, size 2040192 : OK
sd0s2: type 0xa5, start 2040255, end = 8883944, size 6843690 : OK
SMP: All idle procs online.
SMP: Starting 1st AP!
SMP: AP CPU #1 LAUNCHED!!  Starting Scheduling...
SMP: TADA! CPU #1 made it into the scheduler!.
SMP: All 2 CPU's are online!

=============================================================================

	Here is the output of mptable -verbose -dmesg: (this was done with
a stock -current kernel)


===============================================================================

MPTable, version 2.0.5

 looking for EBDA pointer @ 0x040e, found, searching EBDA @ 0x0009fc00
 searching CMOS 'top of mem' @ 0x0009f800 (638K)
 searching default 'top of mem' @ 0x0009fc00 (639K)
 searching BIOS @ 0x000f0000

 MP FPS found in BIOS @ physical addr: 0x000f60b0

-------------------------------------------------------------------------------

MP Floating Pointer Structure:

  location:			BIOS
  physical address:		0x000f60b0
  signature:			'_MP_'
  length:			16 bytes
  version:			1.1
  checksum:			0x8e
  mode:				Virtual Wire

-------------------------------------------------------------------------------

MP Config Table Header:

  physical address:		0x000f5caa
  signature:			'PCMP'
  base table length:		252
  version:			1.1
  checksum:			0xd6
  OEM ID:			'OEM00000'
  Product ID:			'PROD00000000'
  OEM table pointer:		0x00000000
  OEM table size:		0
  entry count:			23
  local APIC address:		0xfee00000
  extended table length:	0
  extended table checksum:	0

-------------------------------------------------------------------------------

MP Config Base Table Entries:

--
Processors:	APIC ID	Version	State		Family	Model	Step	Flags
		 1	 0x11	 BSP, usable	 6	 1	 7	 0xfbff
		 0	 0x11	 AP, usable	 6	 1	 7	 0xfbff
--
Bus:		Bus ID	Type
		 0	 PCI   
		 1	 PCI   
		 2	 ISA   
--
I/O APICs:	APIC ID	Version	State		Address
		 2	 0x11	 usable		 0xfec00000
--
I/O Ints:	Type	Polarity    Trigger	Bus ID	 IRQ	APIC ID	INT#
		ExtINT	 conforms    conforms	     2	   0	      2	   0
		INT	 conforms    conforms	     2	   1	      2	   1
		INT	 conforms    conforms	     2	   0	      2	   2
		INT	 conforms    conforms	     2	   3	      2	   3
		INT	 conforms    conforms	     2	   4	      2	   4
		INT	 conforms    conforms	     2	   5	      2	   5
		INT	 conforms    conforms	     2	   6	      2	   6
		INT	 conforms    conforms	     2	   7	      2	   7
		INT	 conforms    conforms	     2	   8	      2	   8
		INT	 conforms    conforms	     2	  12	      2	  12
		INT	 conforms    conforms	     2	  14	      2	  14
		INT	 conforms    conforms	     2	  15	      2	  15
		INT	active-lo       level	     2	  11	      2	  17
		INT	active-lo       level	     2	  10	      2	  18
		INT	active-lo       level	     2	   9	      2	  19
--
Local Ints:	Type	Polarity    Trigger	Bus ID	 IRQ	APIC ID	INT#
		ExtINT	active-hi        edge	     2	   0	    255	   0
		NMI	active-hi        edge	     2	   0	    255	   1

-------------------------------------------------------------------------------

# SMP kernel config file options:

options		SMP			# Symmetric MultiProcessor Kernel
options		APIC_IO			# Symmetric (APIC) I/O
options		NCPU=2			# number of CPUs
options		NBUS=3			# number of busses
options		NAPIC=1			# number of IO APICs
options		NINTR=15		# number of INTs
options		SMP_INVLTLB		# 
#options		SMP_PRIVPAGES		# BROKEN, DO NOT use!
#options		SMP_AUTOSTART		# BROKEN, DO NOT use!
#options		SERIAL_DEBUG		# com port debug output

-------------------------------------------------------------------------------

dmesg output:

Copyright (c) 1992-1996 FreeBSD Inc.
Copyright (c) 1982, 1986, 1989, 1991, 1993
	The Regents of the University of California.  All rights reserved.

FreeBSD 3.0-CURRENT #0: Sun Jan 12 01:52:10 EST 1997
    ken@panzer.res.gatech.edu:/usr/src/sys/compile/panzer
Calibrating clock(s) relative to mc146818A clock ... i586 clock: 199428199 Hz, i8254 clock: 1193161 Hz
CPU: Pentium Pro (199.43-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x617  Stepping=7
  Features=0xfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,<b11>,MTRR,PGE,MCA,CMOV>
real memory  = 134217728 (131072K bytes)
avail memory = 129413120 (126380K bytes)
DEVFS: ready for devices
Probing for devices on PCI bus 0:
chip0 <Intel 82440FX (Natoma) PCI and memory controller> rev 2 on pci0:0
chip1 <Intel 82371SB PCI-ISA bridge> rev 1 on pci0:1:0
chip2 <Intel 82371SB IDE interface> rev 0 on pci0:1:1
de0 <Digital 21140 Fast Ethernet> rev 18 int a irq 10 on pci0:10
de0: SMC 9332 21140 [10-100Mb/s] pass 1.2
de0: address 00:00:c0:53:3d:e7
de0: enabling 10baseT port
chip3 <DEC 21050 PCI-PCI bridge> rev 2 on pci0:11
vga0 <VGA-compatible display device> rev 1 int a irq 9 on pci0:13
Probing for devices on PCI bus 1:
ahc0 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 11 on pci1:4
ahc0: aic7880 Wide Channel A, SCSI Id=7, 16 SCBs
ahc0 waiting for scsi devices to settle
(ahc0:0:0): "QUANTUM XP34550W LXQ1" type 0 fixed SCSI 2
sd0(ahc0:0:0): Direct-Access 4341MB (8890760 512 byte sectors)
ahc1 <Adaptec 3940 Ultra SCSI host adapter> rev 0 int a irq 10 on pci1:5
ahc1: aic7880 Wide Channel B, SCSI Id=7, 16 SCBs
ahc1 waiting for scsi devices to settle
(ahc1:4:0): "PLEXTOR CD-ROM PX-12CS 1.00" type 5 removable SCSI 2
cd0(ahc1:4:0): CD-ROM can't get the size
Probing for devices on the ISA bus:
sc0 at 0x60-0x6f irq 1 on motherboard
sc0: VGA color <16 virtual consoles, flags=0x0>
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16550A
sio1 at 0x2f8-0x2ff irq 3 on isa
sio1: type 16550A
sio2: disabled, not probed.
sio3: disabled, not probed.
lpt0 at 0x378-0x37f irq 7 on isa
lpt0: Interrupt-driven port
lp0: TCP/IP capable interface
lpt1: disabled, not probed.
psm0 at 0x60-0x64 irq 12 on motherboard
psm0: device ID 0, 2 buttons?
fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
fdc0: NEC 72065B
fd0: 1.44MB 3.5in
npx0 on motherboard
npx0: INT 16 interface
apm0: disabled, not probed.
DEVFS: ready to run
IP packet filtering initialized, divert enabled, logging limited to 100 packets/entry
WARNING: / was not properly dismounted.
pid 7463 (conftest), uid 0: exited on signal 11 (core dumped)
de0: promiscuous mode enabled
de0: promiscuous mode enabled
de0: promiscuous mode enabled

===============================================================================

	And here is my kernel config file.  (hope this isn't too much
information:


===============================================================================
#
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#
# For more information read the handbook part System Administration -> 
# Configuring the FreeBSD Kernel -> The Configuration File. 
# The handbook is available in /usr/share/doc/handbook or online as
# latest version from the FreeBSD World Wide Web server 
# <URL:http://www.FreeBSD.ORG/>;
#
# An exhaustive list of options and more detailed explanations of the 
# device lines is present in the ./LINT configuration file. If you are 
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
#	$Id: GENERIC,v 1.77.2.1 1996/12/21 02:10:50 se Exp $

machine		"i386"
# cpu		"I386_CPU"
# cpu		"I486_CPU"
cpu		"I586_CPU"
cpu		"I686_CPU"
ident		panzer
maxusers	128

options		MATH_EMULATE		#Support for x87 emulation
options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		NFS			#Network Filesystem
options		MSDOSFS			#MSDOS Filesystem
options		"CD9660"		#ISO 9660 Filesystem
options		PROCFS			#Process filesystem
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		SCSI_DELAY=15		#Be pessimistic about Joe SCSI device
options		UCONSOLE		#Allow users to grab the console
options		USERCONFIG		#boot -c editor
options		VISUAL_USERCONFIG	#visual boot -c editor
options		CHILD_MAX=128
options		OPEN_MAX=128
options		SYSVSHM
options		SYSVSEM
options		SYSVMSG
options		KTRACE
options		MROUTING
options		IPFIREWALL
options		IPFIREWALL_VERBOSE
options		"IPFIREWALL_VERBOSE_LIMIT=100"
options		IPDIVERT
options		DEVFS
options		"MAXMEM=(128*1024)"
options		MAXCONS=16
# options		AHC_TAGENABLE
# options		AHC_SCBPAGING_ENABLE
# options		AHC_ALLOW_MEMIO
options		SMP                     # Symmetric MultiProcessor Kernel
#options		APIC_IO                 # Symmetric (APIC) I/O
options		NCPU=2                  # number of CPUs
options		NBUS=3                  # number of busses
options		NAPIC=1                 # number of IO APICs
options		NINTR=15                # number of INTs
#options		SMP_INVLTLB             # 
#options                SMP_PRIVPAGES           # BROKEN, DO NOT use!
#options                SMP_AUTOSTART           # BROKEN, DO NOT use!
#options                SERIAL_DEBUG            # com port debug output


config		kernel	root on sd0

controller	isa0
# controller	eisa0
controller	pci0

controller	fdc0	at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk		fd0	at fdc0 drive 0
disk		fd1	at fdc0 drive 1
# tape		ft0	at fdc0 drive 2

# controller	wdc0	at isa? port "IO_WD1" bio irq 14 vector wdintr
# disk		wd0	at wdc0 drive 0
# disk		wd1	at wdc0 drive 1

# controller	wdc1	at isa? port "IO_WD2" bio irq 15 vector wdintr
# disk		wd2	at wdc1 drive 0
# disk		wd3	at wdc1 drive 1

# options		ATAPI		#Enable ATAPI support for IDE bus
# options		ATAPI_STATIC	#Don't do it as an LKM
# device		wcd0	#IDE CD-ROM

# A single entry for any of these controllers (ncr, ahb, ahc, amd) is
# sufficient for any number of installed devices.
# controller	ncr0
# controller	amd0
# controller	ahb0
controller	ahc0
options		"AHC_FORCE_PIO"		# Some motherboards choke on MemI/O,
					# so use PIO in the ahc driver in the
					# generic kernel.


controller	scbus0

device		sd0

device		od0	#See LINT for possible `od' options.

device		st0

device		cd0	#Only need one of these, the code dynamically grows


# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? port "IO_KBD" tty irq 1 vector scintr
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device		vt0	at isa? port "IO_KBD" tty irq 1 vector pcrint
#options		PCVT_FREEBSD=210	# pcvt running on FreeBSD >= 2.0.5
#options		XSERVER			# include code for XFree86
#options		FAT_CURSOR		# start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options		PCVT_SCANSET=2		# IBM keyboards are non-std

# Mandatory, don't remove
device		npx0	at isa? port "IO_NPX" irq 13 vector npxintr

#
# Laptop support (see LINT for more options)
#
device		apm0    at isa?	disable	# Advanced Power Management
options		APM_BROKEN_STATCLOCK	# Workaround some buggy APM BIOS
# PCCARD (PCMCIA) support
#controller	crd0
#device		pcic0	at crd?
#device		pcic1	at crd?

device		sio0	at isa? port "IO_COM1" tty irq 4 vector siointr
device		sio1	at isa? port "IO_COM2" tty irq 3 vector siointr
device		sio2	at isa? disable port "IO_COM3" tty irq 5 vector siointr
device		sio3	at isa? disable port "IO_COM4" tty irq 9 vector siointr

device		lpt0	at isa? port? tty irq 7 vector lptintr
device		lpt1	at isa? port? tty
# device		mse0	at isa? port 0x23c tty irq 5 vector mseintr

device		psm0	at isa? disable port "IO_KBD" conflicts tty irq 12 vector psmintr

# Order is important here due to intrusive probes, do *not* alphabetize
# this list of network interfaces until the probes have been fixed.
# Right now it appears that the ie0 must be probed before ep0. See
# revision 1.20 of this file.
device de0
# device fxp0
# device vx0

# device ed0 at isa? port 0x280 net irq  5 iomem 0xd8000 vector edintr

pseudo-device	loop
pseudo-device	ether
pseudo-device	log
pseudo-device	sl	1
# ijppp uses tun instead of ppp device
#pseudo-device	ppp	1
pseudo-device	tun	3
pseudo-device	pty	128
pseudo-device	gzip		# Exec gzipped a.out's
pseudo-device	bpfilter	4
pseudo-device	snp	3
===============================================================================

	And, here's a little kernel-compile benchmark test I did.  (similar
to what Chuck did)  

Dual Pentium Pro 200, 256K L2, 128MB RAM, 2 processors online:

                                                real/normalized
make -j 1, 225.28 real   121.61 user   74.13 sys   1.000
make -j 2, 165.95 real   148.20 user   56.54 sys   1.357
make -j 3, 133.38 real   158.23 user   49.06 sys   1.689
make -j 4, 124.53 real   164.24 user   43.89 sys   1.809
make -j 5, 122.22 real   164.03 user   45.48 sys   1.843
make -j 6, 116.35 real   162.52 user   47.50 sys   1.936
make -j 7, 115.74 real   167.47 user   42.89 sys   1.946
make -j 8, 117.03 real   165.15 user   45.87 sys   1.925

	I used the above config file, and did the following for each test:

make depend && /usr/bin/time make -j n

	It doesn't look like I'm getting as much of a performance boost as
Chuck did with two processors, (at -j 7, he was getting 2.3 times
performance) could it be due to APIC_IO not being enabled?

	Anyway, thanks for any insight.  Overall, though, thinks look good.
I notice a difference when the 2nd cpu is active.  :)

Thanks,

Ken
--
Kenneth Merry
ken@ulc199.residence.gatech.edu
Disclaimer:  I don't speak for GTRI, GT, or Elvis.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701150526.AAA25700>