]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AcpiTable.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[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
9095d37b 3 table from a platform.\r
d1f95000 4\r
9095d37b
LG
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
6 This program and the accompanying materials\r
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
d1f95000 13\r
497a5fb1
SZ
14 @par Revision Reference:\r
15 This Protocol was introduced in UEFI Specification 2.3.\r
16\r
d1f95000 17**/\r
18\r
19#ifndef __ACPI_TABLE_H___\r
20#define __ACPI_TABLE_H___\r
21\r
22#define EFI_ACPI_TABLE_PROTOCOL_GUID \\r
23 { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}\r
24\r
25\r
26typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;\r
27\r
28/**\r
29\r
9095d37b
LG
30 The InstallAcpiTable() function allows a caller to install an\r
31 ACPI table. When successful, the table will be linked by the\r
32 RSDT/XSDT. AcpiTableBuffer specifies the table to be installed.\r
33 InstallAcpiTable() will make a copy of the table and insert the\r
34 copy into the RSDT/XSDT. InstallAcpiTable() must insert the new\r
35 table at the end of the RSDT/XSDT. To prevent namespace\r
36 collision, ACPI tables may be created using UEFI ACPI table\r
5966402e
SZ
37 format. If this protocol is used to install a table with a\r
38 signature already present in the system, the new table will not\r
39 replace the existing table. It is a platform implementation\r
40 decision to add a new table with a signature matching an\r
41 existing table or disallow duplicate table signatures and\r
9095d37b
LG
42 return EFI_ACCESS_DENIED. On successful output, TableKey is\r
43 initialized with a unique key. Its value may be used in a\r
44 subsequent call to UninstallAcpiTable to remove an ACPI table.\r
45 If an EFI application is running at the time of this call, the\r
46 relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no\r
47 longer considered valid.\r
d1f95000 48\r
49\r
4ca9b6c4 50 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
d1f95000 51\r
4ca9b6c4
LG
52 @param AcpiTableBuffer A pointer to a buffer containing the\r
53 ACPI table to be installed.\r
d1f95000 54\r
55 @param AcpiTableBufferSize Specifies the size, in bytes, of\r
56 the AcpiTableBuffer buffer.\r
57\r
58\r
4ca9b6c4 59 @param TableKey Returns a key to refer to the ACPI table.\r
9095d37b 60\r
4ca9b6c4 61 @retval EFI_SUCCESS The table was successfully inserted\r
9095d37b 62\r
d1f95000 63 @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,\r
64 TableKey is NULL, or\r
65 AcpiTableBufferSize and the size\r
66 field embedded in the ACPI table\r
67 pointed to by AcpiTableBuffer\r
68 are not in sync.\r
9095d37b 69\r
d1f95000 70 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r
71 complete the request.\r
5966402e
SZ
72 @retval EFI_ACCESS_DENIED The table signature matches a table already\r
73 present in the system and platform policy\r
74 does not allow duplicate tables of this type.\r
75\r
d1f95000 76**/\r
77typedef\r
78EFI_STATUS\r
8b13229b 79(EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(\r
71f60807 80 IN EFI_ACPI_TABLE_PROTOCOL *This,\r
81 IN VOID *AcpiTableBuffer,\r
8ad603fe 82 IN UINTN AcpiTableBufferSize,\r
83 OUT UINTN *TableKey\r
d1f95000 84);\r
85\r
86\r
87/**\r
9095d37b 88\r
d1f95000 89 The UninstallAcpiTable() function allows a caller to remove an\r
90 ACPI table. The routine will remove its reference from the\r
91 RSDT/XSDT. A table is referenced by the TableKey parameter\r
92 returned from a prior call to InstallAcpiTable(). If an EFI\r
93 application is running at the time of this call, the relevant\r
94 EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer\r
95 considered valid.\r
96\r
4ca9b6c4 97 @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
d1f95000 98\r
4ca9b6c4
LG
99 @param TableKey Specifies the table to uninstall. The key was\r
100 returned from InstallAcpiTable().\r
d1f95000 101\r
4ca9b6c4 102 @retval EFI_SUCCESS The table was successfully inserted\r
d1f95000 103\r
4ca9b6c4
LG
104 @retval EFI_NOT_FOUND TableKey does not refer to a valid key\r
105 for a table entry.\r
d1f95000 106\r
107 @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to\r
108 complete the request.\r
9095d37b 109\r
d1f95000 110**/\r
111typedef\r
112EFI_STATUS\r
8b13229b 113(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(\r
71f60807 114 IN EFI_ACPI_TABLE_PROTOCOL *This,\r
115 IN UINTN TableKey\r
d1f95000 116);\r
117\r
44717a39 118///\r
119/// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component\r
120/// to install and uninstall ACPI tables from a platform.\r
121///\r
d1f95000 122struct _EFI_ACPI_TABLE_PROTOCOL {\r
123 EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;\r
124 EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;\r
125};\r
126\r
127extern EFI_GUID gEfiAcpiTableProtocolGuid;\r
128\r
129#endif\r
130\r