]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This protocol provides some basic services to support publishing ACPI system tables. The\r | |
3 | services handle many of the more mundane tasks that are required to publish a set of tables. The\r | |
4 | services will:\r | |
5 | - Generate common tables.\r | |
6 | - Update the table links.\r | |
7 | - Ensure that tables are properly aligned and use correct types of memory.\r | |
8 | - Update checksum values and IDs.\r | |
9 | - Complete the final installation of the tables.\r | |
10 | \r | |
11 | Copyright (c) 2007, Intel Corporation\r | |
12 | All rights reserved. This program and the accompanying materials\r | |
13 | are licensed and made available under the terms and conditions of the BSD License\r | |
14 | which accompanies this distribution. The full text of the license may be found at\r | |
15 | http://opensource.org/licenses/bsd-license.php\r | |
16 | \r | |
17 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
18 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
19 | \r | |
20 | @par Revision Reference:\r | |
21 | This Protocol is defined in Framework ACPI Specification.\r | |
22 | Version 0.9.\r | |
23 | \r | |
24 | **/\r | |
25 | \r | |
26 | #ifndef _ACPI_SUPPORT_PROTOCOL_H_\r | |
27 | #define _ACPI_SUPPORT_PROTOCOL_H_\r | |
28 | \r | |
29 | #include <Protocol/AcpiSystemDescriptionTable.h>\r | |
30 | \r | |
31 | typedef struct _EFI_ACPI_SUPPORT_PROTOCOL EFI_ACPI_SUPPORT_PROTOCOL;\r | |
32 | \r | |
33 | //\r | |
34 | // ACPI Support Protocol GUID\r | |
35 | //\r | |
36 | #define EFI_ACPI_SUPPORT_GUID \\r | |
37 | { \\r | |
38 | 0xdbff9d55, 0x89b7, 0x46da, {0xbd, 0xdf, 0x67, 0x7d, 0x3d, 0xc0, 0x24, 0x1d } \\r | |
39 | }\r | |
40 | \r | |
41 | \r | |
42 | //\r | |
43 | // Protocol Member Functions\r | |
44 | //\r | |
45 | \r | |
46 | /**\r | |
47 | Returns a requested ACPI table.\r | |
48 | \r | |
49 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r | |
50 | @param Index The zero-based index of the table to retrieve.\r | |
51 | @param Table Pointer for returning the table buffer.\r | |
52 | @param Version Updated with the ACPI versions to which this table belongs.\r | |
53 | @param Handle Pointer for identifying the table.\r | |
54 | \r | |
55 | @retval EFI_SUCCESS The function completed successfully.\r | |
56 | @retval EFI_NOT_FOUND The requested index is too large and a table was not found.\r | |
57 | \r | |
58 | **/\r | |
59 | typedef\r | |
60 | EFI_STATUS\r | |
61 | (EFIAPI *EFI_ACPI_GET_ACPI_TABLE)(\r | |
62 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r | |
63 | IN INTN Index,\r | |
64 | OUT VOID **Table,\r | |
65 | OUT EFI_ACPI_TABLE_VERSION *Version,\r | |
66 | OUT UINTN *Handle\r | |
67 | );\r | |
68 | \r | |
69 | /**\r | |
70 | Used to add, remove, or update ACPI tables.\r | |
71 | \r | |
72 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r | |
73 | @param Table Pointer to the new table to add or update.\r | |
74 | @param Checksum If TRUE, indicates that the checksum should be\r | |
75 | calculated for this table.\r | |
76 | @param Version Indicates to which version(s) of ACPI the table should be added.\r | |
77 | @param Handle Pointer to the handle of the table to remove or update.\r | |
78 | \r | |
79 | @retval EFI_SUCCESS The function completed successfully.\r | |
80 | @retval EFI_INVALID_PARAMETER *Handle was zero and Table was NULL.\r | |
81 | @retval EFI_ABORTED Could not complete the desired action.\r | |
82 | \r | |
83 | **/\r | |
84 | typedef\r | |
85 | EFI_STATUS\r | |
86 | (EFIAPI *EFI_ACPI_SET_ACPI_TABLE)(\r | |
87 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r | |
88 | IN VOID *Table OPTIONAL,\r | |
89 | IN BOOLEAN Checksum,\r | |
90 | IN EFI_ACPI_TABLE_VERSION Version,\r | |
91 | IN OUT UINTN *Handle\r | |
92 | );\r | |
93 | \r | |
94 | /**\r | |
95 | Causes one or more versions of the ACPI tables to be published in\r | |
96 | the EFI system configuration tables.\r | |
97 | \r | |
98 | The PublishTables() function installs the ACPI tables for the versions that are specified in \r | |
99 | Version. No tables are published for Version equal to EFI_ACPI_VERSION_NONE. Once \r | |
100 | published, tables will continue to be updated as tables are modified with \r | |
101 | EFI_ACPI_SUPPORT_PROTOCOL.SetAcpiTable(). \r | |
102 | \r | |
103 | @param This A pointer to the EFI_ACPI_SUPPORT_PROTOCOL instance.\r | |
104 | @param Version Indicates to which version(s) of ACPI the table should be published.\r | |
105 | \r | |
106 | @retval EFI_SUCCESS The function completed successfully.\r | |
107 | @retval EFI_ABORTED An error occurred and the function could not complete successfully.\r | |
108 | \r | |
109 | **/\r | |
110 | typedef\r | |
111 | EFI_STATUS\r | |
112 | (EFIAPI *EFI_ACPI_PUBLISH_TABLES)(\r | |
113 | IN EFI_ACPI_SUPPORT_PROTOCOL *This,\r | |
114 | IN EFI_ACPI_TABLE_VERSION Version\r | |
115 | );\r | |
116 | \r | |
117 | //\r | |
118 | // ACPI Support Protocol\r | |
119 | //\r | |
120 | /**\r | |
121 | This protocol provides some basic services to support publishing ACPI system\r | |
122 | tables. The services handle many of the more mundane tasks that are required\r | |
123 | to publish a set of tables.\r | |
124 | **/\r | |
125 | struct _EFI_ACPI_SUPPORT_PROTOCOL {\r | |
126 | ///\r | |
127 | /// Returns a table specified by an index if it exists.\r | |
128 | ///\r | |
129 | EFI_ACPI_GET_ACPI_TABLE GetAcpiTable;\r | |
130 | \r | |
131 | ///\r | |
132 | /// Adds, removes, or updates ACPI tables\r | |
133 | ///\r | |
134 | EFI_ACPI_SET_ACPI_TABLE SetAcpiTable;\r | |
135 | \r | |
136 | ///\r | |
137 | /// Publishes the ACPI tables.\r | |
138 | ///\r | |
139 | EFI_ACPI_PUBLISH_TABLES PublishTables;\r | |
140 | };\r | |
141 | \r | |
142 | //\r | |
143 | // Extern the GUID for protocol users.\r | |
144 | //\r | |
145 | extern EFI_GUID gEfiAcpiSupportProtocolGuid;\r | |
146 | \r | |
147 | #endif\r | |
148 | \r |