actables.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. /******************************************************************************
  2. *
  3. * Name: actables.h - ACPI table management
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2005, R. Byron Moore
  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. /* Used in acpi_tb_map_acpi_table for size parameter if table header is to be used */
  45. #define SIZE_IN_HEADER 0
  46. #ifdef ACPI_FUTURE_USAGE
  47. acpi_status
  48. acpi_tb_handle_to_object (
  49. u16 table_id,
  50. struct acpi_table_desc **table_desc);
  51. #endif
  52. /*
  53. * tbconvrt - Table conversion routines
  54. */
  55. acpi_status
  56. acpi_tb_convert_to_xsdt (
  57. struct acpi_table_desc *table_info);
  58. acpi_status
  59. acpi_tb_convert_table_fadt (
  60. void);
  61. acpi_status
  62. acpi_tb_build_common_facs (
  63. struct acpi_table_desc *table_info);
  64. u32
  65. acpi_tb_get_table_count (
  66. struct rsdp_descriptor *RSDP,
  67. struct acpi_table_header *RSDT);
  68. /*
  69. * tbget - Table "get" routines
  70. */
  71. acpi_status
  72. acpi_tb_get_table (
  73. struct acpi_pointer *address,
  74. struct acpi_table_desc *table_info);
  75. acpi_status
  76. acpi_tb_get_table_header (
  77. struct acpi_pointer *address,
  78. struct acpi_table_header *return_header);
  79. acpi_status
  80. acpi_tb_get_table_body (
  81. struct acpi_pointer *address,
  82. struct acpi_table_header *header,
  83. struct acpi_table_desc *table_info);
  84. acpi_status
  85. acpi_tb_get_this_table (
  86. struct acpi_pointer *address,
  87. struct acpi_table_header *header,
  88. struct acpi_table_desc *table_info);
  89. acpi_status
  90. acpi_tb_table_override (
  91. struct acpi_table_header *header,
  92. struct acpi_table_desc *table_info);
  93. acpi_status
  94. acpi_tb_get_table_ptr (
  95. acpi_table_type table_type,
  96. u32 instance,
  97. struct acpi_table_header **table_ptr_loc);
  98. acpi_status
  99. acpi_tb_verify_rsdp (
  100. struct acpi_pointer *address);
  101. void
  102. acpi_tb_get_rsdt_address (
  103. struct acpi_pointer *out_address);
  104. acpi_status
  105. acpi_tb_validate_rsdt (
  106. struct acpi_table_header *table_ptr);
  107. acpi_status
  108. acpi_tb_get_required_tables (
  109. void);
  110. acpi_status
  111. acpi_tb_get_primary_table (
  112. struct acpi_pointer *address,
  113. struct acpi_table_desc *table_info);
  114. acpi_status
  115. acpi_tb_get_secondary_table (
  116. struct acpi_pointer *address,
  117. acpi_string signature,
  118. struct acpi_table_desc *table_info);
  119. /*
  120. * tbinstall - Table installation
  121. */
  122. acpi_status
  123. acpi_tb_install_table (
  124. struct acpi_table_desc *table_info);
  125. acpi_status
  126. acpi_tb_match_signature (
  127. char *signature,
  128. struct acpi_table_desc *table_info,
  129. u8 search_type);
  130. acpi_status
  131. acpi_tb_recognize_table (
  132. struct acpi_table_desc *table_info,
  133. u8 search_type);
  134. acpi_status
  135. acpi_tb_init_table_descriptor (
  136. acpi_table_type table_type,
  137. struct acpi_table_desc *table_info);
  138. /*
  139. * tbremove - Table removal and deletion
  140. */
  141. void
  142. acpi_tb_delete_all_tables (
  143. void);
  144. void
  145. acpi_tb_delete_tables_by_type (
  146. acpi_table_type type);
  147. void
  148. acpi_tb_delete_single_table (
  149. struct acpi_table_desc *table_desc);
  150. struct acpi_table_desc *
  151. acpi_tb_uninstall_table (
  152. struct acpi_table_desc *table_desc);
  153. /*
  154. * tbrsd - RSDP, RSDT utilities
  155. */
  156. acpi_status
  157. acpi_tb_get_table_rsdt (
  158. void);
  159. u8 *
  160. acpi_tb_scan_memory_for_rsdp (
  161. u8 *start_address,
  162. u32 length);
  163. acpi_status
  164. acpi_tb_find_rsdp (
  165. struct acpi_table_desc *table_info,
  166. u32 flags);
  167. /*
  168. * tbutils - common table utilities
  169. */
  170. acpi_status
  171. acpi_tb_find_table (
  172. char *signature,
  173. char *oem_id,
  174. char *oem_table_id,
  175. struct acpi_table_header **table_ptr);
  176. acpi_status
  177. acpi_tb_verify_table_checksum (
  178. struct acpi_table_header *table_header);
  179. u8
  180. acpi_tb_checksum (
  181. void *buffer,
  182. u32 length);
  183. acpi_status
  184. acpi_tb_validate_table_header (
  185. struct acpi_table_header *table_header);
  186. #endif /* __ACTABLES_H__ */