1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44#include <acpi/acpi.h>
45#include "accommon.h"
46#include "acresrc.h"
47
48#define _COMPONENT ACPI_RESOURCES
49ACPI_MODULE_NAME("rsio")
50
51
52
53
54
55
56struct acpi_rsconvert_info acpi_rs_convert_io[5] = {
57 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IO,
58 ACPI_RS_SIZE(struct acpi_resource_io),
59 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_io)},
60
61 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IO,
62 sizeof(struct aml_resource_io),
63 0},
64
65
66
67 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.io.io_decode),
68 AML_OFFSET(io.flags),
69 0},
70
71
72
73
74
75
76
77 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.io.alignment),
78 AML_OFFSET(io.alignment),
79 2},
80
81 {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.io.minimum),
82 AML_OFFSET(io.minimum),
83 2}
84};
85
86
87
88
89
90
91
92struct acpi_rsconvert_info acpi_rs_convert_fixed_io[4] = {
93 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_IO,
94 ACPI_RS_SIZE(struct acpi_resource_fixed_io),
95 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_io)},
96
97 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_IO,
98 sizeof(struct aml_resource_fixed_io),
99 0},
100
101
102
103
104
105 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_io.address_length),
106 AML_OFFSET(fixed_io.address_length),
107 1},
108
109 {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_io.address),
110 AML_OFFSET(fixed_io.address),
111 1}
112};
113
114
115
116
117
118
119
120struct acpi_rsconvert_info acpi_rs_convert_generic_reg[4] = {
121 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GENERIC_REGISTER,
122 ACPI_RS_SIZE(struct acpi_resource_generic_register),
123 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_generic_reg)},
124
125 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GENERIC_REGISTER,
126 sizeof(struct aml_resource_generic_register),
127 0},
128
129
130
131
132
133
134
135 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.generic_reg.space_id),
136 AML_OFFSET(generic_reg.address_space_id),
137 4},
138
139
140
141 {ACPI_RSC_MOVE64, ACPI_RS_OFFSET(data.generic_reg.address),
142 AML_OFFSET(generic_reg.address),
143 1}
144};
145
146
147
148
149
150
151
152struct acpi_rsconvert_info acpi_rs_convert_end_dpf[2] = {
153 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_END_DEPENDENT,
154 ACPI_RS_SIZE_MIN,
155 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_end_dpf)},
156
157 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_END_DEPENDENT,
158 sizeof(struct aml_resource_end_dependent),
159 0}
160};
161
162
163
164
165
166
167
168struct acpi_rsconvert_info acpi_rs_convert_end_tag[2] = {
169 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_END_TAG,
170 ACPI_RS_SIZE_MIN,
171 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_end_tag)},
172
173
174
175
176
177
178 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_END_TAG,
179 sizeof(struct aml_resource_end_tag),
180 0}
181};
182
183
184
185
186
187
188
189struct acpi_rsconvert_info acpi_rs_get_start_dpf[6] = {
190 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_START_DEPENDENT,
191 ACPI_RS_SIZE(struct acpi_resource_start_dependent),
192 ACPI_RSC_TABLE_SIZE(acpi_rs_get_start_dpf)},
193
194
195
196 {ACPI_RSC_SET8, ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
197 ACPI_ACCEPTABLE_CONFIGURATION,
198 2},
199
200
201
202 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.start_dpf.descriptor_length),
203 AML_OFFSET(start_dpf.descriptor_type),
204 0},
205
206
207
208 {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 1},
209
210
211
212 {ACPI_RSC_2BITFLAG,
213 ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
214 AML_OFFSET(start_dpf.flags),
215 0},
216
217 {ACPI_RSC_2BITFLAG,
218 ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
219 AML_OFFSET(start_dpf.flags),
220 2}
221};
222
223
224
225
226
227
228
229struct acpi_rsconvert_info acpi_rs_set_start_dpf[10] = {
230
231
232 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_START_DEPENDENT,
233 sizeof(struct aml_resource_start_dependent),
234 ACPI_RSC_TABLE_SIZE(acpi_rs_set_start_dpf)},
235
236
237
238 {ACPI_RSC_2BITFLAG,
239 ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
240 AML_OFFSET(start_dpf.flags),
241 0},
242
243 {ACPI_RSC_2BITFLAG,
244 ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
245 AML_OFFSET(start_dpf.flags),
246 2},
247
248
249
250
251 {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
252 ACPI_RS_OFFSET(data.start_dpf.descriptor_length),
253 1},
254
255
256
257 {ACPI_RSC_LENGTH, 0, 0,
258 sizeof(struct aml_resource_start_dependent_noprio)},
259
260
261
262
263
264
265
266 {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
267 ACPI_RS_OFFSET(data.start_dpf.descriptor_length),
268 0},
269
270
271
272 {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_start_dependent)},
273
274
275
276
277
278 {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
279 ACPI_RS_OFFSET(data.start_dpf.compatibility_priority),
280 ACPI_ACCEPTABLE_CONFIGURATION},
281
282 {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
283 ACPI_RS_OFFSET(data.start_dpf.performance_robustness),
284 ACPI_ACCEPTABLE_CONFIGURATION},
285
286
287
288 {ACPI_RSC_LENGTH, 0, 0,
289 sizeof(struct aml_resource_start_dependent_noprio)}
290};
291