]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AcpiTable.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[mirror_edk2.git] / MdePkg / Include / Protocol / AcpiTable.h
CommitLineData
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
5966402e 5 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
9df063a0 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
23typedef 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
5966402e
SZ
34 format. If this protocol is used to install a table with a\r
35 signature already present in the system, the new table will not\r
36 replace the existing table. It is a platform implementation\r
37 decision to add a new table with a signature matching an\r
38 existing table or disallow duplicate table signatures and\r
39 return EFI_ACCESS_DENIED. On successful output, TableKey is \r
d1f95000 40 initialized with a unique key. Its value may be used in a \r
41 subsequent call to UninstallAcpiTable to remove an ACPI table. \r
42 If an EFI application is running at the time of this call, the \r
43 relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no \r
44 longer considered valid. \r
45\r
46\r
4ca9b6c4 47 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
d1f95000 48\r
4ca9b6c4
LG
49 @param AcpiTableBuffer A pointer to a buffer containing the\r
50 ACPI table to be installed.\r
d1f95000 51\r
52 @param AcpiTableBufferSize Specifies the size, in bytes, of\r
53 the AcpiTableBuffer buffer.\r
54\r
55\r
4ca9b6c4 56 @param TableKey Returns a key to refer to the ACPI table.\r
d1f95000 57 \r
4ca9b6c4 58 @retval EFI_SUCCESS The table was successfully inserted\r
d1f95000 59 \r
60 @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,\r
61 TableKey is NULL, or\r
62 AcpiTableBufferSize and the size\r
63 field embedded in the ACPI table\r
64 pointed to by AcpiTableBuffer\r
65 are not in sync.\r
66 \r
67 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r
68 complete the request.\r
5966402e
SZ
69 @retval EFI_ACCESS_DENIED The table signature matches a table already\r
70 present in the system and platform policy\r
71 does not allow duplicate tables of this type.\r
72\r
d1f95000 73**/\r
74typedef\r
75EFI_STATUS\r
8b13229b 76(EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(\r
71f60807 77 IN EFI_ACPI_TABLE_PROTOCOL *This,\r
78 IN VOID *AcpiTableBuffer,\r
8ad603fe 79 IN UINTN AcpiTableBufferSize,\r
80 OUT UINTN *TableKey\r
d1f95000 81);\r
82\r
83\r
84/**\r
85 \r
86 The UninstallAcpiTable() function allows a caller to remove an\r
87 ACPI table. The routine will remove its reference from the\r
88 RSDT/XSDT. A table is referenced by the TableKey parameter\r
89 returned from a prior call to InstallAcpiTable(). If an EFI\r
90 application is running at the time of this call, the relevant\r
91 EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer\r
92 considered valid.\r
93\r
4ca9b6c4 94 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
d1f95000 95\r
4ca9b6c4
LG
96 @param TableKey Specifies the table to uninstall. The key was\r
97 returned from InstallAcpiTable().\r
d1f95000 98\r
4ca9b6c4 99 @retval EFI_SUCCESS The table was successfully inserted\r
d1f95000 100\r
4ca9b6c4
LG
101 @retval EFI_NOT_FOUND TableKey does not refer to a valid key\r
102 for a table entry.\r
d1f95000 103\r
104 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r
105 complete the request.\r
106 \r
107**/\r
108typedef\r
109EFI_STATUS\r
8b13229b 110(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(\r
71f60807 111 IN EFI_ACPI_TABLE_PROTOCOL *This,\r
112 IN UINTN TableKey\r
d1f95000 113);\r
114\r
44717a39 115///\r
116/// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component\r
117/// to install and uninstall ACPI tables from a platform.\r
118///\r
d1f95000 119struct _EFI_ACPI_TABLE_PROTOCOL {\r
120 EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;\r
121 EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;\r
122};\r
123\r
124extern EFI_GUID gEfiAcpiTableProtocolGuid;\r
125\r
126#endif\r
127\r