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