Subject: Re: i386 test kernels with new interrupt code available
To: None <fvdl@wasabisystems.com>
From: Hideyuki KURASHINA <rushani@bl.mmtr.or.jp>
List: current-users
Date: 11/15/2002 08:30:36
>>> On Thu, 14 Nov 2002 15:10:41 +0100, Frank van der Linden <fvdl@wasabisystems.com> said:

> Once again, I've updated the code. This update is only interesting
> if you had a machine with an ISA-only MP interrupt table; I fixed
> the handling of such a table once more (hopefully right this time).

I've tried your code again, replacing src/sys/arch/i386 with contents of
both i386intr4.tgz and i386intr5.tgz on the same machine.

Here is the result;

  kernel                              status
  ------------------------------------------
  i386intr4
    a. GENERIC				OK
    b. GENERIC_MPVERBOSE		NG
  i386intr5
    c. GENERIC				OK
    d. GENERIC_MPVERBOSE		OK

The kernel built from GENERIC_MPVERBOSE (i386intr4) stops the same place,
and warns "Timedout SCB handled by another timeout" again and again.
However, the kernel built from GENERIC_MPVERBOSE (i386intr5) works. :-)
See end of this mail for dmesg output of (b) and diff from (b) to (d), please.

Thanks!

***

dmesg output: b
---------------

NetBSD 1.6K (GENERIC.MPVERBOSE) #0: Fri Nov 15 15:27:57 JST 2002
    hideyuki@xxx.yyy.zzz:/my/home/hideyuki/src/sys/arch/i386/compile/GENERIC.MPVERBOSE
total memory = 255 MB
avail memory = 230 MB
using 3297 buffers containing 13188 KB of memory
BIOS32 rev. 0 found at 0xf0530
mainbus0 (root)
mainbus0: scanning 0x9fc00 to 0x9fff0 for MP signature
mainbus0: scanning 0xf0000 to 0xffff0 for MP signature
mainbus0: MP floating pointer found in bios at 0xf6d90
mainbus0: MP config table at 0xf6986, 252 bytes long
mainbus0: Intel MP Specification (Version 1.1) (OEM00000 PROD00000000)
cpu0 at mainbus0: apid 1 (boot processor)
cpu0: Intel Pentium II/Celeron (Deschutes) (686-class), 300.71 MHz
cpu0: features 183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 183fbff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu0: features 183fbff<FXSR>
cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 4-way
cpu0: L2 cache 512 KB 32b/line 4-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: calibrating local timer
cpu0: apic clock running at 66 MHz
cpu0: 32 page colors
cpu0: kstack at 0xd3381000 for 16384 bytes
cpu0: idle pcb at 0xd3381000, idle sp at 0xd3384f98
cpu1 at mainbus0: apid 0 (application processor)
cpu1: starting
cpu1: Intel Pentium II/Celeron (Deschutes) (686-class), 300.68 MHz
cpu1: features 183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features 183fbff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
cpu1: features 183fbff<FXSR>
cpu1: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 4-way
cpu1: L2 cache 512 KB 32b/line 4-way
cpu1: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu1: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu1: kstack at 0xd338d000 for 16384 bytes
cpu1: idle pcb at 0xd338d000, idle sp at 0xd3390f98
mpbios: bus 0 is type PCI   
mpbios: bus 1 is type PCI   
mpbios: bus 2 is type ISA   
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, virtual wire mode, version 11, 24 pins
ioapic0: int0 attached to ExtINT (type 3<type=3=ExtINT> flags 0<pol=0,trig=0>)
ioapic0: int1 attached to isa0 irq 1 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int2 attached to isa0 irq 0 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int3 attached to isa0 irq 3 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int4 attached to isa0 irq 4 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int6 attached to isa0 irq 6 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int7 attached to isa0 irq 7 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int8 attached to isa0 irq 8 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int10 attached to isa0 irq 10 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int11 attached to isa0 irq 11 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int14 attached to isa0 irq 14 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int15 attached to isa0 irq 15 (type 0<type=0> flags 0<pol=0,trig=0>)
ioapic0: int16 attached to isa0 irq 12 (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: int17 attached to isa0 irq 5 (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
ioapic0: int19 attached to isa0 irq 9 (type 0<type=0> flags f<pol=3=Act Lo,trig=3=Level>)
local apic: int0 attached to ExtINT (type 3<type=3=ExtINT> flags 5<pol=1=Act Hi,trig=1=Edge>)
local apic: int1 attached to NMI (type 1<type=1=NMI> flags 5<pol=1=Act Hi,trig=1=Edge>)
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 82443LX PCI AGP Controller (PAC) (rev. 0x03)
agp0 at pchb0: aperture at 0xe6000000, size 0x2000000
ppb0 at pci0 dev 1 function 0: Intel 82443LX AGP Interface (PAC) (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Nvidia Corporation & SGS Thomson Microelectric Riva 128 (rev. 0x10)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
pcib0 at pci0 dev 4 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x01)
pciide0 at pci0 dev 4 function 1: Intel 82371AB IDE controller (PIIX4) (rev. 0x01)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <WDC AC22100H>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 2014 MB, 4092 cyl, 16 head, 63 sec, 512 bytes/sect x 4124736 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2
wd1 at pciide0 channel 0 drive 1: <WDC AC32100H>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 2014 MB, 4092 cyl, 16 head, 63 sec, 512 bytes/sect x 4124736 sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2
allocated pic ioapic0 type edge pin 14 level 6 to cpu1 slot 14 idt entry 96
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
wd1(pciide0:0:1): using PIO mode 4, DMA mode 2 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: disabling secondary channel (no drives)
uhci0 at pci0 dev 4 function 2: Intel 82371AB USB Host Controller (PIIX4) (rev. 0x01)
pci_intr_map: no mapping for pin D (line=ff)
uhci0: couldn't map interrupt
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x01) at pci0 dev 4 function 3 not configured
ahc1 at pci0 dev 6 function 0
allocated pic pic0 type level pin 9 level 6 to cpu1 slot 9 idt entry 41
ahc1: interrupting at irq 9
ahc1: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
scsibus0 at ahc1: 16 targets, 8 luns per target
ne2 at pci0 dev 11 function 0: VIA Technologies VT86C926 Ethernet
ne2: Ethernet address xx:xx:xx:xx:xx:xx
allocated pic pic0 type level pin 5 level 7 to cpu1 slot 5 idt entry 37
ne2: interrupting at irq 5
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
allocated pic ioapic0 type edge pin 4 level 13 to cpu1 slot 4 idt entry 208
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
allocated pic ioapic0 type edge pin 3 level 13 to cpu1 slot 3 idt entry 209
pckbc0 at isa0 port 0x60-0x64
lpt0 at isa0 port 0x378-0x37b irq 7
allocated pic ioapic0 type edge pin 7 level 9 to cpu1 slot 7 idt entry 144
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
allocated pic ioapic0 type edge pin 6 level 6 to cpu1 slot 6 idt entry 97
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: read port 0x203
isapnp0: <OPTi Audio 16, OPTFFFF, , AUX0> not configured
isapnp0: <OPTi Audio 16, OPT9310, , OPTi Audio 16> port 0x534/4,0x380/12,0x220/16,0xe0c/4 irq 10 drq 0,0 not configured
joy0 at isapnp0 port 0x200/1
joy0: OPTi Audio 16 Game Port
joy0: joystick not connected
isapnp0: <OPTi Audio 16, OPT0002, , MPU401> port 0x300/2 irq 10 not configured
cpu1: interrupt masks:
IPL 0 mask 7ffbd07 unmask f80042f8
IPL 1 mask 7ffbd07 unmask f80042f8
IPL 2 mask 7ffbd07 unmask f80042f8
IPL 3 mask 7ffbd07 unmask f80042f8
IPL 4 mask 87ffbd07 unmask 780042f8
IPL 5 mask c7ffbd07 unmask 380042f8
IPL 6 mask c7ffff47 unmask 380000b8
IPL 7 mask c7ffff67 unmask 38000098
IPL 8 mask e7ffff67 unmask 18000098
IPL 9 mask e7ffffe7 unmask 18000018
IPL 10 mask e7ffffe7 unmask 18000018
IPL 11 mask e7ffffe7 unmask 18000018
IPL 12 mask f7ffffe7 unmask 8000018
IPL 13 mask f7ffffff unmask 8000000
IPL 14 mask ffffffff unmask 0
IPL 15 mask ffffffff unmask 0
cpu1 source 3 is pin 3 from pic ioapic0 maxlevel 13
	handler 0xc01f9114 level 13
cpu1 source 4 is pin 4 from pic ioapic0 maxlevel 13
	handler 0xc01f9114 level 13
cpu1 source 5 is pin 5 from pic pic0 maxlevel 7
	handler 0xc01cd02c level 7
cpu1 source 6 is pin 6 from pic ioapic0 maxlevel 6
	handler 0xc044e178 level 6
cpu1 source 7 is pin 7 from pic ioapic0 maxlevel 9
	handler 0xc041a958 level 9
cpu1 source 9 is pin 9 from pic pic0 maxlevel 6
	handler 0xc018500c level 6
cpu1 source 14 is pin 14 from pic ioapic0 maxlevel 6
	handler 0xc03b350c level 6
cpu1 source 27 is pin 0 from pic lapic maxlevel 14
	handler 0x0 level 14
cpu1 source 28 is pin 0 from pic lapic maxlevel 12
	handler 0x0 level 12
cpu1 source 29 is pin 0 from pic softintr_fakepic maxlevel 8
	handler 0x0 level 8
cpu1 source 30 is pin 0 from pic softintr_fakepic maxlevel 5
	handler 0x0 level 5
cpu1 source 31 is pin 0 from pic softintr_fakepic maxlevel 4
	handler 0x0 level 4
cpu0: interrupt masks:
IPL 0 mask 7ffffff unmask f8000000
IPL 1 mask 7ffffff unmask f8000000
IPL 2 mask 7ffffff unmask f8000000
IPL 3 mask 7ffffff unmask f8000000
IPL 4 mask 87ffffff unmask 78000000
IPL 5 mask c7ffffff unmask 38000000
IPL 6 mask c7ffffff unmask 38000000
IPL 7 mask c7ffffff unmask 38000000
IPL 8 mask e7ffffff unmask 18000000
IPL 9 mask e7ffffff unmask 18000000
IPL 10 mask e7ffffff unmask 18000000
IPL 11 mask e7ffffff unmask 18000000
IPL 12 mask f7ffffff unmask 8000000
IPL 13 mask f7ffffff unmask 8000000
IPL 14 mask ffffffff unmask 0
IPL 15 mask ffffffff unmask 0
cpu0 source 27 is pin 0 from pic lapic maxlevel 14
	handler 0x0 level 14
cpu0 source 28 is pin 0 from pic lapic maxlevel 12
	handler 0x0 level 12
cpu0 source 29 is pin 0 from pic softintr_fakepic maxlevel 8
	handler 0x0 level 8
cpu0 source 30 is pin 0 from pic softintr_fakepic maxlevel 5
	handler 0x0 level 5
cpu0 source 31 is pin 0 from pic softintr_fakepic maxlevel 4
	handler 0x0 level 4
cpu0: prelint0 8700<vector=0,delmode=7,level,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 10700<vector=0,delmode=7,masked,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>
ioapic0: enabling
ioapic0: int3 1d1<vector=d1,delmode=1,dest=0> 1000000<target=1>
ioapic0: int4 1d0<vector=d0,delmode=1,dest=0> 1000000<target=1>
ioapic0: int6 161<vector=61,delmode=1,dest=0> 1000000<target=1>
ioapic0: int7 190<vector=90,delmode=1,dest=0> 1000000<target=1>
ioapic0: int14 160<vector=60,delmode=1,dest=0> 1000000<target=1>
scsibus0: waiting 2 seconds for devices to settle...
Timedout SCB handled by another timeout
Timedout SCB handled by another timeout
Timedout SCB handled by another timeout
Timedout SCB handled by another timeout
Timedout SCB handled by another timeout


dmesg output: d (diff from b)
-----------------------------

--- intr4/dmesg.GENERIC_MPVERBOSE-intr4	Fri Nov 15 08:21:26 2002
+++ intr5/dmesg.GENERIC_MPVERBOSE-intr5	Fri Nov 15 08:22:18 2002
@@ -1,5 +1,5 @@
-NetBSD 1.6K (GENERIC.MPVERBOSE) #0: Fri Nov 15 15:27:57 JST 2002
-    hideyuki@xxx.yyy.zzz:/my/home/hideyuki/src/sys/arch/i386/compile/GENERIC.MPVERBOSE
+NetBSD 1.6K (GENERIC.MPVERBOSE) #0: Fri Nov 15 16:09:29 JST 2002
+    hideyuki@xxx.yyy.zzz:/my/home/hideyuki/src/sys/arch/i386.intr5/compile/GENERIC.MPVERBOSE
 total memory = 255 MB
 avail memory = 230 MB
 using 3297 buffers containing 13188 KB of memory
@@ -11,7 +11,7 @@
 mainbus0: MP config table at 0xf6986, 252 bytes long
 mainbus0: Intel MP Specification (Version 1.1) (OEM00000 PROD00000000)
 cpu0 at mainbus0: apid 1 (boot processor)
-cpu0: Intel Pentium II/Celeron (Deschutes) (686-class), 300.71 MHz
+cpu0: Intel Pentium II/Celeron (Deschutes) (686-class), 300.70 MHz
 cpu0: features 183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
 cpu0: features 183fbff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
 cpu0: features 183fbff<FXSR>
@@ -26,7 +26,7 @@
 cpu0: idle pcb at 0xd3381000, idle sp at 0xd3384f98
 cpu1 at mainbus0: apid 0 (application processor)
 cpu1: starting
-cpu1: Intel Pentium II/Celeron (Deschutes) (686-class), 300.68 MHz
+cpu1: Intel Pentium II/Celeron (Deschutes) (686-class), 300.69 MHz
 cpu1: features 183fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
 cpu1: features 183fbff<PGE,MCA,CMOV,FGPAT,PSE36,MMX>
 cpu1: features 183fbff<FXSR>
@@ -95,14 +95,14 @@
 uhci0: couldn't map interrupt
 Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revision 0x01) at pci0 dev 4 function 3 not configured
 ahc1 at pci0 dev 6 function 0
-allocated pic pic0 type level pin 9 level 6 to cpu1 slot 9 idt entry 41
-ahc1: interrupting at irq 9
+allocated pic ioapic0 type level pin 19 level 6 to cpu1 slot 9 idt entry 97
+ahc1: interrupting at apic 2 int 19 (irq 9)
 ahc1: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
 scsibus0 at ahc1: 16 targets, 8 luns per target
 ne2 at pci0 dev 11 function 0: VIA Technologies VT86C926 Ethernet
 ne2: Ethernet address xx:xx:xx:xx:xx:xx
-allocated pic pic0 type level pin 5 level 7 to cpu1 slot 5 idt entry 37
-ne2: interrupting at irq 5
+allocated pic ioapic0 type level pin 17 level 7 to cpu1 slot 5 idt entry 112
+ne2: interrupting at apic 2 int 17 (irq 5)
 isa0 at pcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com0: console
@@ -118,7 +118,7 @@
 isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
 npx0 at isa0 port 0xf0-0xff: using exception 16
 fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
-allocated pic ioapic0 type edge pin 6 level 6 to cpu1 slot 6 idt entry 97
+allocated pic ioapic0 type edge pin 6 level 6 to cpu1 slot 6 idt entry 98
 fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
 isapnp0: read port 0x203
 isapnp0: <OPTi Audio 16, OPTFFFF, , AUX0> not configured
@@ -148,16 +148,16 @@
 	handler 0xc01f9114 level 13
 cpu1 source 4 is pin 4 from pic ioapic0 maxlevel 13
 	handler 0xc01f9114 level 13
-cpu1 source 5 is pin 5 from pic pic0 maxlevel 7
+cpu1 source 5 is pin 17 from pic ioapic0 maxlevel 7
 	handler 0xc01cd02c level 7
 cpu1 source 6 is pin 6 from pic ioapic0 maxlevel 6
-	handler 0xc044e178 level 6
+	handler 0xc044e184 level 6
 cpu1 source 7 is pin 7 from pic ioapic0 maxlevel 9
-	handler 0xc041a958 level 9
-cpu1 source 9 is pin 9 from pic pic0 maxlevel 6
+	handler 0xc041a964 level 9
+cpu1 source 9 is pin 19 from pic ioapic0 maxlevel 6
 	handler 0xc018500c level 6
 cpu1 source 14 is pin 14 from pic ioapic0 maxlevel 6
-	handler 0xc03b350c level 6
+	handler 0xc03b3508 level 6
 cpu1 source 27 is pin 0 from pic lapic maxlevel 14
 	handler 0x0 level 14
 cpu1 source 28 is pin 0 from pic lapic maxlevel 12
@@ -205,12 +205,24 @@
 ioapic0: enabling
 ioapic0: int3 1d1<vector=d1,delmode=1,dest=0> 1000000<target=1>
 ioapic0: int4 1d0<vector=d0,delmode=1,dest=0> 1000000<target=1>
-ioapic0: int6 161<vector=61,delmode=1,dest=0> 1000000<target=1>
+ioapic0: int6 162<vector=62,delmode=1,dest=0> 1000000<target=1>
 ioapic0: int7 190<vector=90,delmode=1,dest=0> 1000000<target=1>
 ioapic0: int14 160<vector=60,delmode=1,dest=0> 1000000<target=1>
+ioapic0: int17 a170<vector=70,delmode=1,actlo,level,dest=0> 1000000<target=1>
+ioapic0: int19 a161<vector=61,delmode=1,actlo,level,dest=0> 1000000<target=1>
 scsibus0: waiting 2 seconds for devices to settle...
-Timedout SCB handled by another timeout
-Timedout SCB handled by another timeout
-Timedout SCB handled by another timeout
-Timedout SCB handled by another timeout
-Timedout SCB handled by another timeout
+boot device: wd0
+root on wd0a dumps on wd0b
+root file system type: ffs
+cpu1: prelint0 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
+cpu1: prelint1 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
+cpu1: timer0 200c0<vector=c0,delmode=0,dest=0> 0<target=0>
+cpu1: pcint0 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
+cpu1: lint0 10700<vector=0,delmode=7,masked,dest=0> 0<target=0>
+cpu1: lint1 400<vector=0,delmode=4,dest=0> 0<target=0>
+cpu1: err0 10000<vector=0,delmode=0,masked,dest=0> 0<target=0>
+cpu1: CPU 0 running
+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)


-- rushani