actables.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. /*
  47. * tbconvrt - Table conversion routines
  48. */
  49. acpi_status
  50. acpi_tb_convert_to_xsdt (
  51. struct acpi_table_desc *table_info);
  52. acpi_status
  53. acpi_tb_convert_table_fadt (
  54. void);
  55. acpi_status
  56. acpi_tb_build_common_facs (
  57. struct acpi_table_desc *table_info);
  58. u32
  59. acpi_tb_get_table_count (
  60. struct rsdp_descriptor *RSDP,
  61. struct acpi_table_header *RSDT);
  62. /*
  63. * tbget - Table "get" routines
  64. */
  65. acpi_status
  66. acpi_tb_get_table (
  67. struct acpi_pointer *address,
  68. struct acpi_table_desc *table_info);
  69. acpi_status
  70. acpi_tb_get_table_header (
  71. struct acpi_pointer *address,
  72. struct acpi_table_header *return_header);
  73. acpi_status
  74. acpi_tb_get_table_body (
  75. struct acpi_pointer *address,
  76. struct acpi_table_header *header,
  77. struct acpi_table_desc *table_info);
  78. acpi_status
  79. acpi_tb_get_table_ptr (
  80. acpi_table_type table_type,
  81. u32 instance,
  82. struct acpi_table_header **table_ptr_loc);
  83. acpi_status
  84. acpi_tb_verify_rsdp (
  85. struct acpi_pointer *address);
  86. void
  87. acpi_tb_get_rsdt_address (
  88. struct acpi_pointer *out_address);
  89. acpi_status
  90. acpi_tb_validate_rsdt (
  91. struct acpi_table_header *table_ptr);
  92. /*
  93. * tbgetall - get multiple required tables
  94. */
  95. acpi_status
  96. acpi_tb_get_required_tables (
  97. void);
  98. /*
  99. * tbinstall - Table installation
  100. */
  101. acpi_status
  102. acpi_tb_install_table (
  103. struct acpi_table_desc *table_info);
  104. acpi_status
  105. acpi_tb_recognize_table (
  106. struct acpi_table_desc *table_info,
  107. u8 search_type);
  108. acpi_status
  109. acpi_tb_init_table_descriptor (
  110. acpi_table_type table_type,
  111. struct acpi_table_desc *table_info);
  112. /*
  113. * tbremove - Table removal and deletion
  114. */
  115. void
  116. acpi_tb_delete_all_tables (
  117. void);
  118. void
  119. acpi_tb_delete_tables_by_type (
  120. acpi_table_type type);
  121. void
  122. acpi_tb_delete_single_table (
  123. struct acpi_table_desc *table_desc);
  124. struct acpi_table_desc *
  125. acpi_tb_uninstall_table (
  126. struct acpi_table_desc *table_desc);
  127. /*
  128. * tbxfroot - RSDP, RSDT utilities
  129. */
  130. acpi_status
  131. acpi_tb_find_table (
  132. char *signature,
  133. char *oem_id,
  134. char *oem_table_id,
  135. struct acpi_table_header **table_ptr);
  136. acpi_status
  137. acpi_tb_get_table_rsdt (
  138. void);
  139. /*
  140. * tbutils - common table utilities
  141. */
  142. acpi_status
  143. acpi_tb_verify_table_checksum (
  144. struct acpi_table_header *table_header);
  145. u8
  146. acpi_tb_checksum (
  147. void *buffer,
  148. u32 length);
  149. acpi_status
  150. acpi_tb_validate_table_header (
  151. struct acpi_table_header *table_header);
  152. #endif /* __ACTABLES_H__ */