You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AcpiTable.h 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /** @file
  2. The file provides the protocol to install or remove an ACPI
  3. table from a platform.
  4. Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
  5. This program and the accompanying materials
  6. are licensed and made available under the terms and conditions of the BSD License
  7. which accompanies this distribution. The full text of the license may be found at
  8. http://opensource.org/licenses/bsd-license.php
  9. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  11. **/
  12. #ifndef __ACPI_TABLE_H___
  13. #define __ACPI_TABLE_H___
  14. FILE_LICENCE ( BSD3 );
  15. #define EFI_ACPI_TABLE_PROTOCOL_GUID \
  16. { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }}
  17. typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL;
  18. /**
  19. The InstallAcpiTable() function allows a caller to install an
  20. ACPI table. When successful, the table will be linked by the
  21. RSDT/XSDT. AcpiTableBuffer specifies the table to be installed.
  22. InstallAcpiTable() will make a copy of the table and insert the
  23. copy into the RSDT/XSDT. InstallAcpiTable() must insert the new
  24. table at the end of the RSDT/XSDT. To prevent namespace
  25. collision, ACPI tables may be created using UEFI ACPI table
  26. format. If this protocol is used to install a table with a
  27. signature already present in the system, the new table will not
  28. replace the existing table. It is a platform implementation
  29. decision to add a new table with a signature matching an
  30. existing table or disallow duplicate table signatures and
  31. return EFI_ACCESS_DENIED. On successful output, TableKey is
  32. initialized with a unique key. Its value may be used in a
  33. subsequent call to UninstallAcpiTable to remove an ACPI table.
  34. If an EFI application is running at the time of this call, the
  35. relevant EFI_CONFIGURATION_TABLE pointer to the RSDT is no
  36. longer considered valid.
  37. @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.
  38. @param AcpiTableBuffer A pointer to a buffer containing the
  39. ACPI table to be installed.
  40. @param AcpiTableBufferSize Specifies the size, in bytes, of
  41. the AcpiTableBuffer buffer.
  42. @param TableKey Returns a key to refer to the ACPI table.
  43. @retval EFI_SUCCESS The table was successfully inserted
  44. @retval EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL,
  45. TableKey is NULL, or
  46. AcpiTableBufferSize and the size
  47. field embedded in the ACPI table
  48. pointed to by AcpiTableBuffer
  49. are not in sync.
  50. @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to
  51. complete the request.
  52. @retval EFI_ACCESS_DENIED The table signature matches a table already
  53. present in the system and platform policy
  54. does not allow duplicate tables of this type.
  55. **/
  56. typedef
  57. EFI_STATUS
  58. (EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE)(
  59. IN EFI_ACPI_TABLE_PROTOCOL *This,
  60. IN VOID *AcpiTableBuffer,
  61. IN UINTN AcpiTableBufferSize,
  62. OUT UINTN *TableKey
  63. );
  64. /**
  65. The UninstallAcpiTable() function allows a caller to remove an
  66. ACPI table. The routine will remove its reference from the
  67. RSDT/XSDT. A table is referenced by the TableKey parameter
  68. returned from a prior call to InstallAcpiTable(). If an EFI
  69. application is running at the time of this call, the relevant
  70. EFI_CONFIGURATION_TABLE pointer to the RSDT is no longer
  71. considered valid.
  72. @param This A pointer to a EFI_ACPI_TABLE_PROTOCOL.
  73. @param TableKey Specifies the table to uninstall. The key was
  74. returned from InstallAcpiTable().
  75. @retval EFI_SUCCESS The table was successfully inserted
  76. @retval EFI_NOT_FOUND TableKey does not refer to a valid key
  77. for a table entry.
  78. @retval EFI_OUT_OF_RESOURCES Insufficient resources exist to
  79. complete the request.
  80. **/
  81. typedef
  82. EFI_STATUS
  83. (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)(
  84. IN EFI_ACPI_TABLE_PROTOCOL *This,
  85. IN UINTN TableKey
  86. );
  87. ///
  88. /// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component
  89. /// to install and uninstall ACPI tables from a platform.
  90. ///
  91. struct _EFI_ACPI_TABLE_PROTOCOL {
  92. EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;
  93. EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
  94. };
  95. extern EFI_GUID gEfiAcpiTableProtocolGuid;
  96. #endif