]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Include/Protocol/AcpiSupport.h
d90059792ec7d165cf1cdce0a542df392aeb5fd6
[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:
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 - 2018, Intel Corporation. All rights reserved.<BR>
12 SPDX-License-Identifier: BSD-2-Clause-Patent
13
14 @par Revision Reference:
15 This Protocol is defined in Framework ACPI Specification.
16 Version 0.9.
17
18 **/
19
20 #ifndef _ACPI_SUPPORT_PROTOCOL_H_
21 #define _ACPI_SUPPORT_PROTOCOL_H_
22
23 #include <Protocol/AcpiSystemDescriptionTable.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 //
37 // Protocol Member Functions
38 //
39
40 /**
41 Returns a requested ACPI table.
42
43 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
44 @param Index The zero-based index of the table to retrieve.
45 @param Table The pointer for returning the table buffer.
46 @param Version Updated with the ACPI versions to which this table belongs.
47 @param Handle The pointer for identifying the table.
48
49 @retval EFI_SUCCESS The function completed successfully.
50 @retval EFI_NOT_FOUND The requested index is too large and a table was not found.
51
52 **/
53 typedef
54 EFI_STATUS
55 (EFIAPI *EFI_ACPI_GET_ACPI_TABLE)(
56 IN EFI_ACPI_SUPPORT_PROTOCOL *This,
57 IN INTN Index,
58 OUT VOID **Table,
59 OUT EFI_ACPI_TABLE_VERSION *Version,
60 OUT UINTN *Handle
61 );
62
63 /**
64 Used to add, remove, or update ACPI tables.
65
66 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
67 @param Table The pointer to the new table to add or update.
68 @param Checksum If TRUE, indicates that the checksum should be
69 calculated for this table.
70 @param Version Indicates to which version(s) of ACPI the table should be added.
71 @param Handle The pointer to the handle of the table to remove or update.
72
73 @retval EFI_SUCCESS The function completed successfully.
74 @retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.
75 @retval EFI_ABORTED Could not complete the desired action.
76
77 **/
78 typedef
79 EFI_STATUS
80 (EFIAPI *EFI_ACPI_SET_ACPI_TABLE)(
81 IN EFI_ACPI_SUPPORT_PROTOCOL *This,
82 IN VOID *Table OPTIONAL,
83 IN BOOLEAN Checksum,
84 IN EFI_ACPI_TABLE_VERSION Version,
85 IN OUT UINTN *Handle
86 );
87
88 /**
89 Causes one or more versions of the ACPI tables to be published in
90 the EFI system configuration tables.
91
92 The PublishTables() function installs the ACPI tables for the versions that are specified in
93 Version. No tables are published for Version equal to EFI_ACPI_VERSION_NONE. Once
94 published, tables will continue to be updated as tables are modified with
95 EFI_ACPI_SUPPORT_PROTOCOL.SetAcpiTable().
96
97 @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.
98 @param Version Indicates to which version(s) of ACPI the table should be published.
99
100 @retval EFI_SUCCESS The function completed successfully.
101 @retval EFI_ABORTED An error occurred and the function could not complete successfully.
102
103 **/
104 typedef
105 EFI_STATUS
106 (EFIAPI *EFI_ACPI_PUBLISH_TABLES)(
107 IN EFI_ACPI_SUPPORT_PROTOCOL *This,
108 IN EFI_ACPI_TABLE_VERSION Version
109 );
110
111 //
112 // ACPI Support Protocol
113 //
114 /**
115 This protocol provides some basic services to support publishing ACPI system
116 tables. The services handle many of the more mundane tasks that are required
117 to publish a set of tables.
118 **/
119 struct _EFI_ACPI_SUPPORT_PROTOCOL {
120 ///
121 /// Returns a table specified by an index if it exists.
122 ///
123 EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;
124
125 ///
126 /// Adds, removes, or updates ACPI tables.
127 ///
128 EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;
129
130 ///
131 /// Publishes the ACPI tables.
132 ///
133 EFI_ACPI_PUBLISH_TABLES PublishTables;
134 };
135
136 //
137 // Extern the GUID for protocol users.
138 //
139 extern EFI_GUID gEfiAcpiSupportProtocolGuid;
140
141 #endif
142