dsopcode.c revision 1.3.4.2 1 1.3.4.2 rmind /******************************************************************************
2 1.3.4.2 rmind *
3 1.3.4.2 rmind * Module Name: dsopcode - Dispatcher suport for regions and fields
4 1.3.4.2 rmind *
5 1.3.4.2 rmind *****************************************************************************/
6 1.3.4.2 rmind
7 1.3.4.2 rmind /*
8 1.3.4.2 rmind * Copyright (C) 2000 - 2011, Intel Corp.
9 1.3.4.2 rmind * All rights reserved.
10 1.3.4.2 rmind *
11 1.3.4.2 rmind * Redistribution and use in source and binary forms, with or without
12 1.3.4.2 rmind * modification, are permitted provided that the following conditions
13 1.3.4.2 rmind * are met:
14 1.3.4.2 rmind * 1. Redistributions of source code must retain the above copyright
15 1.3.4.2 rmind * notice, this list of conditions, and the following disclaimer,
16 1.3.4.2 rmind * without modification.
17 1.3.4.2 rmind * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.3.4.2 rmind * substantially similar to the "NO WARRANTY" disclaimer below
19 1.3.4.2 rmind * ("Disclaimer") and any redistribution must be conditioned upon
20 1.3.4.2 rmind * including a substantially similar Disclaimer requirement for further
21 1.3.4.2 rmind * binary redistribution.
22 1.3.4.2 rmind * 3. Neither the names of the above-listed copyright holders nor the names
23 1.3.4.2 rmind * of any contributors may be used to endorse or promote products derived
24 1.3.4.2 rmind * from this software without specific prior written permission.
25 1.3.4.2 rmind *
26 1.3.4.2 rmind * Alternatively, this software may be distributed under the terms of the
27 1.3.4.2 rmind * GNU General Public License ("GPL") version 2 as published by the Free
28 1.3.4.2 rmind * Software Foundation.
29 1.3.4.2 rmind *
30 1.3.4.2 rmind * NO WARRANTY
31 1.3.4.2 rmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.3.4.2 rmind * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.3.4.2 rmind * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.3.4.2 rmind * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.3.4.2 rmind * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.3.4.2 rmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.3.4.2 rmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.3.4.2 rmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.3.4.2 rmind * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.3.4.2 rmind * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.3.4.2 rmind * POSSIBILITY OF SUCH DAMAGES.
42 1.3.4.2 rmind */
43 1.3.4.2 rmind
44 1.3.4.2 rmind #define __DSOPCODE_C__
45 1.3.4.2 rmind
46 1.3.4.2 rmind #include "acpi.h"
47 1.3.4.2 rmind #include "accommon.h"
48 1.3.4.2 rmind #include "acparser.h"
49 1.3.4.2 rmind #include "amlcode.h"
50 1.3.4.2 rmind #include "acdispat.h"
51 1.3.4.2 rmind #include "acinterp.h"
52 1.3.4.2 rmind #include "acnamesp.h"
53 1.3.4.2 rmind #include "acevents.h"
54 1.3.4.2 rmind #include "actables.h"
55 1.3.4.2 rmind
56 1.3.4.2 rmind #define _COMPONENT ACPI_DISPATCHER
57 1.3.4.2 rmind ACPI_MODULE_NAME ("dsopcode")
58 1.3.4.2 rmind
59 1.3.4.2 rmind /* Local prototypes */
60 1.3.4.2 rmind
61 1.3.4.2 rmind static ACPI_STATUS
62 1.3.4.2 rmind AcpiDsInitBufferField (
63 1.3.4.2 rmind UINT16 AmlOpcode,
64 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc,
65 1.3.4.2 rmind ACPI_OPERAND_OBJECT *BufferDesc,
66 1.3.4.2 rmind ACPI_OPERAND_OBJECT *OffsetDesc,
67 1.3.4.2 rmind ACPI_OPERAND_OBJECT *LengthDesc,
68 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ResultDesc);
69 1.3.4.2 rmind
70 1.3.4.2 rmind
71 1.3.4.2 rmind /*******************************************************************************
72 1.3.4.2 rmind *
73 1.3.4.2 rmind * FUNCTION: AcpiDsInitializeRegion
74 1.3.4.2 rmind *
75 1.3.4.2 rmind * PARAMETERS: ObjHandle - Region namespace node
76 1.3.4.2 rmind *
77 1.3.4.2 rmind * RETURN: Status
78 1.3.4.2 rmind *
79 1.3.4.2 rmind * DESCRIPTION: Front end to EvInitializeRegion
80 1.3.4.2 rmind *
81 1.3.4.2 rmind ******************************************************************************/
82 1.3.4.2 rmind
83 1.3.4.2 rmind ACPI_STATUS
84 1.3.4.2 rmind AcpiDsInitializeRegion (
85 1.3.4.2 rmind ACPI_HANDLE ObjHandle)
86 1.3.4.2 rmind {
87 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc;
88 1.3.4.2 rmind ACPI_STATUS Status;
89 1.3.4.2 rmind
90 1.3.4.2 rmind
91 1.3.4.2 rmind ObjDesc = AcpiNsGetAttachedObject (ObjHandle);
92 1.3.4.2 rmind
93 1.3.4.2 rmind /* Namespace is NOT locked */
94 1.3.4.2 rmind
95 1.3.4.2 rmind Status = AcpiEvInitializeRegion (ObjDesc, FALSE);
96 1.3.4.2 rmind return (Status);
97 1.3.4.2 rmind }
98 1.3.4.2 rmind
99 1.3.4.2 rmind
100 1.3.4.2 rmind /*******************************************************************************
101 1.3.4.2 rmind *
102 1.3.4.2 rmind * FUNCTION: AcpiDsInitBufferField
103 1.3.4.2 rmind *
104 1.3.4.2 rmind * PARAMETERS: AmlOpcode - CreateXxxField
105 1.3.4.2 rmind * ObjDesc - BufferField object
106 1.3.4.2 rmind * BufferDesc - Host Buffer
107 1.3.4.2 rmind * OffsetDesc - Offset into buffer
108 1.3.4.2 rmind * LengthDesc - Length of field (CREATE_FIELD_OP only)
109 1.3.4.2 rmind * ResultDesc - Where to store the result
110 1.3.4.2 rmind *
111 1.3.4.2 rmind * RETURN: Status
112 1.3.4.2 rmind *
113 1.3.4.2 rmind * DESCRIPTION: Perform actual initialization of a buffer field
114 1.3.4.2 rmind *
115 1.3.4.2 rmind ******************************************************************************/
116 1.3.4.2 rmind
117 1.3.4.2 rmind static ACPI_STATUS
118 1.3.4.2 rmind AcpiDsInitBufferField (
119 1.3.4.2 rmind UINT16 AmlOpcode,
120 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc,
121 1.3.4.2 rmind ACPI_OPERAND_OBJECT *BufferDesc,
122 1.3.4.2 rmind ACPI_OPERAND_OBJECT *OffsetDesc,
123 1.3.4.2 rmind ACPI_OPERAND_OBJECT *LengthDesc,
124 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ResultDesc)
125 1.3.4.2 rmind {
126 1.3.4.2 rmind UINT32 Offset;
127 1.3.4.2 rmind UINT32 BitOffset;
128 1.3.4.2 rmind UINT32 BitCount;
129 1.3.4.2 rmind UINT8 FieldFlags;
130 1.3.4.2 rmind ACPI_STATUS Status;
131 1.3.4.2 rmind
132 1.3.4.2 rmind
133 1.3.4.2 rmind ACPI_FUNCTION_TRACE_PTR (DsInitBufferField, ObjDesc);
134 1.3.4.2 rmind
135 1.3.4.2 rmind
136 1.3.4.2 rmind /* Host object must be a Buffer */
137 1.3.4.2 rmind
138 1.3.4.2 rmind if (BufferDesc->Common.Type != ACPI_TYPE_BUFFER)
139 1.3.4.2 rmind {
140 1.3.4.2 rmind ACPI_ERROR ((AE_INFO,
141 1.3.4.2 rmind "Target of Create Field is not a Buffer object - %s",
142 1.3.4.2 rmind AcpiUtGetObjectTypeName (BufferDesc)));
143 1.3.4.2 rmind
144 1.3.4.2 rmind Status = AE_AML_OPERAND_TYPE;
145 1.3.4.2 rmind goto Cleanup;
146 1.3.4.2 rmind }
147 1.3.4.2 rmind
148 1.3.4.2 rmind /*
149 1.3.4.2 rmind * The last parameter to all of these opcodes (ResultDesc) started
150 1.3.4.2 rmind * out as a NameString, and should therefore now be a NS node
151 1.3.4.2 rmind * after resolution in AcpiExResolveOperands().
152 1.3.4.2 rmind */
153 1.3.4.2 rmind if (ACPI_GET_DESCRIPTOR_TYPE (ResultDesc) != ACPI_DESC_TYPE_NAMED)
154 1.3.4.2 rmind {
155 1.3.4.2 rmind ACPI_ERROR ((AE_INFO,
156 1.3.4.2 rmind "(%s) destination not a NS Node [%s]",
157 1.3.4.2 rmind AcpiPsGetOpcodeName (AmlOpcode),
158 1.3.4.2 rmind AcpiUtGetDescriptorName (ResultDesc)));
159 1.3.4.2 rmind
160 1.3.4.2 rmind Status = AE_AML_OPERAND_TYPE;
161 1.3.4.2 rmind goto Cleanup;
162 1.3.4.2 rmind }
163 1.3.4.2 rmind
164 1.3.4.2 rmind Offset = (UINT32) OffsetDesc->Integer.Value;
165 1.3.4.2 rmind
166 1.3.4.2 rmind /*
167 1.3.4.2 rmind * Setup the Bit offsets and counts, according to the opcode
168 1.3.4.2 rmind */
169 1.3.4.2 rmind switch (AmlOpcode)
170 1.3.4.2 rmind {
171 1.3.4.2 rmind case AML_CREATE_FIELD_OP:
172 1.3.4.2 rmind
173 1.3.4.2 rmind /* Offset is in bits, count is in bits */
174 1.3.4.2 rmind
175 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_BYTE;
176 1.3.4.2 rmind BitOffset = Offset;
177 1.3.4.2 rmind BitCount = (UINT32) LengthDesc->Integer.Value;
178 1.3.4.2 rmind
179 1.3.4.2 rmind /* Must have a valid (>0) bit count */
180 1.3.4.2 rmind
181 1.3.4.2 rmind if (BitCount == 0)
182 1.3.4.2 rmind {
183 1.3.4.2 rmind ACPI_ERROR ((AE_INFO,
184 1.3.4.2 rmind "Attempt to CreateField of length zero"));
185 1.3.4.2 rmind Status = AE_AML_OPERAND_VALUE;
186 1.3.4.2 rmind goto Cleanup;
187 1.3.4.2 rmind }
188 1.3.4.2 rmind break;
189 1.3.4.2 rmind
190 1.3.4.2 rmind case AML_CREATE_BIT_FIELD_OP:
191 1.3.4.2 rmind
192 1.3.4.2 rmind /* Offset is in bits, Field is one bit */
193 1.3.4.2 rmind
194 1.3.4.2 rmind BitOffset = Offset;
195 1.3.4.2 rmind BitCount = 1;
196 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_BYTE;
197 1.3.4.2 rmind break;
198 1.3.4.2 rmind
199 1.3.4.2 rmind case AML_CREATE_BYTE_FIELD_OP:
200 1.3.4.2 rmind
201 1.3.4.2 rmind /* Offset is in bytes, field is one byte */
202 1.3.4.2 rmind
203 1.3.4.2 rmind BitOffset = 8 * Offset;
204 1.3.4.2 rmind BitCount = 8;
205 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_BYTE;
206 1.3.4.2 rmind break;
207 1.3.4.2 rmind
208 1.3.4.2 rmind case AML_CREATE_WORD_FIELD_OP:
209 1.3.4.2 rmind
210 1.3.4.2 rmind /* Offset is in bytes, field is one word */
211 1.3.4.2 rmind
212 1.3.4.2 rmind BitOffset = 8 * Offset;
213 1.3.4.2 rmind BitCount = 16;
214 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_WORD;
215 1.3.4.2 rmind break;
216 1.3.4.2 rmind
217 1.3.4.2 rmind case AML_CREATE_DWORD_FIELD_OP:
218 1.3.4.2 rmind
219 1.3.4.2 rmind /* Offset is in bytes, field is one dword */
220 1.3.4.2 rmind
221 1.3.4.2 rmind BitOffset = 8 * Offset;
222 1.3.4.2 rmind BitCount = 32;
223 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_DWORD;
224 1.3.4.2 rmind break;
225 1.3.4.2 rmind
226 1.3.4.2 rmind case AML_CREATE_QWORD_FIELD_OP:
227 1.3.4.2 rmind
228 1.3.4.2 rmind /* Offset is in bytes, field is one qword */
229 1.3.4.2 rmind
230 1.3.4.2 rmind BitOffset = 8 * Offset;
231 1.3.4.2 rmind BitCount = 64;
232 1.3.4.2 rmind FieldFlags = AML_FIELD_ACCESS_QWORD;
233 1.3.4.2 rmind break;
234 1.3.4.2 rmind
235 1.3.4.2 rmind default:
236 1.3.4.2 rmind
237 1.3.4.2 rmind ACPI_ERROR ((AE_INFO,
238 1.3.4.2 rmind "Unknown field creation opcode 0x%02X",
239 1.3.4.2 rmind AmlOpcode));
240 1.3.4.2 rmind Status = AE_AML_BAD_OPCODE;
241 1.3.4.2 rmind goto Cleanup;
242 1.3.4.2 rmind }
243 1.3.4.2 rmind
244 1.3.4.2 rmind /* Entire field must fit within the current length of the buffer */
245 1.3.4.2 rmind
246 1.3.4.2 rmind if ((BitOffset + BitCount) >
247 1.3.4.2 rmind (8 * (UINT32) BufferDesc->Buffer.Length))
248 1.3.4.2 rmind {
249 1.3.4.2 rmind ACPI_ERROR ((AE_INFO,
250 1.3.4.2 rmind "Field [%4.4s] at %u exceeds Buffer [%4.4s] size %u (bits)",
251 1.3.4.2 rmind AcpiUtGetNodeName (ResultDesc),
252 1.3.4.2 rmind BitOffset + BitCount,
253 1.3.4.2 rmind AcpiUtGetNodeName (BufferDesc->Buffer.Node),
254 1.3.4.2 rmind 8 * (UINT32) BufferDesc->Buffer.Length));
255 1.3.4.2 rmind Status = AE_AML_BUFFER_LIMIT;
256 1.3.4.2 rmind goto Cleanup;
257 1.3.4.2 rmind }
258 1.3.4.2 rmind
259 1.3.4.2 rmind /*
260 1.3.4.2 rmind * Initialize areas of the field object that are common to all fields
261 1.3.4.2 rmind * For FieldFlags, use LOCK_RULE = 0 (NO_LOCK),
262 1.3.4.2 rmind * UPDATE_RULE = 0 (UPDATE_PRESERVE)
263 1.3.4.2 rmind */
264 1.3.4.2 rmind Status = AcpiExPrepCommonFieldObject (ObjDesc, FieldFlags, 0,
265 1.3.4.2 rmind BitOffset, BitCount);
266 1.3.4.2 rmind if (ACPI_FAILURE (Status))
267 1.3.4.2 rmind {
268 1.3.4.2 rmind goto Cleanup;
269 1.3.4.2 rmind }
270 1.3.4.2 rmind
271 1.3.4.2 rmind ObjDesc->BufferField.BufferObj = BufferDesc;
272 1.3.4.2 rmind
273 1.3.4.2 rmind /* Reference count for BufferDesc inherits ObjDesc count */
274 1.3.4.2 rmind
275 1.3.4.2 rmind BufferDesc->Common.ReferenceCount = (UINT16)
276 1.3.4.2 rmind (BufferDesc->Common.ReferenceCount + ObjDesc->Common.ReferenceCount);
277 1.3.4.2 rmind
278 1.3.4.2 rmind
279 1.3.4.2 rmind Cleanup:
280 1.3.4.2 rmind
281 1.3.4.2 rmind /* Always delete the operands */
282 1.3.4.2 rmind
283 1.3.4.2 rmind AcpiUtRemoveReference (OffsetDesc);
284 1.3.4.2 rmind AcpiUtRemoveReference (BufferDesc);
285 1.3.4.2 rmind
286 1.3.4.2 rmind if (AmlOpcode == AML_CREATE_FIELD_OP)
287 1.3.4.2 rmind {
288 1.3.4.2 rmind AcpiUtRemoveReference (LengthDesc);
289 1.3.4.2 rmind }
290 1.3.4.2 rmind
291 1.3.4.2 rmind /* On failure, delete the result descriptor */
292 1.3.4.2 rmind
293 1.3.4.2 rmind if (ACPI_FAILURE (Status))
294 1.3.4.2 rmind {
295 1.3.4.2 rmind AcpiUtRemoveReference (ResultDesc); /* Result descriptor */
296 1.3.4.2 rmind }
297 1.3.4.2 rmind else
298 1.3.4.2 rmind {
299 1.3.4.2 rmind /* Now the address and length are valid for this BufferField */
300 1.3.4.2 rmind
301 1.3.4.2 rmind ObjDesc->BufferField.Flags |= AOPOBJ_DATA_VALID;
302 1.3.4.2 rmind }
303 1.3.4.2 rmind
304 1.3.4.2 rmind return_ACPI_STATUS (Status);
305 1.3.4.2 rmind }
306 1.3.4.2 rmind
307 1.3.4.2 rmind
308 1.3.4.2 rmind /*******************************************************************************
309 1.3.4.2 rmind *
310 1.3.4.2 rmind * FUNCTION: AcpiDsEvalBufferFieldOperands
311 1.3.4.2 rmind *
312 1.3.4.2 rmind * PARAMETERS: WalkState - Current walk
313 1.3.4.2 rmind * Op - A valid BufferField Op object
314 1.3.4.2 rmind *
315 1.3.4.2 rmind * RETURN: Status
316 1.3.4.2 rmind *
317 1.3.4.2 rmind * DESCRIPTION: Get BufferField Buffer and Index
318 1.3.4.2 rmind * Called from AcpiDsExecEndOp during BufferField parse tree walk
319 1.3.4.2 rmind *
320 1.3.4.2 rmind ******************************************************************************/
321 1.3.4.2 rmind
322 1.3.4.2 rmind ACPI_STATUS
323 1.3.4.2 rmind AcpiDsEvalBufferFieldOperands (
324 1.3.4.2 rmind ACPI_WALK_STATE *WalkState,
325 1.3.4.2 rmind ACPI_PARSE_OBJECT *Op)
326 1.3.4.2 rmind {
327 1.3.4.2 rmind ACPI_STATUS Status;
328 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc;
329 1.3.4.2 rmind ACPI_NAMESPACE_NODE *Node;
330 1.3.4.2 rmind ACPI_PARSE_OBJECT *NextOp;
331 1.3.4.2 rmind
332 1.3.4.2 rmind
333 1.3.4.2 rmind ACPI_FUNCTION_TRACE_PTR (DsEvalBufferFieldOperands, Op);
334 1.3.4.2 rmind
335 1.3.4.2 rmind
336 1.3.4.2 rmind /*
337 1.3.4.2 rmind * This is where we evaluate the address and length fields of the
338 1.3.4.2 rmind * CreateXxxField declaration
339 1.3.4.2 rmind */
340 1.3.4.2 rmind Node = Op->Common.Node;
341 1.3.4.2 rmind
342 1.3.4.2 rmind /* NextOp points to the op that holds the Buffer */
343 1.3.4.2 rmind
344 1.3.4.2 rmind NextOp = Op->Common.Value.Arg;
345 1.3.4.2 rmind
346 1.3.4.2 rmind /* Evaluate/create the address and length operands */
347 1.3.4.2 rmind
348 1.3.4.2 rmind Status = AcpiDsCreateOperands (WalkState, NextOp);
349 1.3.4.2 rmind if (ACPI_FAILURE (Status))
350 1.3.4.2 rmind {
351 1.3.4.2 rmind return_ACPI_STATUS (Status);
352 1.3.4.2 rmind }
353 1.3.4.2 rmind
354 1.3.4.2 rmind ObjDesc = AcpiNsGetAttachedObject (Node);
355 1.3.4.2 rmind if (!ObjDesc)
356 1.3.4.2 rmind {
357 1.3.4.2 rmind return_ACPI_STATUS (AE_NOT_EXIST);
358 1.3.4.2 rmind }
359 1.3.4.2 rmind
360 1.3.4.2 rmind /* Resolve the operands */
361 1.3.4.2 rmind
362 1.3.4.2 rmind Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
363 1.3.4.2 rmind ACPI_WALK_OPERANDS, WalkState);
364 1.3.4.2 rmind if (ACPI_FAILURE (Status))
365 1.3.4.2 rmind {
366 1.3.4.2 rmind ACPI_ERROR ((AE_INFO, "(%s) bad operand(s), status 0x%X",
367 1.3.4.2 rmind AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Status));
368 1.3.4.2 rmind
369 1.3.4.2 rmind return_ACPI_STATUS (Status);
370 1.3.4.2 rmind }
371 1.3.4.2 rmind
372 1.3.4.2 rmind /* Initialize the Buffer Field */
373 1.3.4.2 rmind
374 1.3.4.2 rmind if (Op->Common.AmlOpcode == AML_CREATE_FIELD_OP)
375 1.3.4.2 rmind {
376 1.3.4.2 rmind /* NOTE: Slightly different operands for this opcode */
377 1.3.4.2 rmind
378 1.3.4.2 rmind Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
379 1.3.4.2 rmind WalkState->Operands[0], WalkState->Operands[1],
380 1.3.4.2 rmind WalkState->Operands[2], WalkState->Operands[3]);
381 1.3.4.2 rmind }
382 1.3.4.2 rmind else
383 1.3.4.2 rmind {
384 1.3.4.2 rmind /* All other, CreateXxxField opcodes */
385 1.3.4.2 rmind
386 1.3.4.2 rmind Status = AcpiDsInitBufferField (Op->Common.AmlOpcode, ObjDesc,
387 1.3.4.2 rmind WalkState->Operands[0], WalkState->Operands[1],
388 1.3.4.2 rmind NULL, WalkState->Operands[2]);
389 1.3.4.2 rmind }
390 1.3.4.2 rmind
391 1.3.4.2 rmind return_ACPI_STATUS (Status);
392 1.3.4.2 rmind }
393 1.3.4.2 rmind
394 1.3.4.2 rmind
395 1.3.4.2 rmind /*******************************************************************************
396 1.3.4.2 rmind *
397 1.3.4.2 rmind * FUNCTION: AcpiDsEvalRegionOperands
398 1.3.4.2 rmind *
399 1.3.4.2 rmind * PARAMETERS: WalkState - Current walk
400 1.3.4.2 rmind * Op - A valid region Op object
401 1.3.4.2 rmind *
402 1.3.4.2 rmind * RETURN: Status
403 1.3.4.2 rmind *
404 1.3.4.2 rmind * DESCRIPTION: Get region address and length
405 1.3.4.2 rmind * Called from AcpiDsExecEndOp during OpRegion parse tree walk
406 1.3.4.2 rmind *
407 1.3.4.2 rmind ******************************************************************************/
408 1.3.4.2 rmind
409 1.3.4.2 rmind ACPI_STATUS
410 1.3.4.2 rmind AcpiDsEvalRegionOperands (
411 1.3.4.2 rmind ACPI_WALK_STATE *WalkState,
412 1.3.4.2 rmind ACPI_PARSE_OBJECT *Op)
413 1.3.4.2 rmind {
414 1.3.4.2 rmind ACPI_STATUS Status;
415 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc;
416 1.3.4.2 rmind ACPI_OPERAND_OBJECT *OperandDesc;
417 1.3.4.2 rmind ACPI_NAMESPACE_NODE *Node;
418 1.3.4.2 rmind ACPI_PARSE_OBJECT *NextOp;
419 1.3.4.2 rmind
420 1.3.4.2 rmind
421 1.3.4.2 rmind ACPI_FUNCTION_TRACE_PTR (DsEvalRegionOperands, Op);
422 1.3.4.2 rmind
423 1.3.4.2 rmind
424 1.3.4.2 rmind /*
425 1.3.4.2 rmind * This is where we evaluate the address and length fields of the
426 1.3.4.2 rmind * OpRegion declaration
427 1.3.4.2 rmind */
428 1.3.4.2 rmind Node = Op->Common.Node;
429 1.3.4.2 rmind
430 1.3.4.2 rmind /* NextOp points to the op that holds the SpaceID */
431 1.3.4.2 rmind
432 1.3.4.2 rmind NextOp = Op->Common.Value.Arg;
433 1.3.4.2 rmind
434 1.3.4.2 rmind /* NextOp points to address op */
435 1.3.4.2 rmind
436 1.3.4.2 rmind NextOp = NextOp->Common.Next;
437 1.3.4.2 rmind
438 1.3.4.2 rmind /* Evaluate/create the address and length operands */
439 1.3.4.2 rmind
440 1.3.4.2 rmind Status = AcpiDsCreateOperands (WalkState, NextOp);
441 1.3.4.2 rmind if (ACPI_FAILURE (Status))
442 1.3.4.2 rmind {
443 1.3.4.2 rmind return_ACPI_STATUS (Status);
444 1.3.4.2 rmind }
445 1.3.4.2 rmind
446 1.3.4.2 rmind /* Resolve the length and address operands to numbers */
447 1.3.4.2 rmind
448 1.3.4.2 rmind Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
449 1.3.4.2 rmind ACPI_WALK_OPERANDS, WalkState);
450 1.3.4.2 rmind if (ACPI_FAILURE (Status))
451 1.3.4.2 rmind {
452 1.3.4.2 rmind return_ACPI_STATUS (Status);
453 1.3.4.2 rmind }
454 1.3.4.2 rmind
455 1.3.4.2 rmind ObjDesc = AcpiNsGetAttachedObject (Node);
456 1.3.4.2 rmind if (!ObjDesc)
457 1.3.4.2 rmind {
458 1.3.4.2 rmind return_ACPI_STATUS (AE_NOT_EXIST);
459 1.3.4.2 rmind }
460 1.3.4.2 rmind
461 1.3.4.2 rmind /*
462 1.3.4.2 rmind * Get the length operand and save it
463 1.3.4.2 rmind * (at Top of stack)
464 1.3.4.2 rmind */
465 1.3.4.2 rmind OperandDesc = WalkState->Operands[WalkState->NumOperands - 1];
466 1.3.4.2 rmind
467 1.3.4.2 rmind ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value;
468 1.3.4.2 rmind AcpiUtRemoveReference (OperandDesc);
469 1.3.4.2 rmind
470 1.3.4.2 rmind /*
471 1.3.4.2 rmind * Get the address and save it
472 1.3.4.2 rmind * (at top of stack - 1)
473 1.3.4.2 rmind */
474 1.3.4.2 rmind OperandDesc = WalkState->Operands[WalkState->NumOperands - 2];
475 1.3.4.2 rmind
476 1.3.4.2 rmind ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS)
477 1.3.4.2 rmind OperandDesc->Integer.Value;
478 1.3.4.2 rmind AcpiUtRemoveReference (OperandDesc);
479 1.3.4.2 rmind
480 1.3.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
481 1.3.4.2 rmind ObjDesc,
482 1.3.4.2 rmind ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
483 1.3.4.2 rmind ObjDesc->Region.Length));
484 1.3.4.2 rmind
485 1.3.4.2 rmind /* Now the address and length are valid for this opregion */
486 1.3.4.2 rmind
487 1.3.4.2 rmind ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
488 1.3.4.2 rmind
489 1.3.4.2 rmind return_ACPI_STATUS (Status);
490 1.3.4.2 rmind }
491 1.3.4.2 rmind
492 1.3.4.2 rmind
493 1.3.4.2 rmind /*******************************************************************************
494 1.3.4.2 rmind *
495 1.3.4.2 rmind * FUNCTION: AcpiDsEvalTableRegionOperands
496 1.3.4.2 rmind *
497 1.3.4.2 rmind * PARAMETERS: WalkState - Current walk
498 1.3.4.2 rmind * Op - A valid region Op object
499 1.3.4.2 rmind *
500 1.3.4.2 rmind * RETURN: Status
501 1.3.4.2 rmind *
502 1.3.4.2 rmind * DESCRIPTION: Get region address and length.
503 1.3.4.2 rmind * Called from AcpiDsExecEndOp during DataTableRegion parse
504 1.3.4.2 rmind * tree walk.
505 1.3.4.2 rmind *
506 1.3.4.2 rmind ******************************************************************************/
507 1.3.4.2 rmind
508 1.3.4.2 rmind ACPI_STATUS
509 1.3.4.2 rmind AcpiDsEvalTableRegionOperands (
510 1.3.4.2 rmind ACPI_WALK_STATE *WalkState,
511 1.3.4.2 rmind ACPI_PARSE_OBJECT *Op)
512 1.3.4.2 rmind {
513 1.3.4.2 rmind ACPI_STATUS Status;
514 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc;
515 1.3.4.2 rmind ACPI_OPERAND_OBJECT **Operand;
516 1.3.4.2 rmind ACPI_NAMESPACE_NODE *Node;
517 1.3.4.2 rmind ACPI_PARSE_OBJECT *NextOp;
518 1.3.4.2 rmind UINT32 TableIndex;
519 1.3.4.2 rmind ACPI_TABLE_HEADER *Table;
520 1.3.4.2 rmind
521 1.3.4.2 rmind
522 1.3.4.2 rmind ACPI_FUNCTION_TRACE_PTR (DsEvalTableRegionOperands, Op);
523 1.3.4.2 rmind
524 1.3.4.2 rmind
525 1.3.4.2 rmind /*
526 1.3.4.2 rmind * This is where we evaluate the SignatureString and OemIDString
527 1.3.4.2 rmind * and OemTableIDString of the DataTableRegion declaration
528 1.3.4.2 rmind */
529 1.3.4.2 rmind Node = Op->Common.Node;
530 1.3.4.2 rmind
531 1.3.4.2 rmind /* NextOp points to SignatureString op */
532 1.3.4.2 rmind
533 1.3.4.2 rmind NextOp = Op->Common.Value.Arg;
534 1.3.4.2 rmind
535 1.3.4.2 rmind /*
536 1.3.4.2 rmind * Evaluate/create the SignatureString and OemIDString
537 1.3.4.2 rmind * and OemTableIDString operands
538 1.3.4.2 rmind */
539 1.3.4.2 rmind Status = AcpiDsCreateOperands (WalkState, NextOp);
540 1.3.4.2 rmind if (ACPI_FAILURE (Status))
541 1.3.4.2 rmind {
542 1.3.4.2 rmind return_ACPI_STATUS (Status);
543 1.3.4.2 rmind }
544 1.3.4.2 rmind
545 1.3.4.2 rmind /*
546 1.3.4.2 rmind * Resolve the SignatureString and OemIDString
547 1.3.4.2 rmind * and OemTableIDString operands
548 1.3.4.2 rmind */
549 1.3.4.2 rmind Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
550 1.3.4.2 rmind ACPI_WALK_OPERANDS, WalkState);
551 1.3.4.2 rmind if (ACPI_FAILURE (Status))
552 1.3.4.2 rmind {
553 1.3.4.2 rmind return_ACPI_STATUS (Status);
554 1.3.4.2 rmind }
555 1.3.4.2 rmind
556 1.3.4.2 rmind Operand = &WalkState->Operands[0];
557 1.3.4.2 rmind
558 1.3.4.2 rmind /* Find the ACPI table */
559 1.3.4.2 rmind
560 1.3.4.2 rmind Status = AcpiTbFindTable (Operand[0]->String.Pointer,
561 1.3.4.2 rmind Operand[1]->String.Pointer, Operand[2]->String.Pointer,
562 1.3.4.2 rmind &TableIndex);
563 1.3.4.2 rmind if (ACPI_FAILURE (Status))
564 1.3.4.2 rmind {
565 1.3.4.2 rmind return_ACPI_STATUS (Status);
566 1.3.4.2 rmind }
567 1.3.4.2 rmind
568 1.3.4.2 rmind AcpiUtRemoveReference (Operand[0]);
569 1.3.4.2 rmind AcpiUtRemoveReference (Operand[1]);
570 1.3.4.2 rmind AcpiUtRemoveReference (Operand[2]);
571 1.3.4.2 rmind
572 1.3.4.2 rmind Status = AcpiGetTableByIndex (TableIndex, &Table);
573 1.3.4.2 rmind if (ACPI_FAILURE (Status))
574 1.3.4.2 rmind {
575 1.3.4.2 rmind return_ACPI_STATUS (Status);
576 1.3.4.2 rmind }
577 1.3.4.2 rmind
578 1.3.4.2 rmind ObjDesc = AcpiNsGetAttachedObject (Node);
579 1.3.4.2 rmind if (!ObjDesc)
580 1.3.4.2 rmind {
581 1.3.4.2 rmind return_ACPI_STATUS (AE_NOT_EXIST);
582 1.3.4.2 rmind }
583 1.3.4.2 rmind
584 1.3.4.2 rmind ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
585 1.3.4.2 rmind ObjDesc->Region.Length = Table->Length;
586 1.3.4.2 rmind
587 1.3.4.2 rmind ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
588 1.3.4.2 rmind ObjDesc,
589 1.3.4.2 rmind ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
590 1.3.4.2 rmind ObjDesc->Region.Length));
591 1.3.4.2 rmind
592 1.3.4.2 rmind /* Now the address and length are valid for this opregion */
593 1.3.4.2 rmind
594 1.3.4.2 rmind ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
595 1.3.4.2 rmind
596 1.3.4.2 rmind return_ACPI_STATUS (Status);
597 1.3.4.2 rmind }
598 1.3.4.2 rmind
599 1.3.4.2 rmind
600 1.3.4.2 rmind /*******************************************************************************
601 1.3.4.2 rmind *
602 1.3.4.2 rmind * FUNCTION: AcpiDsEvalDataObjectOperands
603 1.3.4.2 rmind *
604 1.3.4.2 rmind * PARAMETERS: WalkState - Current walk
605 1.3.4.2 rmind * Op - A valid DataObject Op object
606 1.3.4.2 rmind * ObjDesc - DataObject
607 1.3.4.2 rmind *
608 1.3.4.2 rmind * RETURN: Status
609 1.3.4.2 rmind *
610 1.3.4.2 rmind * DESCRIPTION: Get the operands and complete the following data object types:
611 1.3.4.2 rmind * Buffer, Package.
612 1.3.4.2 rmind *
613 1.3.4.2 rmind ******************************************************************************/
614 1.3.4.2 rmind
615 1.3.4.2 rmind ACPI_STATUS
616 1.3.4.2 rmind AcpiDsEvalDataObjectOperands (
617 1.3.4.2 rmind ACPI_WALK_STATE *WalkState,
618 1.3.4.2 rmind ACPI_PARSE_OBJECT *Op,
619 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc)
620 1.3.4.2 rmind {
621 1.3.4.2 rmind ACPI_STATUS Status;
622 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ArgDesc;
623 1.3.4.2 rmind UINT32 Length;
624 1.3.4.2 rmind
625 1.3.4.2 rmind
626 1.3.4.2 rmind ACPI_FUNCTION_TRACE (DsEvalDataObjectOperands);
627 1.3.4.2 rmind
628 1.3.4.2 rmind
629 1.3.4.2 rmind /* The first operand (for all of these data objects) is the length */
630 1.3.4.2 rmind
631 1.3.4.2 rmind /*
632 1.3.4.2 rmind * Set proper index into operand stack for AcpiDsObjStackPush
633 1.3.4.2 rmind * invoked inside AcpiDsCreateOperand.
634 1.3.4.2 rmind */
635 1.3.4.2 rmind WalkState->OperandIndex = WalkState->NumOperands;
636 1.3.4.2 rmind
637 1.3.4.2 rmind Status = AcpiDsCreateOperand (WalkState, Op->Common.Value.Arg, 1);
638 1.3.4.2 rmind if (ACPI_FAILURE (Status))
639 1.3.4.2 rmind {
640 1.3.4.2 rmind return_ACPI_STATUS (Status);
641 1.3.4.2 rmind }
642 1.3.4.2 rmind
643 1.3.4.2 rmind Status = AcpiExResolveOperands (WalkState->Opcode,
644 1.3.4.2 rmind &(WalkState->Operands [WalkState->NumOperands -1]),
645 1.3.4.2 rmind WalkState);
646 1.3.4.2 rmind if (ACPI_FAILURE (Status))
647 1.3.4.2 rmind {
648 1.3.4.2 rmind return_ACPI_STATUS (Status);
649 1.3.4.2 rmind }
650 1.3.4.2 rmind
651 1.3.4.2 rmind /* Extract length operand */
652 1.3.4.2 rmind
653 1.3.4.2 rmind ArgDesc = WalkState->Operands [WalkState->NumOperands - 1];
654 1.3.4.2 rmind Length = (UINT32) ArgDesc->Integer.Value;
655 1.3.4.2 rmind
656 1.3.4.2 rmind /* Cleanup for length operand */
657 1.3.4.2 rmind
658 1.3.4.2 rmind Status = AcpiDsObjStackPop (1, WalkState);
659 1.3.4.2 rmind if (ACPI_FAILURE (Status))
660 1.3.4.2 rmind {
661 1.3.4.2 rmind return_ACPI_STATUS (Status);
662 1.3.4.2 rmind }
663 1.3.4.2 rmind
664 1.3.4.2 rmind AcpiUtRemoveReference (ArgDesc);
665 1.3.4.2 rmind
666 1.3.4.2 rmind /*
667 1.3.4.2 rmind * Create the actual data object
668 1.3.4.2 rmind */
669 1.3.4.2 rmind switch (Op->Common.AmlOpcode)
670 1.3.4.2 rmind {
671 1.3.4.2 rmind case AML_BUFFER_OP:
672 1.3.4.2 rmind
673 1.3.4.2 rmind Status = AcpiDsBuildInternalBufferObj (WalkState, Op, Length, &ObjDesc);
674 1.3.4.2 rmind break;
675 1.3.4.2 rmind
676 1.3.4.2 rmind case AML_PACKAGE_OP:
677 1.3.4.2 rmind case AML_VAR_PACKAGE_OP:
678 1.3.4.2 rmind
679 1.3.4.2 rmind Status = AcpiDsBuildInternalPackageObj (WalkState, Op, Length, &ObjDesc);
680 1.3.4.2 rmind break;
681 1.3.4.2 rmind
682 1.3.4.2 rmind default:
683 1.3.4.2 rmind return_ACPI_STATUS (AE_AML_BAD_OPCODE);
684 1.3.4.2 rmind }
685 1.3.4.2 rmind
686 1.3.4.2 rmind if (ACPI_SUCCESS (Status))
687 1.3.4.2 rmind {
688 1.3.4.2 rmind /*
689 1.3.4.2 rmind * Return the object in the WalkState, unless the parent is a package -
690 1.3.4.2 rmind * in this case, the return object will be stored in the parse tree
691 1.3.4.2 rmind * for the package.
692 1.3.4.2 rmind */
693 1.3.4.2 rmind if ((!Op->Common.Parent) ||
694 1.3.4.2 rmind ((Op->Common.Parent->Common.AmlOpcode != AML_PACKAGE_OP) &&
695 1.3.4.2 rmind (Op->Common.Parent->Common.AmlOpcode != AML_VAR_PACKAGE_OP) &&
696 1.3.4.2 rmind (Op->Common.Parent->Common.AmlOpcode != AML_NAME_OP)))
697 1.3.4.2 rmind {
698 1.3.4.2 rmind WalkState->ResultObj = ObjDesc;
699 1.3.4.2 rmind }
700 1.3.4.2 rmind }
701 1.3.4.2 rmind
702 1.3.4.2 rmind return_ACPI_STATUS (Status);
703 1.3.4.2 rmind }
704 1.3.4.2 rmind
705 1.3.4.2 rmind
706 1.3.4.2 rmind /*******************************************************************************
707 1.3.4.2 rmind *
708 1.3.4.2 rmind * FUNCTION: AcpiDsEvalBankFieldOperands
709 1.3.4.2 rmind *
710 1.3.4.2 rmind * PARAMETERS: WalkState - Current walk
711 1.3.4.2 rmind * Op - A valid BankField Op object
712 1.3.4.2 rmind *
713 1.3.4.2 rmind * RETURN: Status
714 1.3.4.2 rmind *
715 1.3.4.2 rmind * DESCRIPTION: Get BankField BankValue
716 1.3.4.2 rmind * Called from AcpiDsExecEndOp during BankField parse tree walk
717 1.3.4.2 rmind *
718 1.3.4.2 rmind ******************************************************************************/
719 1.3.4.2 rmind
720 1.3.4.2 rmind ACPI_STATUS
721 1.3.4.2 rmind AcpiDsEvalBankFieldOperands (
722 1.3.4.2 rmind ACPI_WALK_STATE *WalkState,
723 1.3.4.2 rmind ACPI_PARSE_OBJECT *Op)
724 1.3.4.2 rmind {
725 1.3.4.2 rmind ACPI_STATUS Status;
726 1.3.4.2 rmind ACPI_OPERAND_OBJECT *ObjDesc;
727 1.3.4.2 rmind ACPI_OPERAND_OBJECT *OperandDesc;
728 1.3.4.2 rmind ACPI_NAMESPACE_NODE *Node;
729 1.3.4.2 rmind ACPI_PARSE_OBJECT *NextOp;
730 1.3.4.2 rmind ACPI_PARSE_OBJECT *Arg;
731 1.3.4.2 rmind
732 1.3.4.2 rmind
733 1.3.4.2 rmind ACPI_FUNCTION_TRACE_PTR (DsEvalBankFieldOperands, Op);
734 1.3.4.2 rmind
735 1.3.4.2 rmind
736 1.3.4.2 rmind /*
737 1.3.4.2 rmind * This is where we evaluate the BankValue field of the
738 1.3.4.2 rmind * BankField declaration
739 1.3.4.2 rmind */
740 1.3.4.2 rmind
741 1.3.4.2 rmind /* NextOp points to the op that holds the Region */
742 1.3.4.2 rmind
743 1.3.4.2 rmind NextOp = Op->Common.Value.Arg;
744 1.3.4.2 rmind
745 1.3.4.2 rmind /* NextOp points to the op that holds the Bank Register */
746 1.3.4.2 rmind
747 1.3.4.2 rmind NextOp = NextOp->Common.Next;
748 1.3.4.2 rmind
749 1.3.4.2 rmind /* NextOp points to the op that holds the Bank Value */
750 1.3.4.2 rmind
751 1.3.4.2 rmind NextOp = NextOp->Common.Next;
752 1.3.4.2 rmind
753 1.3.4.2 rmind /*
754 1.3.4.2 rmind * Set proper index into operand stack for AcpiDsObjStackPush
755 1.3.4.2 rmind * invoked inside AcpiDsCreateOperand.
756 1.3.4.2 rmind *
757 1.3.4.2 rmind * We use WalkState->Operands[0] to store the evaluated BankValue
758 1.3.4.2 rmind */
759 1.3.4.2 rmind WalkState->OperandIndex = 0;
760 1.3.4.2 rmind
761 1.3.4.2 rmind Status = AcpiDsCreateOperand (WalkState, NextOp, 0);
762 1.3.4.2 rmind if (ACPI_FAILURE (Status))
763 1.3.4.2 rmind {
764 1.3.4.2 rmind return_ACPI_STATUS (Status);
765 1.3.4.2 rmind }
766 1.3.4.2 rmind
767 1.3.4.2 rmind Status = AcpiExResolveToValue (&WalkState->Operands[0], WalkState);
768 1.3.4.2 rmind if (ACPI_FAILURE (Status))
769 1.3.4.2 rmind {
770 1.3.4.2 rmind return_ACPI_STATUS (Status);
771 1.3.4.2 rmind }
772 1.3.4.2 rmind
773 1.3.4.2 rmind ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS,
774 1.3.4.2 rmind AcpiPsGetOpcodeName (Op->Common.AmlOpcode), 1);
775 1.3.4.2 rmind /*
776 1.3.4.2 rmind * Get the BankValue operand and save it
777 1.3.4.2 rmind * (at Top of stack)
778 1.3.4.2 rmind */
779 1.3.4.2 rmind OperandDesc = WalkState->Operands[0];
780 1.3.4.2 rmind
781 1.3.4.2 rmind /* Arg points to the start Bank Field */
782 1.3.4.2 rmind
783 1.3.4.2 rmind Arg = AcpiPsGetArg (Op, 4);
784 1.3.4.2 rmind while (Arg)
785 1.3.4.2 rmind {
786 1.3.4.2 rmind /* Ignore OFFSET and ACCESSAS terms here */
787 1.3.4.2 rmind
788 1.3.4.2 rmind if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
789 1.3.4.2 rmind {
790 1.3.4.2 rmind Node = Arg->Common.Node;
791 1.3.4.2 rmind
792 1.3.4.2 rmind ObjDesc = AcpiNsGetAttachedObject (Node);
793 1.3.4.2 rmind if (!ObjDesc)
794 1.3.4.2 rmind {
795 1.3.4.2 rmind return_ACPI_STATUS (AE_NOT_EXIST);
796 1.3.4.2 rmind }
797 1.3.4.2 rmind
798 1.3.4.2 rmind ObjDesc->BankField.Value = (UINT32) OperandDesc->Integer.Value;
799 1.3.4.2 rmind }
800 1.3.4.2 rmind
801 1.3.4.2 rmind /* Move to next field in the list */
802 1.3.4.2 rmind
803 1.3.4.2 rmind Arg = Arg->Common.Next;
804 1.3.4.2 rmind }
805 1.3.4.2 rmind
806 1.3.4.2 rmind AcpiUtRemoveReference (OperandDesc);
807 1.3.4.2 rmind return_ACPI_STATUS (Status);
808 1.3.4.2 rmind }
809 1.3.4.2 rmind
810