ahuuids.c revision 272444
1249259Sdim/******************************************************************************
2249259Sdim *
3249259Sdim * Module Name: ahuuids - Table of known ACPI-related UUIDs
4249259Sdim *
5249259Sdim *****************************************************************************/
6249259Sdim
7249259Sdim/*
8249259Sdim * Copyright (C) 2000 - 2014, Intel Corp.
9249259Sdim * All rights reserved.
10249259Sdim *
11249259Sdim * Redistribution and use in source and binary forms, with or without
12249259Sdim * modification, are permitted provided that the following conditions
13249259Sdim * are met:
14249259Sdim * 1. Redistributions of source code must retain the above copyright
15249259Sdim *    notice, this list of conditions, and the following disclaimer,
16249259Sdim *    without modification.
17249259Sdim * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18249259Sdim *    substantially similar to the "NO WARRANTY" disclaimer below
19249259Sdim *    ("Disclaimer") and any redistribution must be conditioned upon
20249259Sdim *    including a substantially similar Disclaimer requirement for further
21249259Sdim *    binary redistribution.
22249259Sdim * 3. Neither the names of the above-listed copyright holders nor the names
23249259Sdim *    of any contributors may be used to endorse or promote products derived
24249259Sdim *    from this software without specific prior written permission.
25249259Sdim *
26249259Sdim * Alternatively, this software may be distributed under the terms of the
27249259Sdim * GNU General Public License ("GPL") version 2 as published by the Free
28249259Sdim * Software Foundation.
29249259Sdim *
30249259Sdim * NO WARRANTY
31249259Sdim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32249259Sdim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33249259Sdim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34249259Sdim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35249259Sdim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36249259Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37249259Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38249259Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39249259Sdim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40249259Sdim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41249259Sdim * POSSIBILITY OF SUCH DAMAGES.
42249259Sdim */
43249259Sdim
44249259Sdim#include <contrib/dev/acpica/include/acpi.h>
45249259Sdim#include <contrib/dev/acpica/include/accommon.h>
46249259Sdim
47249259Sdim#define _COMPONENT          ACPI_UTILITIES
48249259Sdim        ACPI_MODULE_NAME    ("ahuuids")
49249259Sdim
50249259Sdim/*
51249259Sdim * Table of "known" (ACPI-related) UUIDs
52249259Sdim */
53249259Sdimconst AH_UUID  AcpiUuids[] =
54249259Sdim{
55249259Sdim    {"PCI Host Bridge Device",
56249259Sdim        "33db4d5b-1ff7-401c-9657-7441c03dd766"},
57249259Sdim
58249259Sdim    {"Platform-wide Capabilities",
59249259Sdim        "0811b06e-4a27-44f9-8d60-3cbbc22e7b48"},
60249259Sdim
61249259Sdim    {"Dynamic Enumeration",
62249259Sdim        "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf"},
63249259Sdim
64249259Sdim    {"GPIO Controller",
65249259Sdim        "4f248f40-d5e2-499f-834c-27758ea1cd3f"},
66249259Sdim
67249259Sdim    {"Battery Thermal Limit",
68249259Sdim        "4c2067e3-887d-475c-9720-4af1d3ed602e"},
69249259Sdim
70249259Sdim    {"Thermal Extensions",
71249259Sdim        "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"},
72249259Sdim
73249259Sdim    {"USB Controller",
74249259Sdim        "ce2ee385-00e6-48cb-9f05-2edb927c4899"},
75249259Sdim
76249259Sdim    {"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
111const char *
112AcpiAhMatchUuid (
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