From owner-freebsd-acpi@FreeBSD.ORG Fri Feb 22 17:53:14 2008 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 006C316A404 for ; Fri, 22 Feb 2008 17:53:13 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 7410713C504 for ; Fri, 22 Feb 2008 17:53:13 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so379770fgg.35 for ; Fri, 22 Feb 2008 09:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; bh=9mL7+FRjAvzVc6v5cC6SilYkTXTh0Vxbnjy5TygP+WU=; b=mH37R0w970OM4foWqfX4jLEzkrorumpzrJq4tkiqNL4LLUb5vjcGaCBexKSLFME2wnJIhDb87Am3fkqbiFc53NW/Z9JccmCmdKl9JaRrAh7t8y8E+qpEWJfjjoTy3PFeoIBvbspR00EmwiAosQ2OMy5JOC97CmlaXztQQU1HX5w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer:sender; b=piJRTsFvdaMs5QSUJBgeapWmWnaeY25VdpS4MDvrBaUj+cN9+XyIZx09FZHVfypVmi7Utjgu5VCDRXtKNx3n3eeugW2m7SM9dSWyoy9B3pm7dulRz0Zit2abs/GZu5bb8as+BdIhbyw2nUgZiQbVuH++6oGjyhnYqslmGJkC4EE= Received: by 10.82.121.15 with SMTP id t15mr513671buc.1.1203702791486; Fri, 22 Feb 2008 09:53:11 -0800 (PST) Received: from ?88.214.149.122? ( [88.214.149.122]) by mx.google.com with ESMTPS id p10sm1587572gvf.8.2008.02.22.09.53.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Feb 2008 09:53:10 -0800 (PST) Message-Id: <77122846-92A6-47D2-B94C-3368AF167963@fnop.net> From: Rui Paulo To: Andriy Gapon In-Reply-To: <47BEF2AA.900@icyb.net.ua> Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 22 Feb 2008 17:53:03 +0000 References: <479F0ED4.9030709@icyb.net.ua> <479F62D9.6080703@root.org> <47A33CCB.3090902@icyb.net.ua> <47B0C10F.6000109@icyb.net.ua> <47B4103A.6090902@icyb.net.ua> <47B4A103.7040801@icyb.net.ua> <47B4B31A.4020605@icyb.net.ua> <47B84E61.3060401@icyb.net.ua> <47BB375C.5010208@icyb.net.ua> <47BB4D5C.9000406@icyb.net.ua> <47BC7287.6000301@icyb.net.ua> <47BEF2AA.900@icyb.net.ua> X-Mailer: Apple Mail (2.919.2) Sender: Rui Paulo Cc: freebsd-hackers@freebsd.org, freebsd-acpi@freebsd.org Subject: Re: cx_lowest and CPU usage X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Feb 2008 17:53:14 -0000 I'll handle this. Thanks! On Feb 22, 2008, at 4:04 PM, Andriy Gapon wrote: > on 20/02/2008 20:33 Andriy Gapon said the following: >> on 19/02/2008 23:42 Andriy Gapon said the following: >>> The last result most probably means that RTC IRQ was not the =20 >>> interrupt >>> to wake CPU from sleeping state. >>> The first possibility that comes to mind is that on this particular >>> hardware RTC interrupt (IRQ8) is not able to wake the system from =20= >>> C2 state. >> >> So it seems that this was true. >> Here's a shortcut to the relevant info: >> PIIX4E (FW82371EB) specification >> DEVACTB =97 DEVICE ACTIVITY B (FUNCTION 3) pci register description >> BRLD_EN_IRQ8, bit 5 >> >> $ pciconf -r pci0:0:7:3 0x58 >> 03040c07 > > Attached is a patch that fixes the issue for me (without any > side-effects) and should not cause any harm for others. > > --=20 > Andriy Gapon > --- acpi_cpu.c.orig 2008-02-21 21:08:16.000000000 +0200 > +++ acpi_cpu.c 2008-02-21 21:13:54.000000000 +0200 > @@ -113,6 +113,12 @@ > #define PCI_REVISION_B_STEP 1 > #define PCI_REVISION_4E 2 > #define PCI_REVISION_4M 3 > +#define PIIX4_DEVACTB_REG 0x58 > +#define PIIX4_BRLD_EN_IRQ0 (1<<0) > +#define PIIX4_BRLD_EN_IRQ (1<<1) > +#define PIIX4_BRLD_EN_IRQ8 (1<<5) > +#define PIIX4_STOP_BREAK_MASK (PIIX4_BRLD_EN_IRQ0 | =20 > PIIX4_BRLD_EN_IRQ | PIIX4_BRLD_EN_IRQ8) > +#define PIIX4_PCNTRL_BST_EN (1<<10) > > /* Platform hardware resource information. */ > static uint32_t cpu_smi_cmd; /* Value to write to = SMI_CMD. */ > @@ -1004,6 +1010,7 @@ > acpi_cpu_quirks(void) > { > device_t acpi_dev; > + uint32_t val; > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > > @@ -1052,12 +1059,25 @@ > * See erratum #18 ("C3 Power State/BMIDE and Type-F DMA > * Livelock") from the January 2002 PIIX4 specification update. > * Applies to all PIIX4 models. > + * > + * Also, make sure that all interrupts cause a "Stop Break" > + * event to exit from C2 state. > */ > + case PCI_REVISION_A_STEP: > + case PCI_REVISION_B_STEP: > case PCI_REVISION_4E: > case PCI_REVISION_4M: > cpu_quirks |=3D CPU_QUIRK_NO_C3; > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "acpi_cpu: working around PIIX4 bug, disabling C3\n")); > + > + val =3D pci_read_config(acpi_dev, PIIX4_DEVACTB_REG, 4); > + if ((val & PIIX4_STOP_BREAK_MASK) !=3D = PIIX4_STOP_BREAK_MASK) { > + ACPI_DEBUG_PRINT((ACPI_DB_INFO, > + "PIIX4: enabling IRQs to generate Stop Break\n")); > + val |=3D PIIX4_STOP_BREAK_MASK; > + pci_write_config(acpi_dev, PIIX4_DEVACTB_REG, val, 4); > + } > break; > default: > break; > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-=20 > unsubscribe@freebsd.org" -- Rui Paulo