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