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