]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/AcpiTable.h
Checked in the Protocols introduced in UEFI/PI.
[mirror_edk2.git] / MdePkg / Include / Protocol / AcpiTable.h
diff --git a/MdePkg/Include/Protocol/AcpiTable.h b/MdePkg/Include/Protocol/AcpiTable.h
new file mode 100644 (file)
index 0000000..b1335ef
--- /dev/null
@@ -0,0 +1,129 @@
+/** @file\r
+  The file provides the protocol to install or remove an ACPI\r
+  table from a platform. \r
+  \r
+  Copyright (c) 2006 - 2007, Intel Corporation\r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+  Module Name: AcpiTable.h\r
+\r
+**/\r
+\r
+#ifndef __ACPI_TABLE_H___\r
+#define __ACPI_TABLE_H___\r
+\r
+#define EFI_ACPI_TABLE_PROTOCOL_GUID \\r
+  { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}\r
+\r
+\r
+typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;\r
+\r
+/**\r
+\r
+  The InstallAcpiTable() function allows a caller to install an   \r
+  ACPI table. When successful, the table will be linked by the   \r
+  RSDT/XSDT. AcpiTableBuffer specifies the table to be installed.   \r
+  InstallAcpiTable() will make a copy of the table and insert the   \r
+  copy into the RSDT/XSDT. InstallAcpiTable() must insert the new   \r
+  table at the end of the RSDT/XSDT. To prevent namespace   \r
+  collision, ACPI tables may be created using UEFI ACPI table   \r
+  format. See Appendix O. On successful output, TableKey is   \r
+  initialized with a unique key. Its value may be used in a   \r
+  subsequent call to UninstallAcpiTable to remove an ACPI table.   \r
+  If an EFI application is running at the time of this call, the   \r
+  relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no   \r
+  longer considered valid.   \r
+\r
+\r
+  @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
+\r
+  @param AcpiTableBuffer  A pointer to a buffer containing the\r
+                          ACPI table to be installed.\r
+\r
+  @param AcpiTableBufferSize  Specifies the size, in bytes, of\r
+                              the AcpiTableBuffer buffer.\r
+\r
+\r
+  @param TableKey   Returns a key to refer to the ACPI table.\r
+  \r
+  @retval EFI_SUCCESS The table was successfully inserted\r
+  \r
+  @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,\r
+                                TableKey is NULL, or\r
+                                AcpiTableBufferSize and the size\r
+                                field embedded in the ACPI table\r
+                                pointed to by AcpiTableBuffer\r
+                                are not in sync.\r
+  \r
+  @retval EFI_OUT_OF_RESOURCES  Insufficient resources exist to\r
+                                complete the request.\r
+  \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE) (\r
+  IN CONST  EFI_ACPI_TABLE_PROTOCOL *This,\r
+  IN CONST  VOID                    *AcpiTableBuffer,\r
+  IN CONST  UINTN                   AcpiTableBufferSize,\r
+  OUT       UINTN                   *TableKey\r
+);\r
+\r
+\r
+/**\r
+  \r
+  The UninstallAcpiTable() function allows a caller to remove an\r
+  ACPI table. The routine will remove its reference from the\r
+  RSDT/XSDT. A table is referenced by the TableKey parameter\r
+  returned from a prior call to InstallAcpiTable(). If an EFI\r
+  application is running at the time of this call, the relevant\r
+  EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer\r
+  considered valid.\r
+\r
+  @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.\r
+\r
+  @param TableKey Specifies the table to uninstall. The key was\r
+                  returned from InstallAcpiTable().\r
+\r
+  @retval EFI_SUCCESS The table was successfully inserted\r
+\r
+  @retval EFI_NOT_FOUND TableKey does not refer to a valid key\r
+                        for a table entry.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  Insufficient resources exist to\r
+                                complete the request.\r
+  \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE) (\r
+  IN CONST  EFI_ACPI_TABLE_PROTOCOL *This,\r
+  IN CONST  UINTN                   TableKey\r
+);\r
+\r
+/**\r
+  The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component\r
+  to install and uninstall ACPI tables from a platform.\r
+\r
+\r
+  @param InstallAcpiTable Installs an ACPI table into the\r
+                          system.\r
+\r
+  @param UninstallAcpiTable Removes a previously installed ACPI\r
+                            table from the system.\r
+\r
+**/   \r
+struct _EFI_ACPI_TABLE_PROTOCOL {\r
+  EFI_ACPI_TABLE_INSTALL_ACPI_TABLE   InstallAcpiTable;\r
+  EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;\r
+};\r
+\r
+extern EFI_GUID gEfiAcpiTableProtocolGuid;\r
+\r
+#endif\r
+\r