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