minor corrections by M.Taguchi
[reactos.git] / reactos / drivers / bus / acpi / include / actables.h
1 /******************************************************************************
2 *
3 * Name: actables.h - ACPI table management
4 * $Revision: 1.1 $
5 *
6 *****************************************************************************/
7
8 /*
9 * Copyright (C) 2000, 2001 R. Byron Moore
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26 #ifndef __ACTABLES_H__
27 #define __ACTABLES_H__
28
29
30 /* Used in Acpi_tb_map_acpi_table for size parameter if table header is to be used */
31
32 #define SIZE_IN_HEADER 0
33
34
35 ACPI_STATUS
36 acpi_tb_handle_to_object (
37 u16 table_id,
38 ACPI_TABLE_DESC **table_desc);
39
40 /*
41 * tbconvrt - Table conversion routines
42 */
43
44 ACPI_STATUS
45 acpi_tb_convert_to_xsdt (
46 ACPI_TABLE_DESC *table_info,
47 u32 *number_of_tables);
48
49 ACPI_STATUS
50 acpi_tb_convert_table_fadt (
51 void);
52
53 ACPI_STATUS
54 acpi_tb_build_common_facs (
55 ACPI_TABLE_DESC *table_info);
56
57
58 /*
59 * tbget - Table "get" routines
60 */
61
62 ACPI_STATUS
63 acpi_tb_get_table_ptr (
64 ACPI_TABLE_TYPE table_type,
65 u32 instance,
66 ACPI_TABLE_HEADER **table_ptr_loc);
67
68 ACPI_STATUS
69 acpi_tb_get_table (
70 ACPI_PHYSICAL_ADDRESS physical_address,
71 ACPI_TABLE_HEADER *buffer_ptr,
72 ACPI_TABLE_DESC *table_info);
73
74 ACPI_STATUS
75 acpi_tb_verify_rsdp (
76 ACPI_PHYSICAL_ADDRESS RSDP_physical_address);
77
78 ACPI_STATUS
79 acpi_tb_get_table_facs (
80 ACPI_TABLE_HEADER *buffer_ptr,
81 ACPI_TABLE_DESC *table_info);
82
83
84 /*
85 * tbgetall - Get all firmware ACPI tables
86 */
87
88 ACPI_STATUS
89 acpi_tb_get_all_tables (
90 u32 number_of_tables,
91 ACPI_TABLE_HEADER *buffer_ptr);
92
93
94 /*
95 * tbinstall - Table installation
96 */
97
98 ACPI_STATUS
99 acpi_tb_install_table (
100 ACPI_TABLE_HEADER *table_ptr,
101 ACPI_TABLE_DESC *table_info);
102
103 ACPI_STATUS
104 acpi_tb_recognize_table (
105 ACPI_TABLE_HEADER *table_ptr,
106 ACPI_TABLE_DESC *table_info);
107
108 ACPI_STATUS
109 acpi_tb_init_table_descriptor (
110 ACPI_TABLE_TYPE table_type,
111 ACPI_TABLE_DESC *table_info);
112
113
114 /*
115 * tbremove - Table removal and deletion
116 */
117
118 void
119 acpi_tb_delete_acpi_tables (
120 void);
121
122 void
123 acpi_tb_delete_acpi_table (
124 ACPI_TABLE_TYPE type);
125
126 void
127 acpi_tb_delete_single_table (
128 ACPI_TABLE_DESC *table_desc);
129
130 ACPI_TABLE_DESC *
131 acpi_tb_uninstall_table (
132 ACPI_TABLE_DESC *table_desc);
133
134 void
135 acpi_tb_free_acpi_tables_of_type (
136 ACPI_TABLE_DESC *table_info);
137
138
139 /*
140 * tbrsd - RSDP, RSDT utilities
141 */
142
143 ACPI_STATUS
144 acpi_tb_get_table_rsdt (
145 u32 *number_of_tables);
146
147 u8 *
148 acpi_tb_scan_memory_for_rsdp (
149 u8 *start_address,
150 u32 length);
151
152 ACPI_STATUS
153 acpi_tb_find_rsdp (
154 ACPI_TABLE_DESC *table_info);
155
156
157 /*
158 * tbutils - common table utilities
159 */
160
161 u8
162 acpi_tb_system_table_pointer (
163 void *where);
164
165 ACPI_STATUS
166 acpi_tb_map_acpi_table (
167 ACPI_PHYSICAL_ADDRESS physical_address,
168 u32 *size,
169 void **logical_address);
170
171 ACPI_STATUS
172 acpi_tb_verify_table_checksum (
173 ACPI_TABLE_HEADER *table_header);
174
175 u8
176 acpi_tb_checksum (
177 void *buffer,
178 u32 length);
179
180 ACPI_STATUS
181 acpi_tb_validate_table_header (
182 ACPI_TABLE_HEADER *table_header);
183
184
185 #endif /* __ACTABLES_H__ */