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