]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/AcpiSupport.h
Refine SMM USB Dispatch Protocol definition.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / AcpiSupport.h
CommitLineData
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
b80fbe85 29#include <PiDxe.h>\r
30\r
79964ac8 31typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;\r
32\r
33//\r
34// ACPI Support Protocol GUID\r
35//\r
36#define EFI_ACPI_SUPPORT_GUID \\r
37 { \\r
38 0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \\r
39 }\r
40\r
41//\r
42// Protocol Data Definitions\r
43//\r
44//\r
45// ACPI Version bitmap definition:\r
46//\r
47// EFI_ACPI_TABLE_VERSION_1_0B - ACPI Version 1.0b\r
48// EFI_ACPI_TABLE_VERSION_2_0 - ACPI Version 2.0\r
49// EFI_ACPI_TABLE_VERSION_3_0 - ACPI Version 3.0\r
50// EFI_ACPI_TABLE_VERSION_NONE - No ACPI Versions. This might be used\r
51// to create memory-based operation regions or other information\r
52// that is not part of the ACPI "tree" but must still be found\r
53// in ACPI memory space and/or managed by the core ACPI driver.\r
54//\r
55// Note that EFI provides discrete GUIDs for each version of ACPI\r
56// that is supported. It is expected that each EFI GUIDed\r
57// version of ACPI will also have a corresponding bitmap\r
58// definition. This allows maintenance of separate ACPI trees\r
59// for each distinctly different version of ACPI.\r
60//\r
61#define EFI_ACPI_TABLE_VERSION UINT32\r
62\r
63#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0)\r
64#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1)\r
65#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2)\r
66#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3)\r
67\r
68//\r
69// Protocol Member Functions\r
70//\r
71\r
72/**\r
73 Returns a requested ACPI table.\r
74\r
75 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
76 @param Index The zero-based index of the table to retrieve.\r
77 @param Table Pointer for returning the table buffer.\r
78 @param Version Updated with the ACPI versions to which this table belongs.\r
79 @param Handle Pointer for identifying the table.\r
80\r
81 @retval EFI_SUCCESS The function completed successfully.\r
82 @retval EFI_NOT_FOUND The requested index is too large and a table was not found.\r
83\r
84**/\r
85typedef\r
86EFI_STATUS\r
69686d56 87(EFIAPI *EFI_ACPI_GET_ACPI_TABLE)(\r
79964ac8 88 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
89 IN INTN Index,\r
90 OUT VOID **Table,\r
91 OUT EFI_ACPI_TABLE_VERSION *Version,\r
92 OUT UINTN *Handle\r
93 );\r
94\r
95/**\r
96 Used to add, remove, or update ACPI tables.\r
97\r
98 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
99 @param Table Pointer to the new table to add or update.\r
100 @param Checksum If TRUE, indicates that the checksum should be\r
101 calculated for this table.\r
102 @param Version Indicates to which version(s) of ACPI the table should be added.\r
689aa0d6 103 @param Handle Pointer to the handle of the table to remove or update.\r
79964ac8 104\r
105 @retval EFI_SUCCESS The function completed successfully.\r
106 @retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.\r
107 @retval EFI_ABORTED Could not complete the desired action.\r
108\r
109**/\r
110typedef\r
111EFI_STATUS\r
69686d56 112(EFIAPI *EFI_ACPI_SET_ACPI_TABLE)(\r
79964ac8 113 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
114 IN VOID *Table OPTIONAL,\r
115 IN BOOLEAN Checksum,\r
116 IN EFI_ACPI_TABLE_VERSION Version,\r
117 IN OUT UINTN *Handle\r
118 );\r
119\r
120/**\r
121 Causes one or more versions of the ACPI tables to be published in\r
122 the EFI system configuration tables.\r
123\r
534b8251 124 The PublishTables() function installs the ACPI tables for the versions that are specified in \r
125 Version. No tables are published for Version equal to EFI_ACPI_VERSION_NONE. Once \r
126 published, tables will continue to be updated as tables are modified with \r
127 EFI_ACPI_SUPPORT_PROTOCOL.SetAcpiTable(). \r
128\r
79964ac8 129 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
130 @param Version Indicates to which version(s) of ACPI that the table should be published.\r
131\r
132 @retval EFI_SUCCESS The function completed successfully.\r
133 @retval EFI_ABORTED An error occurred and the function could not complete successfully.\r
134\r
135**/\r
136typedef\r
137EFI_STATUS\r
69686d56 138(EFIAPI *EFI_ACPI_PUBLISH_TABLES)(\r
79964ac8 139 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
140 IN EFI_ACPI_TABLE_VERSION Version\r
141 );\r
142\r
143//\r
144// ACPI Support Protocol\r
145//\r
146/**\r
79964ac8 147 This protocol provides some basic services to support publishing ACPI system\r
148 tables. The services handle many of the more mundane tasks that are required\r
149 to publish a set of tables.\r
79964ac8 150**/\r
151struct _EFI_ACPI_SUPPORT_PROTOCOL {\r
689aa0d6 152///\r
153/// Returns a table specified by an index if it exists.\r
154///\r
79964ac8 155 EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;\r
689aa0d6 156///\r
157/// Adds, removes, or updates ACPI tables\r
158///\r
79964ac8 159 EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;\r
689aa0d6 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
169extern EFI_GUID gEfiAcpiSupportProtocolGuid;\r
170\r
171#endif\r
172\r