iPXE
AcpiTable.h
Go to the documentation of this file.
00001 /** @file
00002   The file provides the protocol to install or remove an ACPI
00003   table from a platform.
00004 
00005   Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
00006   This program and the accompanying materials
00007   are licensed and made available under the terms and conditions of the BSD License
00008   which accompanies this distribution.  The full text of the license may be found at
00009   http://opensource.org/licenses/bsd-license.php
00010 
00011   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00013 
00014 **/
00015 
00016 #ifndef __ACPI_TABLE_H___
00017 #define __ACPI_TABLE_H___
00018 
00019 FILE_LICENCE ( BSD3 );
00020 
00021 #define EFI_ACPI_TABLE_PROTOCOL_GUID \
00022   { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}
00023 
00024 
00025 typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;
00026 
00027 /**
00028 
00029   The InstallAcpiTable() function allows a caller to install an
00030   ACPI table. When successful, the table will be linked by the
00031   RSDT/XSDT. AcpiTableBuffer specifies the table to be installed.
00032   InstallAcpiTable() will make a copy of the table and insert the
00033   copy into the RSDT/XSDT. InstallAcpiTable() must insert the new
00034   table at the end of the RSDT/XSDT. To prevent namespace
00035   collision, ACPI tables may be created using UEFI ACPI table
00036   format. If this protocol is used to install a table with a
00037   signature already present in the system, the new table will not
00038   replace the existing table. It is a platform implementation
00039   decision to add a new table with a signature matching an
00040   existing table or disallow duplicate table signatures and
00041   return EFI_ACCESS_DENIED. On successful output, TableKey is
00042   initialized with a unique key. Its value may be used in a
00043   subsequent call to UninstallAcpiTable to remove an ACPI table.
00044   If an EFI application is running at the time of this call, the
00045   relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no
00046   longer considered valid.
00047 
00048 
00049   @param This                 A pointer to a EFI_ACPI_TABLE_PROTOCOL.
00050 
00051   @param AcpiTableBuffer      A pointer to a buffer containing the
00052                               ACPI table to be installed.
00053 
00054   @param AcpiTableBufferSize  Specifies the size, in bytes, of
00055                               the AcpiTableBuffer buffer.
00056 
00057 
00058   @param TableKey             Returns a key to refer to the ACPI table.
00059 
00060   @retval EFI_SUCCESS           The table was successfully inserted
00061 
00062   @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,
00063                                 TableKey is NULL, or
00064                                 AcpiTableBufferSize and the size
00065                                 field embedded in the ACPI table
00066                                 pointed to by AcpiTableBuffer
00067                                 are not in sync.
00068 
00069   @retval EFI_OUT_OF_RESOURCES  Insufficient resources exist to
00070                                 complete the request.
00071   @retval EFI_ACCESS_DENIED     The table signature matches a table already
00072                                 present in the system and platform policy
00073                                 does not allow duplicate tables of this type.
00074 
00075 **/
00076 typedef
00077 EFI_STATUS
00078 (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(
00079   IN   EFI_ACPI_TABLE_PROTOCOL       *This,
00080   IN   VOID                          *AcpiTableBuffer,
00081   IN   UINTN                         AcpiTableBufferSize,
00082   OUT  UINTN                         *TableKey
00083 );
00084 
00085 
00086 /**
00087 
00088   The UninstallAcpiTable() function allows a caller to remove an
00089   ACPI table. The routine will remove its reference from the
00090   RSDT/XSDT. A table is referenced by the TableKey parameter
00091   returned from a prior call to InstallAcpiTable(). If an EFI
00092   application is running at the time of this call, the relevant
00093   EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer
00094   considered valid.
00095 
00096   @param This                   A pointer to a EFI_ACPI_TABLE_PROTOCOL.
00097 
00098   @param TableKey               Specifies the table to uninstall. The key was
00099                                 returned from InstallAcpiTable().
00100 
00101   @retval EFI_SUCCESS           The table was successfully inserted
00102 
00103   @retval EFI_NOT_FOUND         TableKey does not refer to a valid key
00104                                 for a table entry.
00105 
00106   @retval EFI_OUT_OF_RESOURCES  Insufficient resources exist to
00107                                 complete the request.
00108 
00109 **/
00110 typedef
00111 EFI_STATUS
00112 (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(
00113   IN  EFI_ACPI_TABLE_PROTOCOL       *This,
00114   IN  UINTN                         TableKey
00115 );
00116 
00117 ///
00118 /// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component
00119 /// to install and uninstall ACPI tables from a platform.
00120 ///
00121 struct _EFI_ACPI_TABLE_PROTOCOL {
00122   EFI_ACPI_TABLE_INSTALL_ACPI_TABLE   InstallAcpiTable;
00123   EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
00124 };
00125 
00126 extern EFI_GUID gEfiAcpiTableProtocolGuid;
00127 
00128 #endif
00129