Subject: MULTIPROCESSOR without ACPI
To: None <port-i386@netbsd.org>
From: Brad du Plessis <bradd@cat.co.za>
List: port-i386
Date: 09/18/2007 10:38:13
Hi all,

I'm trying to get an Intel E2160 processor running on an Intel DG33FB 
motherboard with MULTIPROCESSOR support on 4.0_RC1.

Both cores are detected correctly if I run with ACPI, but I'm seeing the 
alleged ACPI system-controller misconfiguration issue that results in 
thousands of interrupts a second (>200k). So as a result of this I tried 
compiling a kernel without ACPI by setting a configuration as follows:

include "arch/i386/conf/GENERIC.MP"
no fdc0 at isa?
no fd*  at fdc?
no acpi0 at mainbus0

and GENERIC.MP looks like:

include "arch/i386/conf/GENERIC"

options 	MULTIPROCESSOR

options 	APM_NO_IDLE
options 	DIAGNOSTIC	# STRONGLY RECOMMENDED
#options 	LOCKDEBUG
options 	MPDEBUG
options 	MPVERBOSE
#options 	DEBUG
options 	MPBIOS		# configure CPUs and APICs using MPBIOS



but now only 1 core is detected:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.0_RC1 (NOACPI.MP) #7: Tue Sep 18 12:29:40 SAST 2007
	root@net4.cat.co.za:/usr/src/sys/arch/i386/compile/NOACPI.MP
total memory = 236 MB
rbus: rbus_min_start set to 0x40000000
avail memory = 222 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
mainbus0 (root)
mainbus0: scanning 0x9fc00 to 0x9fff0 for MP signature
mainbus0: scanning 0x9f800 to 0x9fbf0 for MP signature
mainbus0: scanning 0xf0000 to 0xffff0 for MP signature
mainbus0: MP floating pointer found in bios at 0xfe200
mainbus0: MP config table at 0xfe210, 64 bytes long
mainbus0: Intel MP Specification (Version 1.4) (                     )
BRAD - mp_cth->entry_count: 1
BRAD - found new CPU (total CPUs: 1)
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel Core 2 (Merom) (686-class), 1800.14 MHz, id 0x6f2
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,SBF>
cpu0: features2 e39d<SSE3,MONITOR,DS-CPL,EST,TM2,xTPR>
cpu0: "Genuine Intel(R) CPU            2160  @ 1.80GHz"
cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu0: using thermal monitor 1
cpu0: calibrating local timer
cpu0: apic clock running at 200 MHz
cpu0: kstack at 0xcab13000 for 12288 bytes
cpu0: idle pcb at 0xcab13000, idle sp at 0xcab15f98
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel product 0x29c0 (rev. 0x02)
vga1 at pci0 dev 2 function 0: Intel product 0x29c2 (rev. 0x02)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
Intel product 0x29c4 (miscellaneous communications, revision 0x02) at pci0 dev 3 function 0 not configured
wm0 at pci0 dev 25 function 0: 82801I (C) LAN Controller, rev. 2
pci_intr_map: bus 0 dev 25 func 0 pin 1; line 9
pci_intr_map: no MP mapping found
wm0: interrupting at irq 9
wm0: PCI-Express bus
wm0: FLASH
wm0: Ethernet address 00:19:d1:f6:cb:0c
igphy0 at wm0 phy 1: i82566 10/100/1000 media interface, rev. 0
igphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ppb0 at pci0 dev 28 function 0: Intel product 0x2940 (rev. 0x02)
pci1 at ppb0 bus 1
pci1: no spaces enabled!
ppb1 at pci0 dev 28 function 1: Intel product 0x2942 (rev. 0x02)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
pciide0 at pci2 dev 0 function 0
pciide0: Marvell product 0x6101 (rev. 0xb1)
pciide0: bus-master DMA support present, but unused (no driver support)
pciide0: primary channel configured to native-PCI mode
pci_intr_map: bus 2 dev 0 func 0 pin 1; line 10
pci_intr_map: no MP mapping found
pciide0: using irq 10 for native-PCI interrupt
atabus0 at pciide0 channel 0
pciide0: secondary channel configured to native-PCI mode
atabus1 at pciide0 channel 1
ppb2 at pci0 dev 28 function 2: Intel product 0x2944 (rev. 0x02)
pci3 at ppb2 bus 3
pci3: no spaces enabled!
ppb3 at pci0 dev 28 function 3: Intel product 0x2946 (rev. 0x02)
pci4 at ppb3 bus 4
pci4: no spaces enabled!
ppb4 at pci0 dev 28 function 4: Intel product 0x2948 (rev. 0x02)
pci5 at ppb4 bus 5
pci5: no spaces enabled!
ppb5 at pci0 dev 30 function 0: Intel 82801BA Hub-PCI Bridge (rev. 0x92)
pci6 at ppb5 bus 6
pci6: i/o space, memory space enabled
Philips SAA7146AH PCI Multimedia bridge (miscellaneous multimedia, revision 0x01) at pci6 dev 0 function 0 not configured
pcib0 at pci0 dev 31 function 0
pcib0: Intel product 0x2912 (rev. 0x02)
pciide1 at pci0 dev 31 function 2
pciide1: Intel product 0x2920 (rev. 0x02)
pciide1: bus-master DMA support present, but unused (no driver support)
pciide1: primary channel configured to compatibility mode
isa_intr_establish: no MP mapping found
pciide1: primary channel interrupting at irq 14
atabus2 at pciide1 channel 0
pciide1: secondary channel configured to compatibility mode
pciide1: secondary channel ignored (not responding; disabled or no drives?)
Intel product 0x2930 (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
pciide2 at pci0 dev 31 function 5
pciide2: Intel product 0x2926 (rev. 0x02)
pciide2: bus-master DMA support present, but unused (no driver support)
pciide2: primary channel wired to native-PCI mode
pci_intr_map: bus 0 dev 31 func 5 pin 1; line 11
pci_intr_map: no MP mapping found
pciide2: using irq 11 for native-PCI interrupt
atabus3 at pciide2 channel 0
pciide2: secondary channel wired to native-PCI mode
atabus4 at pciide2 channel 1
isa0 at pcib0
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
isa_intr_establish: no MP mapping found
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
isa_intr_establish: no MP mapping found
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43: AT Timer
pcppi0 at isa0 port 0x61
pcppi0: children must have an explicit unit
midi0 at pcppi0: PC speaker (CPU-intensive output)
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff
npx0: reported by CPUID; using exception 16
pcppi0: attached to attimer0
isapnp0: no ISA Plug 'n Play devices found
cpu0: prelint0 700<vector=0,delmode=7,dest=0> 0<target=0>
cpu0: prelint1 400<vector=0,delmode=4,dest=0> 0<target=0>
cpu0: timer0 300c0<vector=c0,delmode=0,masked,dest=0> 0<target=0>
cpu0: pcint0 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
cpu0: lint0 700<vector=0,delmode=7,dest=0> 0<target=0>
cpu0: lint1 400<vector=0,delmode=4,dest=0> 0<target=0>
cpu0: err0 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
Kernelized RAIDframe activated
wd0 at atabus2 drive 0: <SAMSUNG HD080HJ>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 76318 MB, 155058 cyl, 16 head, 63 sec, 512 bytes/sect x 156299375 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)


As you can see I put in a couple of printouts in arch/x86/x86/mpbios.c 
in an attempt to figure out how MPBIOS detects the available CPUs. In 
mpbios_scan the value mp_cth->entry_count is 1. I assume this should be 
2 if both cores are correctly detected.

Questions:
 1 - is this a problem with MPBIOS?
 2 - would this problem be specific to this motherboard?
 3 - is there a work-around to force MPBIOS to detect both cores?
 4 - is there a way of configuring the kernel to use ACPI for 
configuring the CPUs and MPBIOS to do the PCI interrupt stuff?

Any help would be appreciated.

Thanks,
 Brad