Hello, Bwi doesn't work on my latitude d610 laptop. I'm sending a patch file which rolls back some changes that breaked bwi.
The patch rolls back below change http://marc.info/?l=openbsd-cvs&m=136836814510147 diff -ur a/src/sys/arch/i386/i386/apicvec.s b/src/sys/arch/i386/i386/apicvec.s --- a/src/sys/arch/i386/i386/apicvec.s Sun Jul 7 19:20:36 2013 +++ b/src/sys/arch/i386/i386/apicvec.s Sat Nov 15 13:18:01 2014 @@ -279,12 +279,17 @@ testl %ebx,%ebx ;\ jz _C_LABEL(Xstray_##name##num) ;\ APIC_STRAY_INIT /* nobody claimed it yet */ ;\ -7: incl CPUVAR(IDEPTH) ;\ - movl %esp, %eax /* save frame pointer in eax */ ;\ - pushl %ebx /* arg 2: ih structure */ ;\ - pushl %eax /* arg 1: frame pointer */ ;\ - call _C_LABEL(intr_handler) /* call it */ ;\ - addl $8, %esp /* toss args */ ;\ +7: \ + incl CPUVAR(IDEPTH) ;\ + LOCK_KERNEL(IF_PPL(%esp)) ;\ + movl IH_ARG(%ebx),%eax /* get handler arg */ ;\ + testl %eax,%eax ;\ + jnz 6f ;\ + movl %esp,%eax /* 0 means frame pointer */ ;\ +6: \ + pushl %eax ;\ + call *IH_FUN(%ebx) /* call it */ ;\ + addl $4,%esp /* toss the arg */ ;\ APIC_STRAY_INTEGRATE /* maybe he claimed it */ ;\ orl %eax,%eax /* should it be counted? */ ;\ jz 4f ;\ @@ -294,9 +299,11 @@ jne 4f /* if no shared edges ... */ ;\ orl %eax,%eax /* ... 1 means stop trying */ ;\ js 4f ;\ -1: decl CPUVAR(IDEPTH) ;\ +1: UNLOCK_KERNEL(IF_PPL(%esp)) ;\ + decl CPUVAR(IDEPTH) ;\ jmp 8f ;\ -4: decl CPUVAR(IDEPTH) ;\ +4: UNLOCK_KERNEL(IF_PPL(%esp)) ;\ + decl CPUVAR(IDEPTH) ;\ movl IH_NEXT(%ebx),%ebx /* next handler in chain */ ;\ testl %ebx,%ebx ;\ jnz 7b ;\ diff -ur a/src/sys/arch/i386/i386/machdep.c b/src/sys/arch/i386/i386/machdep.c --- a/src/sys/arch/i386/i386/machdep.c Sun Jul 7 19:20:37 2013 +++ b/src/sys/arch/i386/i386/machdep.c Sat Nov 15 13:19:45 2014 @@ -166,7 +166,6 @@ #endif /* NCOM > 0 */ void replacesmap(void); -int intr_handler(struct intrframe *, struct intrhand *); /* the following is used externally (sysctl_hw) */ char machine[] = MACHINE; @@ -3868,6 +3867,20 @@ #ifdef MULTIPROCESSOR void +i386_intlock(int ipl) +{ + if (ipl < IPL_SCHED) + __mp_lock(&kernel_lock); +} + +void +i386_intunlock(int ipl) +{ + if (ipl < IPL_SCHED) + __mp_unlock(&kernel_lock); +} + +void i386_softintlock(void) { __mp_lock(&kernel_lock); @@ -3934,27 +3947,3 @@ splx(ncpl); return (ocpl); } - -int -intr_handler(struct intrframe *frame, struct intrhand *ih) -{ - int rc; -#ifdef MULTIPROCESSOR - int need_lock; - - if (ih->ih_flags & IPL_MPSAFE) - need_lock = 0; - else - need_lock = frame->if_ppl < IPL_SCHED; - - if (need_lock) - __mp_lock(&kernel_lock); -#endif - rc = (*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : frame); -#ifdef MULTIPROCESSOR - if (need_lock) - __mp_unlock(&kernel_lock); -#endif - return rc; -} - diff -ur a/src/sys/arch/i386/i386/vector.s b/src/sys/arch/i386/i386/vector.s --- a/src/sys/arch/i386/i386/vector.s Sun Jul 7 19:20:37 2013 +++ b/src/sys/arch/i386/i386/vector.s Sat Nov 15 13:20:58 2014 @@ -57,6 +57,14 @@ .globl _C_LABEL(isa_strayintr) +#ifdef MULTIPROCESSOR +#define LOCK_KERNEL(ipl) pushl ipl; call _C_LABEL(i386_intlock); addl $4,%esp +#define UNLOCK_KERNEL(ipl) pushl ipl; call _C_LABEL(i386_intunlock); addl $4,%esp +#else +#define LOCK_KERNEL(ipl) +#define UNLOCK_KERNEL(ipl) +#endif + #define voidop(num) /* @@ -114,11 +122,14 @@ jz _C_LABEL(Xstray_##name##num) /* no handlers; we're stray */ ;\ STRAY_INITIALIZE /* nobody claimed it yet */ ;\ incl CPUVAR(IDEPTH) ;\ -7: movl %esp, %eax /* save frame pointer in eax */ ;\ - pushl %ebx /* arg 2: ih structure */ ;\ - pushl %eax /* arg 1: frame pointer */ ;\ - call _C_LABEL(intr_handler) /* call it */ ;\ - addl $8, %esp /* toss args */ ;\ + LOCK_KERNEL(IF_PPL(%esp)) ;\ +7: movl IH_ARG(%ebx),%eax /* get handler arg */ ;\ + testl %eax,%eax ;\ + jnz 4f ;\ + movl %esp,%eax /* 0 means frame pointer */ ;\ +4: pushl %eax ;\ + call *IH_FUN(%ebx) /* call it */ ;\ + addl $4,%esp /* toss the arg */ ;\ STRAY_INTEGRATE /* maybe he claimed it */ ;\ orl %eax,%eax /* should it be counted? */ ;\ jz 5f /* no, skip it */ ;\ @@ -131,7 +142,8 @@ 5: movl IH_NEXT(%ebx),%ebx /* next handler in chain */ ;\ testl %ebx,%ebx ;\ jnz 7b ;\ -8: decl CPUVAR(IDEPTH) ;\ +8: UNLOCK_KERNEL(IF_PPL(%esp)) ;\ + decl CPUVAR(IDEPTH) ;\ STRAY_TEST(name,num) /* see if it's a stray */ ;\ 6: unmask(num) /* unmask it in hardware */ ;\ late_ack(num) ;\ OpenBSD 5.6-current (GENERIC) #4: Mon Dec 1 19:28:49 EET 2014 [email protected]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Pentium(R) M processor 1.73GHz ("GenuineIntel" 686-class) 1.73 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE,NXE,EST,TM2,PERF real mem = 1073045504 (1023MB) avail mem = 1043206144 (994MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 10/02/05, BIOS32 rev. 0 @ 0xffe90, SMBIOS rev. 2.3 @ 0xf7860 (60 entries) bios0: vendor Dell Inc. version "A06" date 10/02/2005 bios0: Dell Inc. Latitude D610 acpi0 at bios0: rev 0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC ASF! MCFG SSDT SSDT SSDT acpi0: wakeup devices LID_(S3) PBTN(S4) PCI0(S5) USB0(S0) USB1(S0) USB2(S0) USB4(S0) USB3(S0) MODM(S3) PCIE(S4) NIC_(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 133MHz ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 1 acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (AGP_) acpiprt2 at acpi0: bus 3 (PCIE) acpicpu0 at acpi0: C3, C3, C2, C1, PSS acpitz0 at acpi0: critical temperature is 101 degC acpiac0 at acpi0: AC unit online acpibat0 at acpi0: BAT0 model "DELL Y13386" serial 2971 type LION oem "Sanyo" acpibat1 at acpi0: BAT1 not present acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: PBTN acpibtn2 at acpi0: SBTN acpidock0 at acpi0: GDCK not docked (0) acpivideo0 at acpi0: VID_ acpivideo1 at acpi0: VID_ acpivideo2 at acpi0: VID2 bios0: ROM list: 0xc0000/0x10000 cpu0: Enhanced SpeedStep 1730 MHz: speeds: 1733, 1333, 1067, 800 MHz pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 "Intel 82915GM Host" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82915GM PCIE" rev 0x03: apic 1 int 16 pci1 at ppb0 bus 1 radeondrm0 at pci1 dev 0 function 0 "ATI Radeon Mobility M300 M22" rev 0x00 drm0 at radeondrm0 radeondrm0: msi ppb1 at pci0 dev 28 function 0 "Intel 82801FB PCIE" rev 0x03: apic 1 int 16 pci2 at ppb1 bus 2 bge0 at pci2 dev 0 function 0 "Broadcom BCM5751" rev 0x01, BCM5750 A1 (0x4001): apic 1 int 16, address 00:15:c5:a9:b4:e5 brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0 uhci0 at pci0 dev 29 function 0 "Intel 82801FB USB" rev 0x03: apic 1 int 16 uhci1 at pci0 dev 29 function 1 "Intel 82801FB USB" rev 0x03: apic 1 int 17 uhci2 at pci0 dev 29 function 2 "Intel 82801FB USB" rev 0x03: apic 1 int 18 uhci3 at pci0 dev 29 function 3 "Intel 82801FB USB" rev 0x03: apic 1 int 19 ehci0 at pci0 dev 29 function 7 "Intel 82801FB USB" rev 0x03: apic 1 int 16 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xd3 pci3 at ppb2 bus 3 cbb0 at pci3 dev 1 function 0 "TI PCI6515 CardBus" rev 0x00: apic 1 int 19 "TI PCI6515 CardBus" rev 0x00 at pci3 dev 1 function 5 not configured bwi0 at pci3 dev 3 function 0 "Broadcom BCM4319" rev 0x02: apic 1 int 17splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 splassert: uvm_map: want 144 have 0 , address 00:14:a5:97:71:08 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 4 device 0 cacheline 0x10, lattimer 0x20 pcmcia0 at cardslot0 auich0 at pci0 dev 30 function 2 "Intel 82801FB AC97" rev 0x03: apic 1 int 16, ICH6 AC97 ac97: codec id 0x83847650 (SigmaTel STAC9750/51) ac97: codec features headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D audio0 at auich0 "Intel 82801FB Modem" rev 0x03 at pci0 dev 30 function 3 not configured ichpcib0 at pci0 dev 31 function 0 "Intel 82801FBM LPC" rev 0x03: PM disabled pciide0 at pci0 dev 31 function 2 "Intel 82801FBM SATA" rev 0x03: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <ST9100823A> wd0: 16-sector PIO, LBA48, 95396MB, 195371568 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 atapiscsi0 at pciide0 channel 1 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <PHILIPS, DVD-ROM SDR089, TD36> ATAPI 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1 isa0 at ichpcib0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 lpt0 at isa0 port 0x378/4 irq 7 npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 wdc2 at pcmcia0 function 0 "SanDisk, SDP, 5/3 0.6" port 0xa000/16 wd1 at wdc2 channel 0 drive 0: <SanDisk SDCFB-256> wd1: 1-sector PIO, LBA, 245MB, 501760 sectors wd1(wdc2:0:0): using BIOS timings umass0 at uhub0 port 5 configuration 1 interface 0 "LaCie LaCie Device" rev 2.00/1.00 addr 2 umass0: using SCSI over Bulk-Only scsibus2 at umass0: 2 targets, initiator 0 sd0 at scsibus2 targ 1 lun 0: <SAMSUNG, HM321HI, > SCSI2 0/direct fixed serial.059f102a259BA00492FF sd0: 305245MB, 512 bytes/sector, 625142448 sectors ugen0 at uhub2 port 1 "Dell Bluetooth" rev 2.00/24.22 addr 2 uaudio0 at uhub3 port 2 configuration 1 interface 0 "Logitech Logitech USB Headset" rev 1.10/10.13 addr 2 uaudio0: audio rev 1.00, 6 mixer controls audio1 at uaudio0 uhidev0 at uhub4 port 1 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/27.20 addr 2 uhidev0: iclass 3/1 ums0 at uhidev0: 8 buttons, Z dir wsmouse1 at ums0 mux 0 vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on wd0a (6ca05ba322b4391f.a) swap on wd0b dump on wd0b drm: initializing kernel modesetting (RV380 0x1002:0x5460 0x1028:0x2006). radeondrm0: VRAM: 128M 0x00000000D0000000 - 0x00000000D7FFFFFF (64M used) radeondrm0: GTT: 512M 0x00000000B0000000 - 0x00000000CFFFFFFF drm: PCIE GART of 512M enabled (table at 0x00000000D0040000). drm: Panel ID String: UD367 drm: Panel Size 1024x768 radeondrm0: 1024x768 wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation)
