notes: Compaq CQ43 suspend works ok if you run it with zzz. Only the first time the lid is closed suspend works, further attempts to do it only get the screen shut down.
OpenBSD 5.4-current (GENERIC.MP) #4: Tue Jul 30 00:06:26 CST 2013 root@puffybook:/usr/src/sys/arch/amd64/compile/GENERIC.MP RTC BIOS diagnostic error 80<clock_battery> real mem = 3060002816 (2918MB) avail mem = 2970882048 (2833MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe70f0 (33 entries) bios0: vendor Hewlett-Packard version "F.37" date 12/16/2011 bios0: Hewlett-Packard Presario CQ43 Notebook PC acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP ASF! HPET APIC MCFG SLIC BOOT ASPT WDAT SSDT acpi0: wakeup devices P0P2(S4) PEGP(S4) P0P1(S4) EHC1(S3) EHC2(S3) HDEF(S0) PXSX(S4) RP01(S5) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz, 2527.37 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 cpu0: apic clock running at 132MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz, 2526.99 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz, 2526.98 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 5 (application processor) cpu3: Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz, 2526.99 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,NXE,LONG,LAHF,PERF,ITSC cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 2, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 2 acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (P0P2) acpiprt2 at acpi0: bus 4 (P0P1) acpiprt3 at acpi0: bus 1 (RP01) acpiprt4 at acpi0: bus -1 (RP02) acpiprt5 at acpi0: bus 2 (RP03) acpiprt6 at acpi0: bus -1 (RP04) acpiprt7 at acpi0: bus 3 (RP05) acpiprt8 at acpi0: bus -1 (RP07) acpiprt9 at acpi0: bus -1 (RP08) acpiprt10 at acpi0: bus -1 (PEG3) acpiprt11 at acpi0: bus -1 (PEG5) acpiec0 at acpi0 acpicpu0 at acpi0: C3, C1, PSS acpicpu1 at acpi0: C3, C1, PSS acpicpu2 at acpi0: C3, C1, PSS acpicpu3 at acpi0: C3, C1, PSS acpitz0 at acpi0: critical temperature is 90 degC acpitz1 at acpi0: critical temperature is 85 degC acpibat0 at acpi0: BAT0 type LiOn oem "HP" acpiac0 at acpi0: AC unit offline acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: PWRB acpivideo0 at acpi0: GFX0 acpivout0 at acpivideo0: DD02 acpivideo1 at acpi0: VGA_ cpu0: Enhanced SpeedStep 2527 MHz: speeds: 2533, 2399, 2266, 2133, 1999, 1866, 1733, 1599, 1466, 1333, 1199, 1066, 933 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core Host" rev 0x02 vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x02 intagp0 at vga1 agp0 at intagp0: aperture at 0xc0000000, size 0x10000000 inteldrm0 at vga1 drm0 at inteldrm0 inteldrm0: 1366x768 wsdisplay0 at vga1 mux 1: console (std, vt100 emulation) wsdisplay0: screen 1-5 added (std, vt100 emulation) "Intel 3400 MEI" rev 0x06 at pci0 dev 22 function 0 not configured ehci0 at pci0 dev 26 function 0 "Intel 3400 USB" rev 0x05: apic 2 int 16 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27 function 0 "Intel 3400 HD Audio" rev 0x05: msi azalia0: codecs: Realtek/0x0270 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 "Intel 3400 PCIE" rev 0x05: msi pci1 at ppb0 bus 1 re0 at pci1 dev 0 function 0 "Realtek 8101E" rev 0x05: RTL8105E (0x4080), apic 2 int 16, address 00:9c:02:17:12:f4 rlphy0 at re0 phy 7: RTL8201E 10/100 PHY, rev. 2 ppb1 at pci0 dev 28 function 2 "Intel 3400 PCIE" rev 0x05: msi pci2 at ppb1 bus 2 ral0 at pci2 dev 0 function 0 "Ralink RT3090" rev 0x00: apic 2 int 18, address 70:f3:95:e2:42:b9 ral0: MAC/BBP RT3090 (rev 0x3213), RF RT3020 (MIMO 1T1R) ppb2 at pci0 dev 28 function 4 "Intel 3400 PCIE" rev 0x05: msi pci3 at ppb2 bus 3 rtsx0 at pci3 dev 0 function 0 "Realtek RTS5209 Card Reader" rev 0x01: msi sdmmc0 at rtsx0 ehci1 at pci0 dev 29 function 0 "Intel 3400 USB" rev 0x05: apic 2 int 23 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1 ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xa5 pci4 at ppb3 bus 4 pcib0 at pci0 dev 31 function 0 "Intel HM55 LPC" rev 0x05 ahci0 at pci0 dev 31 function 2 "Intel 3400 AHCI" rev 0x05: msi, AHCI 1.3 scsibus0 at ahci0: 32 targets sd0 at scsibus0 targ 0 lun 0: <ATA, TOSHIBA MK1252GS, LV01> SCSI3 0/direct fixed naa.500003910220156e sd0: 114473MB, 512 bytes/sector, 234441648 sectors cd0 at scsibus0 targ 1 lun 0: <hp, DVDRAM GT50N, MP00> ATAPI 5/cdrom removable ichiic0 at pci0 dev 31 function 3 "Intel 3400 SMBus" rev 0x05: apic 2 int 19 iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 1GB DDR3 SDRAM PC3-10600 SO-DIMM spdmem1 at iic0 addr 0x52: 2GB DDR3 SDRAM PC3-10600 SO-DIMM isa0 at pcib0 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 pms0: Synaptics touchpad, firmware 7.5 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 pci5 at mainbus0 bus 255 pchb1 at pci5 dev 0 function 0 "Intel QuickPath" rev 0x02 pchb2 at pci5 dev 0 function 1 "Intel QuickPath" rev 0x02 pchb3 at pci5 dev 2 function 0 "Intel QPI Link" rev 0x02 pchb4 at pci5 dev 2 function 1 "Intel QPI Physical" rev 0x02 pchb5 at pci5 dev 2 function 2 "Intel Reserved" rev 0x02 pchb6 at pci5 dev 2 function 3 "Intel Reserved" rev 0x02 mtrr: Pentium Pro MTRR support uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. HP Webcam-101" rev 2.00/12.04 addr 3 video0 at uvideo0 ugen0 at uhub2 port 4 "Ralink Technology product 0x1000" rev 2.00/52.76 addr 4 uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (fce53dca4beadacf.a) swap on sd0b dump on sd0b video0 detached uvideo0 detached ugen0 detached uhub2 detached uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. HP Webcam-101" rev 2.00/12.04 addr 3 video0 at uvideo0 ugen0 at uhub2 port 4 "Ralink Technology product 0x1000" rev 2.00/52.76 addr 4 uhub3 detached uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 acpitz1: TSZ1: failed to read _TMP acpitz1: TSZ1: failed to read temp video0 detached uvideo0 detached ugen0 detached uhub2 detached uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. HP Webcam-101" rev 2.00/12.04 addr 3 video0 at uvideo0 ugen0 at uhub2 port 4 "Ralink Technology product 0x1000" rev 2.00/52.76 addr 4 uhub3 detached uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 video0 detached uvideo0 detached ugen0 detached uhub2 detached uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. HP Webcam-101" rev 2.00/12.04 addr 3 video0 at uvideo0 ugen0 at uhub2 port 4 "Ralink Technology product 0x1000" rev 2.00/52.76 addr 4 uhub3 detached uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 acpitz1: TSZ1: failed to read _TMP acpitz1: TSZ1: failed to read temp video0 detached uvideo0 detached ugen0 detached uhub2 detached uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 uvideo0 at uhub2 port 3 configuration 1 interface 0 "Chicony Electronics Co., Ltd. HP Webcam-101" rev 2.00/12.04 addr 3 video0 at uvideo0 ugen0 at uhub2 port 4 "Ralink Technology product 0x1000" rev 2.00/52.76 addr 4 uhub3 detached uhub3 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2 acpitz1: TSZ1: failed to read _TMP acpitz1: TSZ1: failed to read temp sysctl hw - no power supply hw.machine=amd64 hw.model=Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz hw.ncpu=4 hw.byteorder=1234 hw.pagesize=4096 hw.disknames=sd0:fce53dca4beadacf,cd0: hw.diskcount=2 hw.sensors.cpu0.temp0=62.00 degC hw.sensors.cpu1.temp0=62.00 degC hw.sensors.cpu2.temp0=62.00 degC hw.sensors.cpu3.temp0=62.00 degC hw.sensors.acpitz0.temp0=54.00 degC (zone temperature) hw.sensors.acpitz1.temp0=58.00 degC (zone temperature) hw.sensors.acpibat0.volt0=10.80 VDC (voltage) hw.sensors.acpibat0.volt1=11.15 VDC (current voltage) hw.sensors.acpibat0.current0=1.75 A (rate) hw.sensors.acpibat0.amphour0=4.14 Ah (last full capacity) hw.sensors.acpibat0.amphour1=0.58 Ah (warning capacity) hw.sensors.acpibat0.amphour2=0.37 Ah (low capacity) hw.sensors.acpibat0.amphour3=2.81 Ah (remaining capacity), OK hw.sensors.acpibat0.raw0=1 (battery discharging), OK hw.sensors.acpiac0.indicator0=Off (power supply) hw.cpuspeed=2527 hw.setperf=99 hw.vendor=Hewlett-Packard hw.product=Presario CQ43 Notebook PC hw.version=068F120000204910000610100 hw.serialno=5CB2080LCH hw.uuid=55f5bf39-147b-b777-09a2-009c021712f4 hw.physmem=3060002816 hw.usermem=2996867072 hw.ncpufound=4 hw.allowpowerdown=1 sysctl hw - power supply hw.machine=amd64 hw.model=Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz hw.ncpu=4 hw.byteorder=1234 hw.pagesize=4096 hw.disknames=sd0:fce53dca4beadacf,cd0: hw.diskcount=2 hw.sensors.cpu0.temp0=62.00 degC hw.sensors.cpu1.temp0=62.00 degC hw.sensors.cpu2.temp0=62.00 degC hw.sensors.cpu3.temp0=62.00 degC hw.sensors.acpitz0.temp0=54.00 degC (zone temperature) hw.sensors.acpitz1.temp0=59.00 degC (zone temperature) hw.sensors.acpibat0.volt0=10.80 VDC (voltage) hw.sensors.acpibat0.volt1=11.12 VDC (current voltage) hw.sensors.acpibat0.current0=1.74 A (rate) hw.sensors.acpibat0.amphour0=4.14 Ah (last full capacity) hw.sensors.acpibat0.amphour1=0.58 Ah (warning capacity) hw.sensors.acpibat0.amphour2=0.37 Ah (low capacity) hw.sensors.acpibat0.amphour3=2.81 Ah (remaining capacity), OK hw.sensors.acpibat0.raw0=1 (battery discharging), OK hw.sensors.acpiac0.indicator0=Off (power supply) hw.cpuspeed=2527 hw.setperf=99 hw.vendor=Hewlett-Packard hw.product=Presario CQ43 Notebook PC hw.version=068F120000204910000610100 hw.serialno=5CB2080LCH hw.uuid=55f5bf39-147b-b777-09a2-009c021712f4 hw.physmem=3060002816 hw.usermem=2996895744 hw.ncpufound=4 hw.allowpowerdown=1 -luis On Mon, Jul 29, 2013 at 4:06 PM, Mark Kettenis <mark.kette...@xs4all.nl>wrote: > On amd64/i386 there is this nasty thing called SMM mode. This allows > BIOS writers to run code behind the back of the OS to do all sorts of > crazy stuff like simulating a legacy PC keyboard controller on systems > that don't have one, or spin up the fan in your laptop when it is > about to melt. On a lot of hardware it is therefore poking the same > hardware registers that are also used by the ACPI code that's running > in the OS. Ever witnessed what happens if two kids want to play with > the same toy? > > So in order to prevent bad things from happening, ACPI defines a > locking protocol to make sure the OS and the SMM BIOS code don't > access the same hardware at the same time. Currently OpenBSD doesn't > do this locking properly. The diff below changes this, enabling the > locking protocol for access to registers that need it. > > I've successfully tested this diff on my x220 and on a absolutely > lowest end hp laptop that I bought to do some radeondrm(4) > development. Seems to work fine on those machines. So it's time to > get this more widely tested. > > Things to test are suspend/resume, whether the battery status is > properly reported and updated, whether the acpitz(4) temperature > sensors are still working, etc., etc. So please run with it for a bit > and report any breakage. > > Thanks, > > Mark > > > P.S. This diff might help machines that where OpenBSD sometimes > reports crazy temperatures. But needs to be tested on other > machines as well!. > > > Index: dsdt.c > =================================================================== > RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v > retrieving revision 1.203 > diff -u -p -r1.203 dsdt.c > --- dsdt.c 2 Jun 2013 17:21:38 -0000 1.203 > +++ dsdt.c 30 Jun 2013 18:43:51 -0000 > @@ -770,7 +770,7 @@ aml_lockfield(struct aml_scope *scope, s > > /* Spin to acquire lock */ > while (!st) { > - st = > acpi_acquire_global_lock(&acpi_softc->sc_facs->global_lock); > + st = acpi_acquire_glk(&acpi_softc->sc_facs->global_lock); > /* XXX - yield/delay? */ > } > > @@ -790,7 +790,7 @@ aml_unlockfield(struct aml_scope *scope, > return; > > /* Release lock */ > - st = acpi_release_global_lock(&acpi_softc->sc_facs->global_lock); > + st = acpi_release_glk(&acpi_softc->sc_facs->global_lock); > if (!st) > return; > > >