Add more comments for IntelFramework's header files.
[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
79964ac8 10\r
4a71b21a 11 This is defined in the ACPI Specification 0.9.\r
12 \r
79964ac8 13 Copyright (c) 2007, Intel Corporation\r
14 All rights reserved. This program and the accompanying materials\r
15 are licensed and made available under the terms and conditions of the BSD License\r
16 which accompanies this distribution. The full text of the license may be found at\r
17 http://opensource.org/licenses/bsd-license.php\r
18\r
19 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
20 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
21\r
79964ac8 22**/\r
23\r
24#ifndef _ACPI_SUPPORT_PROTOCOL_H_\r
25#define _ACPI_SUPPORT_PROTOCOL_H_\r
26\r
b80fbe85 27#include <PiDxe.h>\r
28\r
79964ac8 29typedef 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
83typedef\r
84EFI_STATUS\r
85(EFIAPI *EFI_ACPI_GET_ACPI_TABLE) (\r
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
101 @param Pointer to the handle of the table to remove or update.\r
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
108typedef\r
109EFI_STATUS\r
110(EFIAPI *EFI_ACPI_SET_ACPI_TABLE) (\r
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
122 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
123 @param Version Indicates to which version(s) of ACPI that the table should be published.\r
124\r
125 @retval EFI_SUCCESS The function completed successfully.\r
126 @retval EFI_ABORTED An error occurred and the function could not complete successfully.\r
127\r
128**/\r
129typedef\r
130EFI_STATUS\r
131(EFIAPI *EFI_ACPI_PUBLISH_TABLES) (\r
132 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
133 IN EFI_ACPI_TABLE_VERSION Version\r
134 );\r
135\r
136//\r
137// ACPI Support Protocol\r
138//\r
139/**\r
140 @par Protocol Description:\r
141 This protocol provides some basic services to support publishing ACPI system\r
142 tables. The services handle many of the more mundane tasks that are required\r
143 to publish a set of tables.\r
144\r
145 @param GetAcpiTable\r
146 Returns a table specified by an index if it exists.\r
147\r
148 @param SetAcpiTable\r
149 Adds, removes, or updates ACPI tables\r
150\r
151 @param PublishTables\r
152 Publishes the ACPI tables.\r
153\r
154**/\r
155struct _EFI_ACPI_SUPPORT_PROTOCOL {\r
156 EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;\r
157 EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;\r
158 EFI_ACPI_PUBLISH_TABLES PublishTables;\r
159};\r
160\r
161//\r
162// Extern the GUID for protocol users.\r
163//\r
164extern EFI_GUID gEfiAcpiSupportProtocolGuid;\r
165\r
166#endif\r
167\r