actables.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. /******************************************************************************
  2. *
  3. * Name: actables.h - ACPI table management
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACTABLES_H__
  43. #define __ACTABLES_H__
  44. ACPI_STATUS
  45. AcpiAllocateRootTable (
  46. UINT32 InitialTableCount);
  47. /*
  48. * tbxfroot - Root pointer utilities
  49. */
  50. UINT32
  51. AcpiTbGetRsdpLength (
  52. ACPI_TABLE_RSDP *Rsdp);
  53. ACPI_STATUS
  54. AcpiTbValidateRsdp (
  55. ACPI_TABLE_RSDP *Rsdp);
  56. UINT8 *
  57. AcpiTbScanMemoryForRsdp (
  58. UINT8 *StartAddress,
  59. UINT32 Length);
  60. /*
  61. * tbdata - table data structure management
  62. */
  63. ACPI_STATUS
  64. AcpiTbGetNextTableDescriptor (
  65. UINT32 *TableIndex,
  66. ACPI_TABLE_DESC **TableDesc);
  67. void
  68. AcpiTbInitTableDescriptor (
  69. ACPI_TABLE_DESC *TableDesc,
  70. ACPI_PHYSICAL_ADDRESS Address,
  71. UINT8 Flags,
  72. ACPI_TABLE_HEADER *Table);
  73. ACPI_STATUS
  74. AcpiTbAcquireTempTable (
  75. ACPI_TABLE_DESC *TableDesc,
  76. ACPI_PHYSICAL_ADDRESS Address,
  77. UINT8 Flags);
  78. void
  79. AcpiTbReleaseTempTable (
  80. ACPI_TABLE_DESC *TableDesc);
  81. ACPI_STATUS
  82. AcpiTbValidateTempTable (
  83. ACPI_TABLE_DESC *TableDesc);
  84. ACPI_STATUS
  85. AcpiTbVerifyTempTable (
  86. ACPI_TABLE_DESC *TableDesc,
  87. char *Signature);
  88. BOOLEAN
  89. AcpiTbIsTableLoaded (
  90. UINT32 TableIndex);
  91. void
  92. AcpiTbSetTableLoadedFlag (
  93. UINT32 TableIndex,
  94. BOOLEAN IsLoaded);
  95. /*
  96. * tbfadt - FADT parse/convert/validate
  97. */
  98. void
  99. AcpiTbParseFadt (
  100. void);
  101. void
  102. AcpiTbCreateLocalFadt (
  103. ACPI_TABLE_HEADER *Table,
  104. UINT32 Length);
  105. /*
  106. * tbfind - find ACPI table
  107. */
  108. ACPI_STATUS
  109. AcpiTbFindTable (
  110. char *Signature,
  111. char *OemId,
  112. char *OemTableId,
  113. UINT32 *TableIndex);
  114. /*
  115. * tbinstal - Table removal and deletion
  116. */
  117. ACPI_STATUS
  118. AcpiTbResizeRootTableList (
  119. void);
  120. ACPI_STATUS
  121. AcpiTbValidateTable (
  122. ACPI_TABLE_DESC *TableDesc);
  123. void
  124. AcpiTbInvalidateTable (
  125. ACPI_TABLE_DESC *TableDesc);
  126. void
  127. AcpiTbOverrideTable (
  128. ACPI_TABLE_DESC *OldTableDesc);
  129. ACPI_STATUS
  130. AcpiTbAcquireTable (
  131. ACPI_TABLE_DESC *TableDesc,
  132. ACPI_TABLE_HEADER **TablePtr,
  133. UINT32 *TableLength,
  134. UINT8 *TableFlags);
  135. void
  136. AcpiTbReleaseTable (
  137. ACPI_TABLE_HEADER *Table,
  138. UINT32 TableLength,
  139. UINT8 TableFlags);
  140. ACPI_STATUS
  141. AcpiTbInstallStandardTable (
  142. ACPI_PHYSICAL_ADDRESS Address,
  143. UINT8 Flags,
  144. BOOLEAN Reload,
  145. BOOLEAN Override,
  146. UINT32 *TableIndex);
  147. void
  148. AcpiTbUninstallTable (
  149. ACPI_TABLE_DESC *TableDesc);
  150. void
  151. AcpiTbTerminate (
  152. void);
  153. ACPI_STATUS
  154. AcpiTbDeleteNamespaceByOwner (
  155. UINT32 TableIndex);
  156. ACPI_STATUS
  157. AcpiTbAllocateOwnerId (
  158. UINT32 TableIndex);
  159. ACPI_STATUS
  160. AcpiTbReleaseOwnerId (
  161. UINT32 TableIndex);
  162. ACPI_STATUS
  163. AcpiTbGetOwnerId (
  164. UINT32 TableIndex,
  165. ACPI_OWNER_ID *OwnerId);
  166. /*
  167. * tbutils - table manager utilities
  168. */
  169. ACPI_STATUS
  170. AcpiTbInitializeFacs (
  171. void);
  172. void
  173. AcpiTbPrintTableHeader(
  174. ACPI_PHYSICAL_ADDRESS Address,
  175. ACPI_TABLE_HEADER *Header);
  176. UINT8
  177. AcpiTbChecksum (
  178. UINT8 *Buffer,
  179. UINT32 Length);
  180. ACPI_STATUS
  181. AcpiTbVerifyChecksum (
  182. ACPI_TABLE_HEADER *Table,
  183. UINT32 Length);
  184. void
  185. AcpiTbCheckDsdtHeader (
  186. void);
  187. ACPI_TABLE_HEADER *
  188. AcpiTbCopyDsdt (
  189. UINT32 TableIndex);
  190. void
  191. AcpiTbInstallTableWithOverride (
  192. ACPI_TABLE_DESC *NewTableDesc,
  193. BOOLEAN Override,
  194. UINT32 *TableIndex);
  195. ACPI_STATUS
  196. AcpiTbInstallFixedTable (
  197. ACPI_PHYSICAL_ADDRESS Address,
  198. char *Signature,
  199. UINT32 *TableIndex);
  200. ACPI_STATUS
  201. AcpiTbParseRootTable (
  202. ACPI_PHYSICAL_ADDRESS RsdpAddress);
  203. BOOLEAN
  204. AcpiIsValidSignature (
  205. char *Signature);
  206. /*
  207. * tbxfload
  208. */
  209. ACPI_STATUS
  210. AcpiTbLoadNamespace (
  211. void);
  212. #endif /* __ACTABLES_H__ */