]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | The file provides the protocol to install or remove an ACPI\r | |
3 | table from a platform. \r | |
4 | \r | |
9df063a0 HT |
5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
6 | This program and the accompanying materials \r | |
d1f95000 | 7 | are licensed and made available under the terms and conditions of the BSD License \r |
8 | which accompanies this distribution. The full text of the license may be found at \r | |
9 | http://opensource.org/licenses/bsd-license.php \r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
13 | \r | |
d1f95000 | 14 | **/\r |
15 | \r | |
16 | #ifndef __ACPI_TABLE_H___\r | |
17 | #define __ACPI_TABLE_H___\r | |
18 | \r | |
19 | #define EFI_ACPI_TABLE_PROTOCOL_GUID \\r | |
20 | { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}\r | |
21 | \r | |
22 | \r | |
23 | typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;\r | |
24 | \r | |
25 | /**\r | |
26 | \r | |
27 | The InstallAcpiTable() function allows a caller to install an \r | |
28 | ACPI table. When successful, the table will be linked by the \r | |
29 | RSDT/XSDT. AcpiTableBuffer specifies the table to be installed. \r | |
30 | InstallAcpiTable() will make a copy of the table and insert the \r | |
31 | copy into the RSDT/XSDT. InstallAcpiTable() must insert the new \r | |
32 | table at the end of the RSDT/XSDT. To prevent namespace \r | |
33 | collision, ACPI tables may be created using UEFI ACPI table \r | |
f1004231 | 34 | format. On successful output, TableKey is \r |
d1f95000 | 35 | initialized with a unique key. Its value may be used in a \r |
36 | subsequent call to UninstallAcpiTable to remove an ACPI table. \r | |
37 | If an EFI application is running at the time of this call, the \r | |
38 | relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no \r | |
39 | longer considered valid. \r | |
40 | \r | |
41 | \r | |
4ca9b6c4 | 42 | @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r |
d1f95000 | 43 | \r |
4ca9b6c4 LG |
44 | @param AcpiTableBuffer A pointer to a buffer containing the\r |
45 | ACPI table to be installed.\r | |
d1f95000 | 46 | \r |
47 | @param AcpiTableBufferSize Specifies the size, in bytes, of\r | |
48 | the AcpiTableBuffer buffer.\r | |
49 | \r | |
50 | \r | |
4ca9b6c4 | 51 | @param TableKey Returns a key to refer to the ACPI table.\r |
d1f95000 | 52 | \r |
4ca9b6c4 | 53 | @retval EFI_SUCCESS The table was successfully inserted\r |
d1f95000 | 54 | \r |
55 | @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,\r | |
56 | TableKey is NULL, or\r | |
57 | AcpiTableBufferSize and the size\r | |
58 | field embedded in the ACPI table\r | |
59 | pointed to by AcpiTableBuffer\r | |
60 | are not in sync.\r | |
61 | \r | |
62 | @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r | |
63 | complete the request.\r | |
64 | \r | |
65 | **/\r | |
66 | typedef\r | |
67 | EFI_STATUS\r | |
8b13229b | 68 | (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(\r |
8ad603fe | 69 | IN CONST EFI_ACPI_TABLE_PROTOCOL *This,\r |
70 | IN CONST VOID *AcpiTableBuffer,\r | |
71 | IN UINTN AcpiTableBufferSize,\r | |
72 | OUT UINTN *TableKey\r | |
d1f95000 | 73 | );\r |
74 | \r | |
75 | \r | |
76 | /**\r | |
77 | \r | |
78 | The UninstallAcpiTable() function allows a caller to remove an\r | |
79 | ACPI table. The routine will remove its reference from the\r | |
80 | RSDT/XSDT. A table is referenced by the TableKey parameter\r | |
81 | returned from a prior call to InstallAcpiTable(). If an EFI\r | |
82 | application is running at the time of this call, the relevant\r | |
83 | EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer\r | |
84 | considered valid.\r | |
85 | \r | |
4ca9b6c4 | 86 | @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r |
d1f95000 | 87 | \r |
4ca9b6c4 LG |
88 | @param TableKey Specifies the table to uninstall. The key was\r |
89 | returned from InstallAcpiTable().\r | |
d1f95000 | 90 | \r |
4ca9b6c4 | 91 | @retval EFI_SUCCESS The table was successfully inserted\r |
d1f95000 | 92 | \r |
4ca9b6c4 LG |
93 | @retval EFI_NOT_FOUND TableKey does not refer to a valid key\r |
94 | for a table entry.\r | |
d1f95000 | 95 | \r |
96 | @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r | |
97 | complete the request.\r | |
98 | \r | |
99 | **/\r | |
100 | typedef\r | |
101 | EFI_STATUS\r | |
8b13229b | 102 | (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(\r |
8ad603fe | 103 | IN CONST EFI_ACPI_TABLE_PROTOCOL *This,\r |
104 | IN UINTN TableKey\r | |
d1f95000 | 105 | );\r |
106 | \r | |
44717a39 | 107 | ///\r |
108 | /// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component\r | |
109 | /// to install and uninstall ACPI tables from a platform.\r | |
110 | ///\r | |
d1f95000 | 111 | struct _EFI_ACPI_TABLE_PROTOCOL {\r |
112 | EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;\r | |
113 | EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;\r | |
114 | };\r | |
115 | \r | |
116 | extern EFI_GUID gEfiAcpiTableProtocolGuid;\r | |
117 | \r | |
118 | #endif\r | |
119 | \r |