From owner-freebsd-acpi@FreeBSD.ORG Thu Feb 4 21:57:57 2010 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 9ED2C10656B6; Thu, 4 Feb 2010 21:57:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 70FB38FC15; Thu, 4 Feb 2010 21:57:57 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id E5CDC46B17; Thu, 4 Feb 2010 16:57:56 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 26E538A024; Thu, 4 Feb 2010 16:57:56 -0500 (EST) From: John Baldwin To: Andriy Gapon Date: Thu, 4 Feb 2010 16:57:52 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20100120; KDE/4.3.1; amd64; ; ) References: <4B698DD8.4010404@icyb.net.ua> <4B69E0BA.4080104@root.org> <4B6B2337.8070404@icyb.net.ua> In-Reply-To: <4B6B2337.8070404@icyb.net.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201002041657.52232.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 04 Feb 2010 16:57:56 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: acpi_cpu: _PDC vs _OSC 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: Thu, 04 Feb 2010 21:57:57 -0000 On Thursday 04 February 2010 2:42:47 pm Andriy Gapon wrote: > > Below is the patch that I have. > _PDC is evaluated only if _OSC evaluation fails. > _OSC status returned by AML is reported if not zero. > Small changes in comments. > > BTW, 'if (sc->cpu_features)' check could probably be dropped, because we > initialize cpu_features with non-zero value and then only bit-or to it. > > Index: sys/dev/acpica/acpi_cpu.c > =================================================================== > --- sys/dev/acpica/acpi_cpu.c (revision 203497) > +++ sys/dev/acpica/acpi_cpu.c (working copy) > @@ -345,26 +345,13 @@ > } > > /* > - * CPU capabilities are specified as a buffer of 32-bit integers: > - * revision, count, and one or more capabilities. The revision of > - * "1" is not specified anywhere but seems to match Linux. > + * CPU capabilities are specified in > + * Intel Processor Vendor-Specific ACPI Interface Specification. > */ > if (sc->cpu_features) { > - arglist.Pointer = arg; > - arglist.Count = 1; > - arg[0].Type = ACPI_TYPE_BUFFER; > - arg[0].Buffer.Length = sizeof(cap_set); > - arg[0].Buffer.Pointer = (uint8_t *)cap_set; > - cap_set[0] = 1; /* revision */ > - cap_set[1] = 1; /* number of capabilities integers */ > - cap_set[2] = sc->cpu_features; > - AcpiEvaluateObject(sc->cpu_handle, "_PDC", &arglist, NULL); > - > /* > - * On some systems we need to evaluate _OSC so that the ASL > - * loads the _PSS and/or _PDC methods at runtime. > - * > - * TODO: evaluate failure of _OSC. > + * On some systems evaluation of _OSC/_PDC dynamically > + * loads the _PSS and other methods. > */ I would only say _OSC here. I don't think we've seen any systems that load something when _PDC is invoked, only when _OSC is invoked. -- John Baldwin