utresrc.c revision 1.1.1.2.2.2 1 1.1.1.2.2.2 bouyer /*******************************************************************************
2 1.1.1.2.2.2 bouyer *
3 1.1.1.2.2.2 bouyer * Module Name: utresrc - Resource managment utilities
4 1.1.1.2.2.2 bouyer *
5 1.1.1.2.2.2 bouyer ******************************************************************************/
6 1.1.1.2.2.2 bouyer
7 1.1.1.2.2.2 bouyer /*
8 1.1.1.2.2.2 bouyer * Copyright (C) 2000 - 2011, Intel Corp.
9 1.1.1.2.2.2 bouyer * All rights reserved.
10 1.1.1.2.2.2 bouyer *
11 1.1.1.2.2.2 bouyer * Redistribution and use in source and binary forms, with or without
12 1.1.1.2.2.2 bouyer * modification, are permitted provided that the following conditions
13 1.1.1.2.2.2 bouyer * are met:
14 1.1.1.2.2.2 bouyer * 1. Redistributions of source code must retain the above copyright
15 1.1.1.2.2.2 bouyer * notice, this list of conditions, and the following disclaimer,
16 1.1.1.2.2.2 bouyer * without modification.
17 1.1.1.2.2.2 bouyer * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.2.2.2 bouyer * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.2.2.2 bouyer * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.2.2.2 bouyer * including a substantially similar Disclaimer requirement for further
21 1.1.1.2.2.2 bouyer * binary redistribution.
22 1.1.1.2.2.2 bouyer * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.2.2.2 bouyer * of any contributors may be used to endorse or promote products derived
24 1.1.1.2.2.2 bouyer * from this software without specific prior written permission.
25 1.1.1.2.2.2 bouyer *
26 1.1.1.2.2.2 bouyer * Alternatively, this software may be distributed under the terms of the
27 1.1.1.2.2.2 bouyer * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.2.2.2 bouyer * Software Foundation.
29 1.1.1.2.2.2 bouyer *
30 1.1.1.2.2.2 bouyer * NO WARRANTY
31 1.1.1.2.2.2 bouyer * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.2.2.2 bouyer * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.2.2.2 bouyer * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1.1.2.2.2 bouyer * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.2.2.2 bouyer * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.2.2.2 bouyer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.2.2.2 bouyer * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.2.2.2 bouyer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.2.2.2 bouyer * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.2.2.2 bouyer * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.2.2.2 bouyer * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.2.2.2 bouyer */
43 1.1.1.2.2.2 bouyer
44 1.1.1.2.2.2 bouyer
45 1.1.1.2.2.2 bouyer #define __UTRESRC_C__
46 1.1.1.2.2.2 bouyer
47 1.1.1.2.2.2 bouyer #include "acpi.h"
48 1.1.1.2.2.2 bouyer #include "accommon.h"
49 1.1.1.2.2.2 bouyer #include "amlresrc.h"
50 1.1.1.2.2.2 bouyer
51 1.1.1.2.2.2 bouyer
52 1.1.1.2.2.2 bouyer #define _COMPONENT ACPI_UTILITIES
53 1.1.1.2.2.2 bouyer ACPI_MODULE_NAME ("utresrc")
54 1.1.1.2.2.2 bouyer
55 1.1.1.2.2.2 bouyer
56 1.1.1.2.2.2 bouyer #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
57 1.1.1.2.2.2 bouyer
58 1.1.1.2.2.2 bouyer /*
59 1.1.1.2.2.2 bouyer * Strings used to decode resource descriptors.
60 1.1.1.2.2.2 bouyer * Used by both the disasssembler and the debugger resource dump routines
61 1.1.1.2.2.2 bouyer */
62 1.1.1.2.2.2 bouyer const char *AcpiGbl_BmDecode[] =
63 1.1.1.2.2.2 bouyer {
64 1.1.1.2.2.2 bouyer "NotBusMaster",
65 1.1.1.2.2.2 bouyer "BusMaster"
66 1.1.1.2.2.2 bouyer };
67 1.1.1.2.2.2 bouyer
68 1.1.1.2.2.2 bouyer const char *AcpiGbl_ConfigDecode[] =
69 1.1.1.2.2.2 bouyer {
70 1.1.1.2.2.2 bouyer "0 - Good Configuration",
71 1.1.1.2.2.2 bouyer "1 - Acceptable Configuration",
72 1.1.1.2.2.2 bouyer "2 - Suboptimal Configuration",
73 1.1.1.2.2.2 bouyer "3 - ***Invalid Configuration***",
74 1.1.1.2.2.2 bouyer };
75 1.1.1.2.2.2 bouyer
76 1.1.1.2.2.2 bouyer const char *AcpiGbl_ConsumeDecode[] =
77 1.1.1.2.2.2 bouyer {
78 1.1.1.2.2.2 bouyer "ResourceProducer",
79 1.1.1.2.2.2 bouyer "ResourceConsumer"
80 1.1.1.2.2.2 bouyer };
81 1.1.1.2.2.2 bouyer
82 1.1.1.2.2.2 bouyer const char *AcpiGbl_DecDecode[] =
83 1.1.1.2.2.2 bouyer {
84 1.1.1.2.2.2 bouyer "PosDecode",
85 1.1.1.2.2.2 bouyer "SubDecode"
86 1.1.1.2.2.2 bouyer };
87 1.1.1.2.2.2 bouyer
88 1.1.1.2.2.2 bouyer const char *AcpiGbl_HeDecode[] =
89 1.1.1.2.2.2 bouyer {
90 1.1.1.2.2.2 bouyer "Level",
91 1.1.1.2.2.2 bouyer "Edge"
92 1.1.1.2.2.2 bouyer };
93 1.1.1.2.2.2 bouyer
94 1.1.1.2.2.2 bouyer const char *AcpiGbl_IoDecode[] =
95 1.1.1.2.2.2 bouyer {
96 1.1.1.2.2.2 bouyer "Decode10",
97 1.1.1.2.2.2 bouyer "Decode16"
98 1.1.1.2.2.2 bouyer };
99 1.1.1.2.2.2 bouyer
100 1.1.1.2.2.2 bouyer const char *AcpiGbl_LlDecode[] =
101 1.1.1.2.2.2 bouyer {
102 1.1.1.2.2.2 bouyer "ActiveHigh",
103 1.1.1.2.2.2 bouyer "ActiveLow"
104 1.1.1.2.2.2 bouyer };
105 1.1.1.2.2.2 bouyer
106 1.1.1.2.2.2 bouyer const char *AcpiGbl_MaxDecode[] =
107 1.1.1.2.2.2 bouyer {
108 1.1.1.2.2.2 bouyer "MaxNotFixed",
109 1.1.1.2.2.2 bouyer "MaxFixed"
110 1.1.1.2.2.2 bouyer };
111 1.1.1.2.2.2 bouyer
112 1.1.1.2.2.2 bouyer const char *AcpiGbl_MemDecode[] =
113 1.1.1.2.2.2 bouyer {
114 1.1.1.2.2.2 bouyer "NonCacheable",
115 1.1.1.2.2.2 bouyer "Cacheable",
116 1.1.1.2.2.2 bouyer "WriteCombining",
117 1.1.1.2.2.2 bouyer "Prefetchable"
118 1.1.1.2.2.2 bouyer };
119 1.1.1.2.2.2 bouyer
120 1.1.1.2.2.2 bouyer const char *AcpiGbl_MinDecode[] =
121 1.1.1.2.2.2 bouyer {
122 1.1.1.2.2.2 bouyer "MinNotFixed",
123 1.1.1.2.2.2 bouyer "MinFixed"
124 1.1.1.2.2.2 bouyer };
125 1.1.1.2.2.2 bouyer
126 1.1.1.2.2.2 bouyer const char *AcpiGbl_MtpDecode[] =
127 1.1.1.2.2.2 bouyer {
128 1.1.1.2.2.2 bouyer "AddressRangeMemory",
129 1.1.1.2.2.2 bouyer "AddressRangeReserved",
130 1.1.1.2.2.2 bouyer "AddressRangeACPI",
131 1.1.1.2.2.2 bouyer "AddressRangeNVS"
132 1.1.1.2.2.2 bouyer };
133 1.1.1.2.2.2 bouyer
134 1.1.1.2.2.2 bouyer const char *AcpiGbl_RngDecode[] =
135 1.1.1.2.2.2 bouyer {
136 1.1.1.2.2.2 bouyer "InvalidRanges",
137 1.1.1.2.2.2 bouyer "NonISAOnlyRanges",
138 1.1.1.2.2.2 bouyer "ISAOnlyRanges",
139 1.1.1.2.2.2 bouyer "EntireRange"
140 1.1.1.2.2.2 bouyer };
141 1.1.1.2.2.2 bouyer
142 1.1.1.2.2.2 bouyer const char *AcpiGbl_RwDecode[] =
143 1.1.1.2.2.2 bouyer {
144 1.1.1.2.2.2 bouyer "ReadOnly",
145 1.1.1.2.2.2 bouyer "ReadWrite"
146 1.1.1.2.2.2 bouyer };
147 1.1.1.2.2.2 bouyer
148 1.1.1.2.2.2 bouyer const char *AcpiGbl_ShrDecode[] =
149 1.1.1.2.2.2 bouyer {
150 1.1.1.2.2.2 bouyer "Exclusive",
151 1.1.1.2.2.2 bouyer "Shared"
152 1.1.1.2.2.2 bouyer };
153 1.1.1.2.2.2 bouyer
154 1.1.1.2.2.2 bouyer const char *AcpiGbl_SizDecode[] =
155 1.1.1.2.2.2 bouyer {
156 1.1.1.2.2.2 bouyer "Transfer8",
157 1.1.1.2.2.2 bouyer "Transfer8_16",
158 1.1.1.2.2.2 bouyer "Transfer16",
159 1.1.1.2.2.2 bouyer "InvalidSize"
160 1.1.1.2.2.2 bouyer };
161 1.1.1.2.2.2 bouyer
162 1.1.1.2.2.2 bouyer const char *AcpiGbl_TrsDecode[] =
163 1.1.1.2.2.2 bouyer {
164 1.1.1.2.2.2 bouyer "DenseTranslation",
165 1.1.1.2.2.2 bouyer "SparseTranslation"
166 1.1.1.2.2.2 bouyer };
167 1.1.1.2.2.2 bouyer
168 1.1.1.2.2.2 bouyer const char *AcpiGbl_TtpDecode[] =
169 1.1.1.2.2.2 bouyer {
170 1.1.1.2.2.2 bouyer "TypeStatic",
171 1.1.1.2.2.2 bouyer "TypeTranslation"
172 1.1.1.2.2.2 bouyer };
173 1.1.1.2.2.2 bouyer
174 1.1.1.2.2.2 bouyer const char *AcpiGbl_TypDecode[] =
175 1.1.1.2.2.2 bouyer {
176 1.1.1.2.2.2 bouyer "Compatibility",
177 1.1.1.2.2.2 bouyer "TypeA",
178 1.1.1.2.2.2 bouyer "TypeB",
179 1.1.1.2.2.2 bouyer "TypeF"
180 1.1.1.2.2.2 bouyer };
181 1.1.1.2.2.2 bouyer
182 1.1.1.2.2.2 bouyer #endif
183 1.1.1.2.2.2 bouyer
184 1.1.1.2.2.2 bouyer
185 1.1.1.2.2.2 bouyer /*
186 1.1.1.2.2.2 bouyer * Base sizes of the raw AML resource descriptors, indexed by resource type.
187 1.1.1.2.2.2 bouyer * Zero indicates a reserved (and therefore invalid) resource type.
188 1.1.1.2.2.2 bouyer */
189 1.1.1.2.2.2 bouyer const UINT8 AcpiGbl_ResourceAmlSizes[] =
190 1.1.1.2.2.2 bouyer {
191 1.1.1.2.2.2 bouyer /* Small descriptors */
192 1.1.1.2.2.2 bouyer
193 1.1.1.2.2.2 bouyer 0,
194 1.1.1.2.2.2 bouyer 0,
195 1.1.1.2.2.2 bouyer 0,
196 1.1.1.2.2.2 bouyer 0,
197 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_IRQ),
198 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_DMA),
199 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_START_DEPENDENT),
200 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_END_DEPENDENT),
201 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_IO),
202 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_FIXED_IO),
203 1.1.1.2.2.2 bouyer 0,
204 1.1.1.2.2.2 bouyer 0,
205 1.1.1.2.2.2 bouyer 0,
206 1.1.1.2.2.2 bouyer 0,
207 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_VENDOR_SMALL),
208 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_SMALL (AML_RESOURCE_END_TAG),
209 1.1.1.2.2.2 bouyer
210 1.1.1.2.2.2 bouyer /* Large descriptors */
211 1.1.1.2.2.2 bouyer
212 1.1.1.2.2.2 bouyer 0,
213 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_MEMORY24),
214 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_GENERIC_REGISTER),
215 1.1.1.2.2.2 bouyer 0,
216 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_VENDOR_LARGE),
217 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_MEMORY32),
218 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_FIXED_MEMORY32),
219 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_ADDRESS32),
220 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_ADDRESS16),
221 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_EXTENDED_IRQ),
222 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_ADDRESS64),
223 1.1.1.2.2.2 bouyer ACPI_AML_SIZE_LARGE (AML_RESOURCE_EXTENDED_ADDRESS64)
224 1.1.1.2.2.2 bouyer };
225 1.1.1.2.2.2 bouyer
226 1.1.1.2.2.2 bouyer
227 1.1.1.2.2.2 bouyer /*
228 1.1.1.2.2.2 bouyer * Resource types, used to validate the resource length field.
229 1.1.1.2.2.2 bouyer * The length of fixed-length types must match exactly, variable
230 1.1.1.2.2.2 bouyer * lengths must meet the minimum required length, etc.
231 1.1.1.2.2.2 bouyer * Zero indicates a reserved (and therefore invalid) resource type.
232 1.1.1.2.2.2 bouyer */
233 1.1.1.2.2.2 bouyer static const UINT8 AcpiGbl_ResourceTypes[] =
234 1.1.1.2.2.2 bouyer {
235 1.1.1.2.2.2 bouyer /* Small descriptors */
236 1.1.1.2.2.2 bouyer
237 1.1.1.2.2.2 bouyer 0,
238 1.1.1.2.2.2 bouyer 0,
239 1.1.1.2.2.2 bouyer 0,
240 1.1.1.2.2.2 bouyer 0,
241 1.1.1.2.2.2 bouyer ACPI_SMALL_VARIABLE_LENGTH,
242 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
243 1.1.1.2.2.2 bouyer ACPI_SMALL_VARIABLE_LENGTH,
244 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
245 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
246 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
247 1.1.1.2.2.2 bouyer 0,
248 1.1.1.2.2.2 bouyer 0,
249 1.1.1.2.2.2 bouyer 0,
250 1.1.1.2.2.2 bouyer 0,
251 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
252 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
253 1.1.1.2.2.2 bouyer
254 1.1.1.2.2.2 bouyer /* Large descriptors */
255 1.1.1.2.2.2 bouyer
256 1.1.1.2.2.2 bouyer 0,
257 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
258 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
259 1.1.1.2.2.2 bouyer 0,
260 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
261 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
262 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH,
263 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
264 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
265 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
266 1.1.1.2.2.2 bouyer ACPI_VARIABLE_LENGTH,
267 1.1.1.2.2.2 bouyer ACPI_FIXED_LENGTH
268 1.1.1.2.2.2 bouyer };
269 1.1.1.2.2.2 bouyer
270 1.1.1.2.2.2 bouyer
271 1.1.1.2.2.2 bouyer /*******************************************************************************
272 1.1.1.2.2.2 bouyer *
273 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtWalkAmlResources
274 1.1.1.2.2.2 bouyer *
275 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource template
276 1.1.1.2.2.2 bouyer * AmlLength - Length of the entire template
277 1.1.1.2.2.2 bouyer * UserFunction - Called once for each descriptor found. If
278 1.1.1.2.2.2 bouyer * NULL, a pointer to the EndTag is returned
279 1.1.1.2.2.2 bouyer * Context - Passed to UserFunction
280 1.1.1.2.2.2 bouyer *
281 1.1.1.2.2.2 bouyer * RETURN: Status
282 1.1.1.2.2.2 bouyer *
283 1.1.1.2.2.2 bouyer * DESCRIPTION: Walk a raw AML resource list(buffer). User function called
284 1.1.1.2.2.2 bouyer * once for each resource found.
285 1.1.1.2.2.2 bouyer *
286 1.1.1.2.2.2 bouyer ******************************************************************************/
287 1.1.1.2.2.2 bouyer
288 1.1.1.2.2.2 bouyer ACPI_STATUS
289 1.1.1.2.2.2 bouyer AcpiUtWalkAmlResources (
290 1.1.1.2.2.2 bouyer UINT8 *Aml,
291 1.1.1.2.2.2 bouyer ACPI_SIZE AmlLength,
292 1.1.1.2.2.2 bouyer ACPI_WALK_AML_CALLBACK UserFunction,
293 1.1.1.2.2.2 bouyer void *Context)
294 1.1.1.2.2.2 bouyer {
295 1.1.1.2.2.2 bouyer ACPI_STATUS Status;
296 1.1.1.2.2.2 bouyer UINT8 *EndAml;
297 1.1.1.2.2.2 bouyer UINT8 ResourceIndex;
298 1.1.1.2.2.2 bouyer UINT32 Length;
299 1.1.1.2.2.2 bouyer UINT32 Offset = 0;
300 1.1.1.2.2.2 bouyer
301 1.1.1.2.2.2 bouyer
302 1.1.1.2.2.2 bouyer ACPI_FUNCTION_TRACE (UtWalkAmlResources);
303 1.1.1.2.2.2 bouyer
304 1.1.1.2.2.2 bouyer
305 1.1.1.2.2.2 bouyer /* The absolute minimum resource template is one EndTag descriptor */
306 1.1.1.2.2.2 bouyer
307 1.1.1.2.2.2 bouyer if (AmlLength < sizeof (AML_RESOURCE_END_TAG))
308 1.1.1.2.2.2 bouyer {
309 1.1.1.2.2.2 bouyer return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
310 1.1.1.2.2.2 bouyer }
311 1.1.1.2.2.2 bouyer
312 1.1.1.2.2.2 bouyer /* Point to the end of the resource template buffer */
313 1.1.1.2.2.2 bouyer
314 1.1.1.2.2.2 bouyer EndAml = Aml + AmlLength;
315 1.1.1.2.2.2 bouyer
316 1.1.1.2.2.2 bouyer /* Walk the byte list, abort on any invalid descriptor type or length */
317 1.1.1.2.2.2 bouyer
318 1.1.1.2.2.2 bouyer while (Aml < EndAml)
319 1.1.1.2.2.2 bouyer {
320 1.1.1.2.2.2 bouyer /* Validate the Resource Type and Resource Length */
321 1.1.1.2.2.2 bouyer
322 1.1.1.2.2.2 bouyer Status = AcpiUtValidateResource (Aml, &ResourceIndex);
323 1.1.1.2.2.2 bouyer if (ACPI_FAILURE (Status))
324 1.1.1.2.2.2 bouyer {
325 1.1.1.2.2.2 bouyer return_ACPI_STATUS (Status);
326 1.1.1.2.2.2 bouyer }
327 1.1.1.2.2.2 bouyer
328 1.1.1.2.2.2 bouyer /* Get the length of this descriptor */
329 1.1.1.2.2.2 bouyer
330 1.1.1.2.2.2 bouyer Length = AcpiUtGetDescriptorLength (Aml);
331 1.1.1.2.2.2 bouyer
332 1.1.1.2.2.2 bouyer /* Invoke the user function */
333 1.1.1.2.2.2 bouyer
334 1.1.1.2.2.2 bouyer if (UserFunction)
335 1.1.1.2.2.2 bouyer {
336 1.1.1.2.2.2 bouyer Status = UserFunction (Aml, Length, Offset, ResourceIndex, Context);
337 1.1.1.2.2.2 bouyer if (ACPI_FAILURE (Status))
338 1.1.1.2.2.2 bouyer {
339 1.1.1.2.2.2 bouyer return (Status);
340 1.1.1.2.2.2 bouyer }
341 1.1.1.2.2.2 bouyer }
342 1.1.1.2.2.2 bouyer
343 1.1.1.2.2.2 bouyer /* An EndTag descriptor terminates this resource template */
344 1.1.1.2.2.2 bouyer
345 1.1.1.2.2.2 bouyer if (AcpiUtGetResourceType (Aml) == ACPI_RESOURCE_NAME_END_TAG)
346 1.1.1.2.2.2 bouyer {
347 1.1.1.2.2.2 bouyer /*
348 1.1.1.2.2.2 bouyer * There must be at least one more byte in the buffer for
349 1.1.1.2.2.2 bouyer * the 2nd byte of the EndTag
350 1.1.1.2.2.2 bouyer */
351 1.1.1.2.2.2 bouyer if ((Aml + 1) >= EndAml)
352 1.1.1.2.2.2 bouyer {
353 1.1.1.2.2.2 bouyer return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
354 1.1.1.2.2.2 bouyer }
355 1.1.1.2.2.2 bouyer
356 1.1.1.2.2.2 bouyer /* Return the pointer to the EndTag if requested */
357 1.1.1.2.2.2 bouyer
358 1.1.1.2.2.2 bouyer if (!UserFunction)
359 1.1.1.2.2.2 bouyer {
360 1.1.1.2.2.2 bouyer *(void **) Context = Aml;
361 1.1.1.2.2.2 bouyer }
362 1.1.1.2.2.2 bouyer
363 1.1.1.2.2.2 bouyer /* Normal exit */
364 1.1.1.2.2.2 bouyer
365 1.1.1.2.2.2 bouyer return_ACPI_STATUS (AE_OK);
366 1.1.1.2.2.2 bouyer }
367 1.1.1.2.2.2 bouyer
368 1.1.1.2.2.2 bouyer Aml += Length;
369 1.1.1.2.2.2 bouyer Offset += Length;
370 1.1.1.2.2.2 bouyer }
371 1.1.1.2.2.2 bouyer
372 1.1.1.2.2.2 bouyer /* Did not find an EndTag descriptor */
373 1.1.1.2.2.2 bouyer
374 1.1.1.2.2.2 bouyer return (AE_AML_NO_RESOURCE_END_TAG);
375 1.1.1.2.2.2 bouyer }
376 1.1.1.2.2.2 bouyer
377 1.1.1.2.2.2 bouyer
378 1.1.1.2.2.2 bouyer /*******************************************************************************
379 1.1.1.2.2.2 bouyer *
380 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtValidateResource
381 1.1.1.2.2.2 bouyer *
382 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource descriptor
383 1.1.1.2.2.2 bouyer * ReturnIndex - Where the resource index is returned. NULL
384 1.1.1.2.2.2 bouyer * if the index is not required.
385 1.1.1.2.2.2 bouyer *
386 1.1.1.2.2.2 bouyer * RETURN: Status, and optionally the Index into the global resource tables
387 1.1.1.2.2.2 bouyer *
388 1.1.1.2.2.2 bouyer * DESCRIPTION: Validate an AML resource descriptor by checking the Resource
389 1.1.1.2.2.2 bouyer * Type and Resource Length. Returns an index into the global
390 1.1.1.2.2.2 bouyer * resource information/dispatch tables for later use.
391 1.1.1.2.2.2 bouyer *
392 1.1.1.2.2.2 bouyer ******************************************************************************/
393 1.1.1.2.2.2 bouyer
394 1.1.1.2.2.2 bouyer ACPI_STATUS
395 1.1.1.2.2.2 bouyer AcpiUtValidateResource (
396 1.1.1.2.2.2 bouyer void *Aml,
397 1.1.1.2.2.2 bouyer UINT8 *ReturnIndex)
398 1.1.1.2.2.2 bouyer {
399 1.1.1.2.2.2 bouyer UINT8 ResourceType;
400 1.1.1.2.2.2 bouyer UINT8 ResourceIndex;
401 1.1.1.2.2.2 bouyer ACPI_RS_LENGTH ResourceLength;
402 1.1.1.2.2.2 bouyer ACPI_RS_LENGTH MinimumResourceLength;
403 1.1.1.2.2.2 bouyer
404 1.1.1.2.2.2 bouyer
405 1.1.1.2.2.2 bouyer ACPI_FUNCTION_ENTRY ();
406 1.1.1.2.2.2 bouyer
407 1.1.1.2.2.2 bouyer
408 1.1.1.2.2.2 bouyer /*
409 1.1.1.2.2.2 bouyer * 1) Validate the ResourceType field (Byte 0)
410 1.1.1.2.2.2 bouyer */
411 1.1.1.2.2.2 bouyer ResourceType = ACPI_GET8 (Aml);
412 1.1.1.2.2.2 bouyer
413 1.1.1.2.2.2 bouyer /*
414 1.1.1.2.2.2 bouyer * Byte 0 contains the descriptor name (Resource Type)
415 1.1.1.2.2.2 bouyer * Examine the large/small bit in the resource header
416 1.1.1.2.2.2 bouyer */
417 1.1.1.2.2.2 bouyer if (ResourceType & ACPI_RESOURCE_NAME_LARGE)
418 1.1.1.2.2.2 bouyer {
419 1.1.1.2.2.2 bouyer /* Verify the large resource type (name) against the max */
420 1.1.1.2.2.2 bouyer
421 1.1.1.2.2.2 bouyer if (ResourceType > ACPI_RESOURCE_NAME_LARGE_MAX)
422 1.1.1.2.2.2 bouyer {
423 1.1.1.2.2.2 bouyer return (AE_AML_INVALID_RESOURCE_TYPE);
424 1.1.1.2.2.2 bouyer }
425 1.1.1.2.2.2 bouyer
426 1.1.1.2.2.2 bouyer /*
427 1.1.1.2.2.2 bouyer * Large Resource Type -- bits 6:0 contain the name
428 1.1.1.2.2.2 bouyer * Translate range 0x80-0x8B to index range 0x10-0x1B
429 1.1.1.2.2.2 bouyer */
430 1.1.1.2.2.2 bouyer ResourceIndex = (UINT8) (ResourceType - 0x70);
431 1.1.1.2.2.2 bouyer }
432 1.1.1.2.2.2 bouyer else
433 1.1.1.2.2.2 bouyer {
434 1.1.1.2.2.2 bouyer /*
435 1.1.1.2.2.2 bouyer * Small Resource Type -- bits 6:3 contain the name
436 1.1.1.2.2.2 bouyer * Shift range to index range 0x00-0x0F
437 1.1.1.2.2.2 bouyer */
438 1.1.1.2.2.2 bouyer ResourceIndex = (UINT8)
439 1.1.1.2.2.2 bouyer ((ResourceType & ACPI_RESOURCE_NAME_SMALL_MASK) >> 3);
440 1.1.1.2.2.2 bouyer }
441 1.1.1.2.2.2 bouyer
442 1.1.1.2.2.2 bouyer /* Check validity of the resource type, zero indicates name is invalid */
443 1.1.1.2.2.2 bouyer
444 1.1.1.2.2.2 bouyer if (!AcpiGbl_ResourceTypes[ResourceIndex])
445 1.1.1.2.2.2 bouyer {
446 1.1.1.2.2.2 bouyer return (AE_AML_INVALID_RESOURCE_TYPE);
447 1.1.1.2.2.2 bouyer }
448 1.1.1.2.2.2 bouyer
449 1.1.1.2.2.2 bouyer
450 1.1.1.2.2.2 bouyer /*
451 1.1.1.2.2.2 bouyer * 2) Validate the ResourceLength field. This ensures that the length
452 1.1.1.2.2.2 bouyer * is at least reasonable, and guarantees that it is non-zero.
453 1.1.1.2.2.2 bouyer */
454 1.1.1.2.2.2 bouyer ResourceLength = AcpiUtGetResourceLength (Aml);
455 1.1.1.2.2.2 bouyer MinimumResourceLength = AcpiGbl_ResourceAmlSizes[ResourceIndex];
456 1.1.1.2.2.2 bouyer
457 1.1.1.2.2.2 bouyer /* Validate based upon the type of resource - fixed length or variable */
458 1.1.1.2.2.2 bouyer
459 1.1.1.2.2.2 bouyer switch (AcpiGbl_ResourceTypes[ResourceIndex])
460 1.1.1.2.2.2 bouyer {
461 1.1.1.2.2.2 bouyer case ACPI_FIXED_LENGTH:
462 1.1.1.2.2.2 bouyer
463 1.1.1.2.2.2 bouyer /* Fixed length resource, length must match exactly */
464 1.1.1.2.2.2 bouyer
465 1.1.1.2.2.2 bouyer if (ResourceLength != MinimumResourceLength)
466 1.1.1.2.2.2 bouyer {
467 1.1.1.2.2.2 bouyer return (AE_AML_BAD_RESOURCE_LENGTH);
468 1.1.1.2.2.2 bouyer }
469 1.1.1.2.2.2 bouyer break;
470 1.1.1.2.2.2 bouyer
471 1.1.1.2.2.2 bouyer case ACPI_VARIABLE_LENGTH:
472 1.1.1.2.2.2 bouyer
473 1.1.1.2.2.2 bouyer /* Variable length resource, length must be at least the minimum */
474 1.1.1.2.2.2 bouyer
475 1.1.1.2.2.2 bouyer if (ResourceLength < MinimumResourceLength)
476 1.1.1.2.2.2 bouyer {
477 1.1.1.2.2.2 bouyer return (AE_AML_BAD_RESOURCE_LENGTH);
478 1.1.1.2.2.2 bouyer }
479 1.1.1.2.2.2 bouyer break;
480 1.1.1.2.2.2 bouyer
481 1.1.1.2.2.2 bouyer case ACPI_SMALL_VARIABLE_LENGTH:
482 1.1.1.2.2.2 bouyer
483 1.1.1.2.2.2 bouyer /* Small variable length resource, length can be (Min) or (Min-1) */
484 1.1.1.2.2.2 bouyer
485 1.1.1.2.2.2 bouyer if ((ResourceLength > MinimumResourceLength) ||
486 1.1.1.2.2.2 bouyer (ResourceLength < (MinimumResourceLength - 1)))
487 1.1.1.2.2.2 bouyer {
488 1.1.1.2.2.2 bouyer return (AE_AML_BAD_RESOURCE_LENGTH);
489 1.1.1.2.2.2 bouyer }
490 1.1.1.2.2.2 bouyer break;
491 1.1.1.2.2.2 bouyer
492 1.1.1.2.2.2 bouyer default:
493 1.1.1.2.2.2 bouyer
494 1.1.1.2.2.2 bouyer /* Shouldn't happen (because of validation earlier), but be sure */
495 1.1.1.2.2.2 bouyer
496 1.1.1.2.2.2 bouyer return (AE_AML_INVALID_RESOURCE_TYPE);
497 1.1.1.2.2.2 bouyer }
498 1.1.1.2.2.2 bouyer
499 1.1.1.2.2.2 bouyer /* Optionally return the resource table index */
500 1.1.1.2.2.2 bouyer
501 1.1.1.2.2.2 bouyer if (ReturnIndex)
502 1.1.1.2.2.2 bouyer {
503 1.1.1.2.2.2 bouyer *ReturnIndex = ResourceIndex;
504 1.1.1.2.2.2 bouyer }
505 1.1.1.2.2.2 bouyer
506 1.1.1.2.2.2 bouyer return (AE_OK);
507 1.1.1.2.2.2 bouyer }
508 1.1.1.2.2.2 bouyer
509 1.1.1.2.2.2 bouyer
510 1.1.1.2.2.2 bouyer /*******************************************************************************
511 1.1.1.2.2.2 bouyer *
512 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtGetResourceType
513 1.1.1.2.2.2 bouyer *
514 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource descriptor
515 1.1.1.2.2.2 bouyer *
516 1.1.1.2.2.2 bouyer * RETURN: The Resource Type with no extraneous bits (except the
517 1.1.1.2.2.2 bouyer * Large/Small descriptor bit -- this is left alone)
518 1.1.1.2.2.2 bouyer *
519 1.1.1.2.2.2 bouyer * DESCRIPTION: Extract the Resource Type/Name from the first byte of
520 1.1.1.2.2.2 bouyer * a resource descriptor.
521 1.1.1.2.2.2 bouyer *
522 1.1.1.2.2.2 bouyer ******************************************************************************/
523 1.1.1.2.2.2 bouyer
524 1.1.1.2.2.2 bouyer UINT8
525 1.1.1.2.2.2 bouyer AcpiUtGetResourceType (
526 1.1.1.2.2.2 bouyer void *Aml)
527 1.1.1.2.2.2 bouyer {
528 1.1.1.2.2.2 bouyer ACPI_FUNCTION_ENTRY ();
529 1.1.1.2.2.2 bouyer
530 1.1.1.2.2.2 bouyer
531 1.1.1.2.2.2 bouyer /*
532 1.1.1.2.2.2 bouyer * Byte 0 contains the descriptor name (Resource Type)
533 1.1.1.2.2.2 bouyer * Examine the large/small bit in the resource header
534 1.1.1.2.2.2 bouyer */
535 1.1.1.2.2.2 bouyer if (ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_LARGE)
536 1.1.1.2.2.2 bouyer {
537 1.1.1.2.2.2 bouyer /* Large Resource Type -- bits 6:0 contain the name */
538 1.1.1.2.2.2 bouyer
539 1.1.1.2.2.2 bouyer return (ACPI_GET8 (Aml));
540 1.1.1.2.2.2 bouyer }
541 1.1.1.2.2.2 bouyer else
542 1.1.1.2.2.2 bouyer {
543 1.1.1.2.2.2 bouyer /* Small Resource Type -- bits 6:3 contain the name */
544 1.1.1.2.2.2 bouyer
545 1.1.1.2.2.2 bouyer return ((UINT8) (ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_SMALL_MASK));
546 1.1.1.2.2.2 bouyer }
547 1.1.1.2.2.2 bouyer }
548 1.1.1.2.2.2 bouyer
549 1.1.1.2.2.2 bouyer
550 1.1.1.2.2.2 bouyer /*******************************************************************************
551 1.1.1.2.2.2 bouyer *
552 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtGetResourceLength
553 1.1.1.2.2.2 bouyer *
554 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource descriptor
555 1.1.1.2.2.2 bouyer *
556 1.1.1.2.2.2 bouyer * RETURN: Byte Length
557 1.1.1.2.2.2 bouyer *
558 1.1.1.2.2.2 bouyer * DESCRIPTION: Get the "Resource Length" of a raw AML descriptor. By
559 1.1.1.2.2.2 bouyer * definition, this does not include the size of the descriptor
560 1.1.1.2.2.2 bouyer * header or the length field itself.
561 1.1.1.2.2.2 bouyer *
562 1.1.1.2.2.2 bouyer ******************************************************************************/
563 1.1.1.2.2.2 bouyer
564 1.1.1.2.2.2 bouyer UINT16
565 1.1.1.2.2.2 bouyer AcpiUtGetResourceLength (
566 1.1.1.2.2.2 bouyer void *Aml)
567 1.1.1.2.2.2 bouyer {
568 1.1.1.2.2.2 bouyer ACPI_RS_LENGTH ResourceLength;
569 1.1.1.2.2.2 bouyer
570 1.1.1.2.2.2 bouyer
571 1.1.1.2.2.2 bouyer ACPI_FUNCTION_ENTRY ();
572 1.1.1.2.2.2 bouyer
573 1.1.1.2.2.2 bouyer
574 1.1.1.2.2.2 bouyer /*
575 1.1.1.2.2.2 bouyer * Byte 0 contains the descriptor name (Resource Type)
576 1.1.1.2.2.2 bouyer * Examine the large/small bit in the resource header
577 1.1.1.2.2.2 bouyer */
578 1.1.1.2.2.2 bouyer if (ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_LARGE)
579 1.1.1.2.2.2 bouyer {
580 1.1.1.2.2.2 bouyer /* Large Resource type -- bytes 1-2 contain the 16-bit length */
581 1.1.1.2.2.2 bouyer
582 1.1.1.2.2.2 bouyer ACPI_MOVE_16_TO_16 (&ResourceLength, ACPI_ADD_PTR (UINT8, Aml, 1));
583 1.1.1.2.2.2 bouyer
584 1.1.1.2.2.2 bouyer }
585 1.1.1.2.2.2 bouyer else
586 1.1.1.2.2.2 bouyer {
587 1.1.1.2.2.2 bouyer /* Small Resource type -- bits 2:0 of byte 0 contain the length */
588 1.1.1.2.2.2 bouyer
589 1.1.1.2.2.2 bouyer ResourceLength = (UINT16) (ACPI_GET8 (Aml) &
590 1.1.1.2.2.2 bouyer ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK);
591 1.1.1.2.2.2 bouyer }
592 1.1.1.2.2.2 bouyer
593 1.1.1.2.2.2 bouyer return (ResourceLength);
594 1.1.1.2.2.2 bouyer }
595 1.1.1.2.2.2 bouyer
596 1.1.1.2.2.2 bouyer
597 1.1.1.2.2.2 bouyer /*******************************************************************************
598 1.1.1.2.2.2 bouyer *
599 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtGetResourceHeaderLength
600 1.1.1.2.2.2 bouyer *
601 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource descriptor
602 1.1.1.2.2.2 bouyer *
603 1.1.1.2.2.2 bouyer * RETURN: Length of the AML header (depends on large/small descriptor)
604 1.1.1.2.2.2 bouyer *
605 1.1.1.2.2.2 bouyer * DESCRIPTION: Get the length of the header for this resource.
606 1.1.1.2.2.2 bouyer *
607 1.1.1.2.2.2 bouyer ******************************************************************************/
608 1.1.1.2.2.2 bouyer
609 1.1.1.2.2.2 bouyer UINT8
610 1.1.1.2.2.2 bouyer AcpiUtGetResourceHeaderLength (
611 1.1.1.2.2.2 bouyer void *Aml)
612 1.1.1.2.2.2 bouyer {
613 1.1.1.2.2.2 bouyer ACPI_FUNCTION_ENTRY ();
614 1.1.1.2.2.2 bouyer
615 1.1.1.2.2.2 bouyer
616 1.1.1.2.2.2 bouyer /* Examine the large/small bit in the resource header */
617 1.1.1.2.2.2 bouyer
618 1.1.1.2.2.2 bouyer if (ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_LARGE)
619 1.1.1.2.2.2 bouyer {
620 1.1.1.2.2.2 bouyer return (sizeof (AML_RESOURCE_LARGE_HEADER));
621 1.1.1.2.2.2 bouyer }
622 1.1.1.2.2.2 bouyer else
623 1.1.1.2.2.2 bouyer {
624 1.1.1.2.2.2 bouyer return (sizeof (AML_RESOURCE_SMALL_HEADER));
625 1.1.1.2.2.2 bouyer }
626 1.1.1.2.2.2 bouyer }
627 1.1.1.2.2.2 bouyer
628 1.1.1.2.2.2 bouyer
629 1.1.1.2.2.2 bouyer /*******************************************************************************
630 1.1.1.2.2.2 bouyer *
631 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtGetDescriptorLength
632 1.1.1.2.2.2 bouyer *
633 1.1.1.2.2.2 bouyer * PARAMETERS: Aml - Pointer to the raw AML resource descriptor
634 1.1.1.2.2.2 bouyer *
635 1.1.1.2.2.2 bouyer * RETURN: Byte length
636 1.1.1.2.2.2 bouyer *
637 1.1.1.2.2.2 bouyer * DESCRIPTION: Get the total byte length of a raw AML descriptor, including the
638 1.1.1.2.2.2 bouyer * length of the descriptor header and the length field itself.
639 1.1.1.2.2.2 bouyer * Used to walk descriptor lists.
640 1.1.1.2.2.2 bouyer *
641 1.1.1.2.2.2 bouyer ******************************************************************************/
642 1.1.1.2.2.2 bouyer
643 1.1.1.2.2.2 bouyer UINT32
644 1.1.1.2.2.2 bouyer AcpiUtGetDescriptorLength (
645 1.1.1.2.2.2 bouyer void *Aml)
646 1.1.1.2.2.2 bouyer {
647 1.1.1.2.2.2 bouyer ACPI_FUNCTION_ENTRY ();
648 1.1.1.2.2.2 bouyer
649 1.1.1.2.2.2 bouyer
650 1.1.1.2.2.2 bouyer /*
651 1.1.1.2.2.2 bouyer * Get the Resource Length (does not include header length) and add
652 1.1.1.2.2.2 bouyer * the header length (depends on if this is a small or large resource)
653 1.1.1.2.2.2 bouyer */
654 1.1.1.2.2.2 bouyer return (AcpiUtGetResourceLength (Aml) +
655 1.1.1.2.2.2 bouyer AcpiUtGetResourceHeaderLength (Aml));
656 1.1.1.2.2.2 bouyer }
657 1.1.1.2.2.2 bouyer
658 1.1.1.2.2.2 bouyer
659 1.1.1.2.2.2 bouyer /*******************************************************************************
660 1.1.1.2.2.2 bouyer *
661 1.1.1.2.2.2 bouyer * FUNCTION: AcpiUtGetResourceEndTag
662 1.1.1.2.2.2 bouyer *
663 1.1.1.2.2.2 bouyer * PARAMETERS: ObjDesc - The resource template buffer object
664 1.1.1.2.2.2 bouyer * EndTag - Where the pointer to the EndTag is returned
665 1.1.1.2.2.2 bouyer *
666 1.1.1.2.2.2 bouyer * RETURN: Status, pointer to the end tag
667 1.1.1.2.2.2 bouyer *
668 1.1.1.2.2.2 bouyer * DESCRIPTION: Find the EndTag resource descriptor in an AML resource template
669 1.1.1.2.2.2 bouyer * Note: allows a buffer length of zero.
670 1.1.1.2.2.2 bouyer *
671 1.1.1.2.2.2 bouyer ******************************************************************************/
672 1.1.1.2.2.2 bouyer
673 1.1.1.2.2.2 bouyer ACPI_STATUS
674 1.1.1.2.2.2 bouyer AcpiUtGetResourceEndTag (
675 1.1.1.2.2.2 bouyer ACPI_OPERAND_OBJECT *ObjDesc,
676 1.1.1.2.2.2 bouyer UINT8 **EndTag)
677 1.1.1.2.2.2 bouyer {
678 1.1.1.2.2.2 bouyer ACPI_STATUS Status;
679 1.1.1.2.2.2 bouyer
680 1.1.1.2.2.2 bouyer
681 1.1.1.2.2.2 bouyer ACPI_FUNCTION_TRACE (UtGetResourceEndTag);
682 1.1.1.2.2.2 bouyer
683 1.1.1.2.2.2 bouyer
684 1.1.1.2.2.2 bouyer /* Allow a buffer length of zero */
685 1.1.1.2.2.2 bouyer
686 1.1.1.2.2.2 bouyer if (!ObjDesc->Buffer.Length)
687 1.1.1.2.2.2 bouyer {
688 1.1.1.2.2.2 bouyer *EndTag = ObjDesc->Buffer.Pointer;
689 1.1.1.2.2.2 bouyer return_ACPI_STATUS (AE_OK);
690 1.1.1.2.2.2 bouyer }
691 1.1.1.2.2.2 bouyer
692 1.1.1.2.2.2 bouyer /* Validate the template and get a pointer to the EndTag */
693 1.1.1.2.2.2 bouyer
694 1.1.1.2.2.2 bouyer Status = AcpiUtWalkAmlResources (ObjDesc->Buffer.Pointer,
695 1.1.1.2.2.2 bouyer ObjDesc->Buffer.Length, NULL, EndTag);
696 1.1.1.2.2.2 bouyer
697 1.1.1.2.2.2 bouyer return_ACPI_STATUS (Status);
698 1.1.1.2.2.2 bouyer }
699 1.1.1.2.2.2 bouyer
700 1.1.1.2.2.2 bouyer
701