]> git.proxmox.com Git - mirror_edk2.git/blame - OldMdePkg/Include/Protocol/AcpiSupport.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Protocol / AcpiSupport.h
CommitLineData
878ddf1f 1/** @file\r
2 Definition of the ACPI Support protocol.\r
3\r
4 Copyright (c) 2006, 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
23typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;\r
24\r
25//\r
26// ACPI Support Protocol GUID\r
27//\r
28#define EFI_ACPI_SUPPORT_GUID \\r
29 { \\r
30 0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \\r
31 }\r
32\r
33//\r
34// Protocol Data Definitions\r
35//\r
36//\r
37// ACPI Version bitmap definition:\r
38//\r
39// EFI_ACPI_TABLE_VERSION_1_0B - ACPI Version 1.0b\r
40// EFI_ACPI_TABLE_VERSION_2_0 - ACPI Version 2.0\r
41// EFI_ACPI_TABLE_VERSION_3_0 - ACPI Version 3.0\r
42// EFI_ACPI_TABLE_VERSION_NONE - No ACPI Versions. This might be used\r
43// to create memory-based operation regions or other information\r
44// that is not part of the ACPI "tree" but must still be found\r
45// in ACPI memory space and/or managed by the core ACPI driver.\r
46//\r
47// Note that EFI provides discrete GUIDs for each version of ACPI\r
48// that is supported. It is expected that each EFI GUIDed\r
49// version of ACPI will also have a corresponding bitmap\r
50// definition. This allows maintenance of separate ACPI trees\r
51// for each distinctly different version of ACPI.\r
52//\r
53#define EFI_ACPI_TABLE_VERSION UINT32\r
54\r
55#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0)\r
56#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1)\r
57#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2)\r
58#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3)\r
59\r
60//\r
61// Protocol Member Functions\r
62//\r
63\r
64/**\r
65 Returns a requested ACPI table.\r
66\r
0647c9ad
LG
67 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
68 @param Index The zero-based index of the table to retrieve.\r
69 @param Table Pointer for returning the table buffer.\r
70 @param Version Updated with the ACPI versions to which this table belongs.\r
71 @param Handle Pointer for identifying the table.\r
878ddf1f 72\r
0647c9ad
LG
73 @retval EFI_SUCCESS The function completed successfully.\r
74 @retval EFI_NOT_FOUND The requested index is too large and a table was not found.\r
878ddf1f 75\r
76**/\r
77typedef\r
78EFI_STATUS\r
79(EFIAPI *EFI_ACPI_GET_ACPI_TABLE) (\r
80 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
81 IN INTN Index,\r
82 OUT VOID **Table,\r
83 OUT EFI_ACPI_TABLE_VERSION *Version,\r
84 OUT UINTN *Handle\r
85 );\r
86\r
87/**\r
88 Used to add, remove, or update ACPI tables.\r
89\r
0647c9ad
LG
90 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
91 @param Table Pointer to the new table to add or update.\r
92 @param Checksum If TRUE, indicates that the checksum should be\r
93 calculated for this table.\r
94 @param Version Indicates to which version(s) of ACPI the table should be added.\r
95 @param Pointer to the handle of the table to remove or update.\r
878ddf1f 96\r
0647c9ad 97 @retval EFI_SUCCESS The function completed successfully.\r
878ddf1f 98 @retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.\r
0647c9ad 99 @retval EFI_ABORTED Could not complete the desired action.\r
878ddf1f 100\r
101**/\r
102typedef\r
103EFI_STATUS\r
104(EFIAPI *EFI_ACPI_SET_ACPI_TABLE) (\r
105 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
106 IN VOID *Table OPTIONAL,\r
107 IN BOOLEAN Checksum,\r
108 IN EFI_ACPI_TABLE_VERSION Version,\r
109 IN OUT UINTN *Handle\r
110 );\r
111\r
112/**\r
113 Causes one or more versions of the ACPI tables to be published in \r
114 the EFI system configuration tables.\r
115\r
0647c9ad
LG
116 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r
117 @param Version Indicates to which version(s) of ACPI that the table should be published.\r
878ddf1f 118\r
0647c9ad
LG
119 @retval EFI_SUCCESS The function completed successfully.\r
120 @retval EFI_ABORTED An error occurred and the function could not complete successfully.\r
878ddf1f 121\r
122**/\r
123typedef\r
124EFI_STATUS\r
125(EFIAPI *EFI_ACPI_PUBLISH_TABLES) (\r
126 IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r
127 IN EFI_ACPI_TABLE_VERSION Version\r
128 );\r
129\r
130//\r
131// ACPI Support Protocol\r
132//\r
133/**\r
134 @par Protocol Description:\r
135 This protocol provides some basic services to support publishing ACPI system \r
136 tables. The services handle many of the more mundane tasks that are required \r
137 to publish a set of tables. \r
138\r
139 @param GetAcpiTable\r
140 Returns a table specified by an index if it exists.\r
141\r
142 @param SetAcpiTable\r
143 Adds, removes, or updates ACPI tables\r
144\r
145 @param PublishTables\r
146 Publishes the ACPI tables.\r
147\r
148**/\r
149struct _EFI_ACPI_SUPPORT_PROTOCOL {\r
150 EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;\r
151 EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;\r
152 EFI_ACPI_PUBLISH_TABLES PublishTables;\r
153};\r
154\r
155//\r
156// Extern the GUID for protocol users.\r
157//\r
f15e4e27 158extern EFI_GUID gEfiAcpiSupportProtocolGuid;\r
878ddf1f 159\r
160#endif\r