Home | History | Annotate | Line # | Download | only in common
ahuuids.c revision 1.1
      1 /******************************************************************************
      2  *
      3  * Module Name: ahuuids - Table of known ACPI-related UUIDs
      4  *
      5  *****************************************************************************/
      6 
      7 /*
      8  * Copyright (C) 2000 - 2014, Intel Corp.
      9  * All rights reserved.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions, and the following disclaimer,
     16  *    without modification.
     17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18  *    substantially similar to the "NO WARRANTY" disclaimer below
     19  *    ("Disclaimer") and any redistribution must be conditioned upon
     20  *    including a substantially similar Disclaimer requirement for further
     21  *    binary redistribution.
     22  * 3. Neither the names of the above-listed copyright holders nor the names
     23  *    of any contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * Alternatively, this software may be distributed under the terms of the
     27  * GNU General Public License ("GPL") version 2 as published by the Free
     28  * Software Foundation.
     29  *
     30  * NO WARRANTY
     31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41  * POSSIBILITY OF SUCH DAMAGES.
     42  */
     43 
     44 #include "acpi.h"
     45 #include "accommon.h"
     46 
     47 #define _COMPONENT          ACPI_UTILITIES
     48         ACPI_MODULE_NAME    ("ahuuids")
     49 
     50 /*
     51  * Table of "known" (ACPI-related) UUIDs
     52  */
     53 const AH_UUID  AcpiUuids[] =
     54 {
     55     {"PCI Host Bridge Device",
     56         "33db4d5b-1ff7-401c-9657-7441c03dd766"},
     57 
     58     {"Platform-wide Capabilities",
     59         "0811b06e-4a27-44f9-8d60-3cbbc22e7b48"},
     60 
     61     {"Dynamic Enumeration",
     62         "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf"},
     63 
     64     {"GPIO Controller",
     65         "4f248f40-d5e2-499f-834c-27758ea1cd3f"},
     66 
     67     {"Battery Thermal Limit",
     68         "4c2067e3-887d-475c-9720-4af1d3ed602e"},
     69 
     70     {"Thermal Extensions",
     71         "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"},
     72 
     73     {"USB Controller",
     74         "ce2ee385-00e6-48cb-9f05-2edb927c4899"},
     75 
     76     {"HID I2C Device",
     77         "3cdff6f7-4267-4555-ad05-b30a3d8938de"},
     78 
     79     {"Power Button Device",
     80         "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"},
     81 
     82     {"Device Labeling Interface",
     83         "e5c937d0-3553-4d7a-9117-ea4d19c3434d"},
     84 
     85     {"SATA Controller",
     86         "e4db149b-fcfe-425b-a6d8-92357d78fc7f"},
     87 
     88     {"Physical Presence Interface",
     89         "3dddfaa6-361b-4eb4-a424-8d10089d1653"},
     90 
     91     {"Device Properties for _DSD",
     92         "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"},
     93 
     94     {NULL, NULL}
     95 };
     96 
     97 
     98 /*******************************************************************************
     99  *
    100  * FUNCTION:    AcpiAhMatchUuid
    101  *
    102  * PARAMETERS:  Data                - Data buffer containing a UUID
    103  *
    104  * RETURN:      ASCII description string for the UUID if it is found.
    105  *
    106  * DESCRIPTION: Returns a description string for "known" UUIDs, which are
    107  *              are UUIDs that are related to ACPI in some way.
    108  *
    109  ******************************************************************************/
    110 
    111 const char *
    112 AcpiAhMatchUuid (
    113     UINT8                   *Data)
    114 {
    115     const AH_UUID           *Info;
    116     UINT8                   UuidBuffer[UUID_BUFFER_LENGTH];
    117 
    118 
    119     /* Walk the table of known ACPI-related UUIDs */
    120 
    121     for (Info = AcpiUuids; Info->Description; Info++)
    122     {
    123         AcpiUtConvertStringToUuid (Info->String, UuidBuffer);
    124 
    125         if (!ACPI_MEMCMP (Data, UuidBuffer, UUID_BUFFER_LENGTH))
    126         {
    127             return (Info->Description);
    128         }
    129     }
    130 
    131     return (NULL);
    132 }
    133