]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
4a71b21a | 2 | This protocol provides some basic services to support publishing ACPI system tables. The\r |
3 | services handle many of the more mundane tasks that are required to publish a set of tables. The\r | |
4 | services will do the following:\r | |
5 | - Generate common tables.\r | |
6 | - Update the table links.\r | |
7 | - Ensure that tables are properly aligned and use correct types of memory.\r | |
8 | - Update checksum values and IDs.\r | |
9 | - Complete the final installation of the tables.\r | |
534b8251 | 10 | \r |
79964ac8 | 11 | Copyright (c) 2007, Intel Corporation\r |
12 | All rights reserved. This program and the accompanying materials\r | |
13 | are licensed and made available under the terms and conditions of the BSD License\r | |
14 | which accompanies this distribution. The full text of the license may be found at\r | |
15 | http://opensource.org/licenses/bsd-license.php\r | |
16 | \r | |
17 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
18 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
19 | \r | |
534b8251 | 20 | @par Revision Reference:\r |
689aa0d6 | 21 | This Protocol is defined in Framework ACPI Specification.\r |
534b8251 | 22 | Version 0.9.\r |
23 | \r | |
79964ac8 | 24 | **/\r |
25 | \r | |
26 | #ifndef _ACPI_SUPPORT_PROTOCOL_H_\r | |
27 | #define _ACPI_SUPPORT_PROTOCOL_H_\r | |
28 | \r | |
29 | typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;\r | |
30 | \r | |
31 | //\r | |
32 | // ACPI Support Protocol GUID\r | |
33 | //\r | |
34 | #define EFI_ACPI_SUPPORT_GUID \\r | |
35 | { \\r | |
36 | 0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \\r | |
37 | }\r | |
38 | \r | |
39 | //\r | |
40 | // Protocol Data Definitions\r | |
41 | //\r | |
42 | //\r | |
43 | // ACPI Version bitmap definition:\r | |
44 | //\r | |
45 | // EFI_ACPI_TABLE_VERSION_1_0B - ACPI Version 1.0b\r | |
46 | // EFI_ACPI_TABLE_VERSION_2_0 - ACPI Version 2.0\r | |
47 | // EFI_ACPI_TABLE_VERSION_3_0 - ACPI Version 3.0\r | |
48 | // EFI_ACPI_TABLE_VERSION_NONE - No ACPI Versions. This might be used\r | |
49 | // to create memory-based operation regions or other information\r | |
50 | // that is not part of the ACPI "tree" but must still be found\r | |
51 | // in ACPI memory space and/or managed by the core ACPI driver.\r | |
52 | //\r | |
53 | // Note that EFI provides discrete GUIDs for each version of ACPI\r | |
54 | // that is supported. It is expected that each EFI GUIDed\r | |
55 | // version of ACPI will also have a corresponding bitmap\r | |
56 | // definition. This allows maintenance of separate ACPI trees\r | |
57 | // for each distinctly different version of ACPI.\r | |
58 | //\r | |
59 | #define EFI_ACPI_TABLE_VERSION UINT32\r | |
60 | \r | |
61 | #define EFI_ACPI_TABLE_VERSION_NONE (1 << 0)\r | |
62 | #define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1)\r | |
63 | #define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2)\r | |
64 | #define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3)\r | |
65 | \r | |
66 | //\r | |
67 | // Protocol Member Functions\r | |
68 | //\r | |
69 | \r | |
70 | /**\r | |
71 | Returns a requested ACPI table.\r | |
72 | \r | |
73 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r | |
74 | @param Index The zero-based index of the table to retrieve.\r | |
75 | @param Table Pointer for returning the table buffer.\r | |
76 | @param Version Updated with the ACPI versions to which this table belongs.\r | |
77 | @param Handle Pointer for identifying the table.\r | |
78 | \r | |
79 | @retval EFI_SUCCESS The function completed successfully.\r | |
80 | @retval EFI_NOT_FOUND The requested index is too large and a table was not found.\r | |
81 | \r | |
82 | **/\r | |
83 | typedef\r | |
84 | EFI_STATUS\r | |
69686d56 | 85 | (EFIAPI *EFI_ACPI_GET_ACPI_TABLE)(\r |
79964ac8 | 86 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r |
87 | IN INTN Index,\r | |
88 | OUT VOID **Table,\r | |
89 | OUT EFI_ACPI_TABLE_VERSION *Version,\r | |
90 | OUT UINTN *Handle\r | |
91 | );\r | |
92 | \r | |
93 | /**\r | |
94 | Used to add, remove, or update ACPI tables.\r | |
95 | \r | |
96 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r | |
97 | @param Table Pointer to the new table to add or update.\r | |
98 | @param Checksum If TRUE, indicates that the checksum should be\r | |
99 | calculated for this table.\r | |
100 | @param Version Indicates to which version(s) of ACPI the table should be added.\r | |
689aa0d6 | 101 | @param Handle Pointer to the handle of the table to remove or update.\r |
79964ac8 | 102 | \r |
103 | @retval EFI_SUCCESS The function completed successfully.\r | |
104 | @retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.\r | |
105 | @retval EFI_ABORTED Could not complete the desired action.\r | |
106 | \r | |
107 | **/\r | |
108 | typedef\r | |
109 | EFI_STATUS\r | |
69686d56 | 110 | (EFIAPI *EFI_ACPI_SET_ACPI_TABLE)(\r |
79964ac8 | 111 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r |
112 | IN VOID *Table OPTIONAL,\r | |
113 | IN BOOLEAN Checksum,\r | |
114 | IN EFI_ACPI_TABLE_VERSION Version,\r | |
115 | IN OUT UINTN *Handle\r | |
116 | );\r | |
117 | \r | |
118 | /**\r | |
119 | Causes one or more versions of the ACPI tables to be published in\r | |
120 | the EFI system configuration tables.\r | |
121 | \r | |
534b8251 | 122 | The PublishTables() function installs the ACPI tables for the versions that are specified in \r |
123 | Version. No tables are published for Version equal to EFI_ACPI_VERSION_NONE. Once \r | |
124 | published, tables will continue to be updated as tables are modified with \r | |
125 | EFI_ACPI_SUPPORT_PROTOCOL.SetAcpiTable(). \r | |
126 | \r | |
79964ac8 | 127 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r |
128 | @param Version Indicates to which version(s) of ACPI that the table should be published.\r | |
129 | \r | |
130 | @retval EFI_SUCCESS The function completed successfully.\r | |
131 | @retval EFI_ABORTED An error occurred and the function could not complete successfully.\r | |
132 | \r | |
133 | **/\r | |
134 | typedef\r | |
135 | EFI_STATUS\r | |
69686d56 | 136 | (EFIAPI *EFI_ACPI_PUBLISH_TABLES)(\r |
79964ac8 | 137 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r |
138 | IN EFI_ACPI_TABLE_VERSION Version\r | |
139 | );\r | |
140 | \r | |
141 | //\r | |
142 | // ACPI Support Protocol\r | |
143 | //\r | |
144 | /**\r | |
79964ac8 | 145 | This protocol provides some basic services to support publishing ACPI system\r |
146 | tables. The services handle many of the more mundane tasks that are required\r | |
147 | to publish a set of tables.\r | |
79964ac8 | 148 | **/\r |
149 | struct _EFI_ACPI_SUPPORT_PROTOCOL {\r | |
2bbaeb0d | 150 | ///\r |
151 | /// Returns a table specified by an index if it exists.\r | |
152 | ///\r | |
79964ac8 | 153 | EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;\r |
2bbaeb0d | 154 | \r |
155 | ///\r | |
156 | /// Adds, removes, or updates ACPI tables\r | |
157 | ///\r | |
79964ac8 | 158 | EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;\r |
2bbaeb0d | 159 | \r |
160 | ///\r | |
161 | /// Publishes the ACPI tables.\r | |
162 | ///\r | |
79964ac8 | 163 | EFI_ACPI_PUBLISH_TABLES PublishTables;\r |
164 | };\r | |
165 | \r | |
166 | //\r | |
167 | // Extern the GUID for protocol users.\r | |
168 | //\r | |
169 | extern EFI_GUID gEfiAcpiSupportProtocolGuid;\r | |
170 | \r | |
171 | #endif\r | |
172 | \r |