Date: Thu, 4 Feb 2010 16:57:52 -0500 From: John Baldwin <jhb@freebsd.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: freebsd-acpi@freebsd.org Subject: Re: acpi_cpu: _PDC vs _OSC Message-ID: <201002041657.52232.jhb@freebsd.org> In-Reply-To: <4B6B2337.8070404@icyb.net.ua> References: <4B698DD8.4010404@icyb.net.ua> <4B69E0BA.4080104@root.org> <4B6B2337.8070404@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002041657.52232.jhb>