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