On 11/05/08 16:39 +0200, Cesare Gargano wrote: > Hi all. > I'm playing with acpi to get it working on my T23 thinkpad. > Thermal zone and battery status are working ok. But when I play with hotkey > buttons, open/close lid, unplug AC cable, nothing happens. After reading > acpi.c > I've noted that this line is not correct for me (from [EMAIL PROTECTED]): > > ... > sc->sc_lastgpe = sc->sc_fadt->gpe0_blk_len << 2; > ... > > because I've a GPE on 0x18 and another on 0x1c, but sc_lastgpe value is 0x10. > Reading my acpidump output, I find: > > ... > Device(EC__) { > Name(_HID, 0x090cd041) > Name(_UID, 0x0) > Name(_GPE, 0x1c) > ^^^^ > ... > ... > Scope(\_GPE) { > Method(_L18) { > ^^ > Store(\_SB_.PCI0.LPC_.EC__.HWAK, Local0) > ... > > If I change that line to: > > ... > sc->sc_lastgpe = ((sc->sc_fadt->gpe0_blk_len << 2) * 8) - 1; > ... > > (from acpica-unix version, found on netbsd source code), I don't know what I'm > doing, but it works. I can see these lines in dmesg: > > ... > Adding GPE handler 18 (level) > ... > Adding GPE handler 1c (acpiec) > ... > enabling GPE 18 (current: disabled) 00 > enabling GPE 1c (current: disabled) 00 > ... > > In that way when an acpi interrupt arrives, our right handler is called from > [EMAIL PROTECTED] But it is *not* true. On my T23 the only interrupt I > receive from acpi is from the power button, when I press it for more then 4 > seconds. > > Am I wrong about acpi interrupt mechanism? Should the right gpe handler be > called *after* an acpi interrupt? What is the right value for sc_lastgpe, if > my > DSDT is not wrong? > > If I *experimentally* call on each kthread wakeup my 0x1c gpe handler, EC > works > fine, I can get all hotkey buttons, lid switches, hotplug and video events. > Could we find a solution? > > Thanks to all. > > This is dmesg with *old* sc_lastgpe: > > OpenBSD 4.3-current (GENERIC) #118: Sun May 11 15:16:00 CEST 2008 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC > cpu0: Intel(R) Pentium(R) III Mobile CPU 1133MHz ("GenuineIntel" 686-class) > 1.14 GHz > cpu0: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE > real mem = 1072721920 (1023MB) > avail mem = 1029079040 (981MB) > User Kernel Config > UKC> disable apm > 324 apm0 disabled > UKC> quit > Continuing... > mainbus0 at root > bios0 at mainbus0: AT/286+ BIOS, date 10/18/06, BIOS32 rev. 0 @ 0xfd7e0, > SMBIOS rev. 2.31 @ 0xe0010 (49 entries) > bios0: vendor IBM version "1AET64WW (1.20 )" date 10/18/2006 > bios0: IBM 26474U2 > bios0: IBM ThinkPad Embedded Controller -[1AHT23WW-1.06a ]- > apm at bios0 function 0x15 not configured > acpi0 at bios0: rev 2 > acpi0: tables DSDT FACP SSDT ECDT BOOT > acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) PCI0(S4) PCI1(S4) DOCK(S4) > USB0(S3) USB1(S3) USB2(S3) AC97(S4) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpi device at acpi0 from table DSDT not configured > acpi device at acpi0 from table FACP not configured > acpi device at acpi0 from table SSDT not configured > acpi device at acpi0 from table ECDT not configured > acpi device at acpi0 from table BOOT not configured > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus 1 (AGP_) > acpiprt2 at acpi0: bus 2 (PCI1) > acpiec0 at acpi0 > acpicpu0 at acpi0: C3, C2, FVS, 1133, 733 MHz > acpitz0 at acpi0: critical temperature 96 degC > acpibtn0 at acpi0: LID_ > acpibtn1 at acpi0: SLPB > acpibat0 at acpi0: BAT0 model "IBM-02K7072" serial 434 type LION oem "SANYO" > acpibat1 at acpi0: BAT1 not present > acpiac0 at acpi0: AC unit online > acpithinkpad0 at acpi0 > acpidock at acpi0 not configured > bios0: ROM list: 0xc0000/0xe000 0xce000/0x1000 0xcf000/0x1000 0xdc000/0x4000! > 0xe0000/0x10000 > cpu0 at mainbus0 > pci0 at mainbus0 bus 0: configuration mode 1 (no bios) > pchb0 at pci0 dev 0 function 0 "Intel 82830M Host" rev 0x04 > ppb0 at pci0 dev 1 function 0 "Intel 82830M AGP" rev 0x04 > pci1 at ppb0 bus 1 > vga1 at pci1 dev 0 function 0 "S3 SuperSavage" rev 0x05 > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > wsdisplay0: screen 1-5 added (80x25, vt100 emulation) > agp0 at vga1: no integrated graphics > uhci0 at pci0 dev 29 function 0 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > uhci1 at pci0 dev 29 function 1 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > uhci2 at pci0 dev 29 function 2 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > ppb1 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x42 > pci2 at ppb1 bus 2 > cbb0 at pci2 dev 0 function 0 "TI PCI1420 CardBus" rev 0x00: irq 11 > cbb1 at pci2 dev 0 function 1 "TI PCI1420 CardBus" rev 0x00: irq 11 > "AT&T/Lucent LTMODEM" rev 0x01 at pci2 dev 2 function 0 not configured > fxp0 at pci2 dev 8 function 0 "Intel PRO/100 VE" rev 0x42, i82562: irq 11, > address 00:d0:59:d8:07:09 > inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0 > cardslot0 at cbb0 slot 0 flags 0 > cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0 > pcmcia0 at cardslot0 > cardslot1 at cbb1 slot 1 flags 0 > cardbus1 at cardslot1: bus 6 device 0 cacheline 0x8, lattimer 0xb0 > pcmcia1 at cardslot1 > ichpcib0 at pci0 dev 31 function 0 "Intel 82801CAM LPC" rev 0x02 > pciide0 at pci0 dev 31 function 1 "Intel 82801CAM IDE" rev 0x02: DMA, channel > 0 configured to compatibility, channel 1 configured to compatibility > wd0 at pciide0 channel 0 drive 0: <HITACHI_DK23EA-40> > wd0: 16-sector PIO, LBA, 38154MB, 78140160 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > atapiscsi0 at pciide0 channel 1 drive 0 > scsibus0 at atapiscsi0: 2 targets > cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-ROM SR-8177, NB21> ATAPI 5/cdrom > removable > cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 > ichiic0 at pci0 dev 31 function 3 "Intel 82801CA/CAM SMBus" rev 0x02: irq 11 > iic0 at ichiic0 > auich0 at pci0 dev 31 function 5 "Intel 82801CA/CAM AC97" rev 0x02: irq 11, > ICH3 AC97 > ac97: codec id 0x43525936 (Cirrus Logic CS4299 rev 6) > ac97: codec features headphone, 20 bit DAC, 18 bit ADC, Crystal Semi 3D > audio0 at auich0 > usb0 at uhci0: USB revision 1.0 > uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb1 at uhci1: USB revision 1.0 > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb2 at uhci2: USB revision 1.0 > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > isa0 at ichpcib0 > isadma0 at isa0 > pckbc0 at isa0 port 0x60/5 > pckbd0 at pckbc0 (kbd slot) > pckbc0: using irq 1 for kbd slot > wskbd0 at pckbd0: console keyboard, using wsdisplay0 > pms0 at pckbc0 (aux slot) > pckbc0: using irq 12 for aux slot > wsmouse0 at pms0 mux 0 > pcppi0 at isa0 port 0x61 > midi0 at pcppi0: <PC speaker> > spkr0 at pcppi0 > lpt2 at isa0 port 0x3bc/4: polled > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo > biomask ede5 netmask ede5 ttymask ffe7 > mtrr: Pentium Pro MTRR support > softraid0 at root > root on wd0a swap on wd0b dump on wd0b > > -- > > This is dmesg with *new* sc_lastgpe: > > OpenBSD 4.3-current (GENERIC) #119: Sun May 11 15:59:45 CEST 2008 > [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC > cpu0: Intel(R) Pentium(R) III Mobile CPU 1133MHz ("GenuineIntel" 686-class) > 1.14 GHz > cpu0: > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE > real mem = 1072721920 (1023MB) > avail mem = 1029079040 (981MB) > User Kernel Config > UKC> disable apm > 324 apm0 disabled > UKC> quit > Continuing... > mainbus0 at root > bios0 at mainbus0: AT/286+ BIOS, date 10/18/06, BIOS32 rev. 0 @ 0xfd7e0, > SMBIOS rev. 2.31 @ 0xe0010 (49 entries) > bios0: vendor IBM version "1AET64WW (1.20 )" date 10/18/2006 > bios0: IBM 26474U2 > bios0: IBM ThinkPad Embedded Controller -[1AHT23WW-1.06a ]- > apm at bios0 function 0x15 not configured > acpi0 at bios0: rev 2 > Adding GPE handler 18 (level) > acpi0: tables DSDT FACP SSDT ECDT BOOT > acpi0: wakeup devices LID_(S3) SLPB(S3) UART(S3) PCI0(S4) PCI1(S4) DOCK(S4) > USB0(S3) USB1(S3) USB2(S3) AC97(S4) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpi device at acpi0 from table DSDT not configured > acpi device at acpi0 from table FACP not configured > acpi device at acpi0 from table SSDT not configured > acpi device at acpi0 from table ECDT not configured > acpi device at acpi0 from table BOOT not configured > acpiprt0 at acpi0: bus 0 (PCI0) > acpiprt1 at acpi0: bus 1 (AGP_) > acpiprt2 at acpi0: bus 2 (PCI1) > acpiec0 at acpi0 > Adding GPE handler 1c (acpiec) > acpicpu0 at acpi0: C3, C2, FVS, 1133, 733 MHz > acpitz0 at acpi0: critical temperature 96 degC > acpibtn0 at acpi0: LID_ > acpibtn1 at acpi0: SLPB > acpibat0 at acpi0: BAT0 model "IBM-02K7072" serial 434 type LION oem "SANYO" > acpibat1 at acpi0: BAT1 not present > acpiac0 at acpi0: AC unit online > acpithinkpad0 at acpi0 > acpidock at acpi0 not configured > bios0: ROM list: 0xc0000/0xe000 0xce000/0x1000 0xcf000/0x1000 0xdc000/0x4000! > 0xe0000/0x10000 > cpu0 at mainbus0 > pci0 at mainbus0 bus 0: configuration mode 1 (no bios) > pchb0 at pci0 dev 0 function 0 "Intel 82830M Host" rev 0x04 > ppb0 at pci0 dev 1 function 0 "Intel 82830M AGP" rev 0x04 > pci1 at ppb0 bus 1 > vga1 at pci1 dev 0 function 0 "S3 SuperSavage" rev 0x05 > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) > wsdisplay0: screen 1-5 added (80x25, vt100 emulation) > agp0 at vga1: no integrated graphics > uhci0 at pci0 dev 29 function 0 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > uhci1 at pci0 dev 29 function 1 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > uhci2 at pci0 dev 29 function 2 "Intel 82801CA/CAM USB" rev 0x02: irq 11 > ppb1 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x42 > pci2 at ppb1 bus 2 > cbb0 at pci2 dev 0 function 0 "TI PCI1420 CardBus" rev 0x00: irq 11 > cbb1 at pci2 dev 0 function 1 "TI PCI1420 CardBus" rev 0x00: irq 11 > "AT&T/Lucent LTMODEM" rev 0x01 at pci2 dev 2 function 0 not configured > fxp0 at pci2 dev 8 function 0 "Intel PRO/100 VE" rev 0x42, i82562: irq 11, > address 00:d0:59:d8:07:09 > inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0 > cardslot0 at cbb0 slot 0 flags 0 > cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0 > pcmcia0 at cardslot0 > cardslot1 at cbb1 slot 1 flags 0 > cardbus1 at cardslot1: bus 6 device 0 cacheline 0x8, lattimer 0xb0 > pcmcia1 at cardslot1 > ichpcib0 at pci0 dev 31 function 0 "Intel 82801CAM LPC" rev 0x02 > pciide0 at pci0 dev 31 function 1 "Intel 82801CAM IDE" rev 0x02: DMA, channel > 0 configured to compatibility, channel 1 configured to compatibility > wd0 at pciide0 channel 0 drive 0: <HITACHI_DK23EA-40> > wd0: 16-sector PIO, LBA, 38154MB, 78140160 sectors > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 > atapiscsi0 at pciide0 channel 1 drive 0 > scsibus0 at atapiscsi0: 2 targets > cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-ROM SR-8177, NB21> ATAPI 5/cdrom > removable > cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 > ichiic0 at pci0 dev 31 function 3 "Intel 82801CA/CAM SMBus" rev 0x02: irq 11 > iic0 at ichiic0 > auich0 at pci0 dev 31 function 5 "Intel 82801CA/CAM AC97" rev 0x02: irq 11, > ICH3 AC97 > ac97: codec id 0x43525936 (Cirrus Logic CS4299 rev 6) > ac97: codec features headphone, 20 bit DAC, 18 bit ADC, Crystal Semi 3D > audio0 at auich0 > usb0 at uhci0: USB revision 1.0 > uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb1 at uhci1: USB revision 1.0 > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > usb2 at uhci2: USB revision 1.0 > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1 > isa0 at ichpcib0 > isadma0 at isa0 > pckbc0 at isa0 port 0x60/5 > pckbd0 at pckbc0 (kbd slot) > pckbc0: using irq 1 for kbd slot > wskbd0 at pckbd0: console keyboard, using wsdisplay0 > pms0 at pckbc0 (aux slot) > pckbc0: using irq 12 for aux slot > wsmouse0 at pms0 mux 0 > pcppi0 at isa0 port 0x61 > midi0 at pcppi0: <PC speaker> > spkr0 at pcppi0 > lpt2 at isa0 port 0x3bc/4: polled > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 > pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo > pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo > biomask ede5 netmask ede5 ttymask ffe7 > mtrr: Pentium Pro MTRR support > enabling GPE 18 (current: disabled) 00 > enabling GPE 1c (current: disabled) 00 > softraid0 at root > root on wd0a swap on wd0b dump on wd0b > >
Ehm, I hope my questions are not off-topic... I would like to know if it is a *irq* problem or what else so to solve it. Thanks.