Re: [ACPI] [PATCH] ACPI: implement UUID-labelled vendor-defined resources

From: Bjorn Helgaas <bjorn.helgaas_at_hp.com>
Date: 2005-09-20 01:31:20
On Friday 16 September 2005 3:56 pm, Moore, Robert wrote:
> And to make things even more interesting, the base ACPICA code looks
> nothing like the final Linux version of the code; it is converted on the
> fly before every release to Linux.

Well, if you decide you'll integrate the code, I can dig out the
pre-converted ACPICA code and make a patch against it.

> BTW, Please explain in more detail what support is needed in ACPICA for
> the ACPI 3.0 vendor-defined resource.  Also, any idea how we are
> supposed to determine if the UUID data exists within the descriptor?
> (i.e., how do we differentiate an ACPI 2.0 vendor descriptor from an
> ACPI 3.0 descriptor?)

There's no mark that distinguishes 2.0 and 3.0 vendor descriptors.
As far as I can tell, a 3.0 descriptor (that contains a UUID and
sub-type) is also a perfectly valid 2.0 descriptor.

ACPI 3.0 "strongs recommends," but apparently doesn't actually
require a UUID, so a 2.0 vendor descriptor should also be a valid
3.0 descriptor.

The idea is that we just look through all the vendor descriptors
for the supplied UUID.  If we find one, we return the information.
There's a small possibility that an ACPI 2.0, non-UUID-labelled
descriptor will contain data that happens to match the random
16-byte UUID, and we'll return it by mistake.  But that possibility
is pretty remote, I think.

The point of having this code in ACPICA is so that people who
use UUID-labelled vendor descriptors can do something simple
like this:

> struct acpi_vendor_descriptor hp_ccsr_descriptor = {
>         .uuid_subtype = 2,
>         .uuid = ACPI_UUID(0x69e9adf9, 0x924f, 0xab5f, 0xf6, 0x4a, 0x24, 0xd2,
>                           0x01, 0x37, 0x0e, 0xad)
> };
> 
> acpi_status hp_acpi_csr_space(acpi_handle obj, u64 * csr_base, u64 * csr_length)
> {
>...
>         status = acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data,
>                 &length);

rather than having to duplicate the implementation of
acpi_find_vendor_resource().  But that's an obvious answer.
Maybe you had a deeper question that I missed?

This is pretty generic stuff, certainly not ia64-, or even OS-
dependent.  So I thought ACPICA would be a logical place for it.
If you have other suggestions, let me know.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Sep 20 01:32:20 2005

This archive was generated by hypermail 2.1.8 : 2005-09-20 01:32:26 EST