1/****************************************************************************** 2 * 3 * Module Name: dsfield - Dispatcher field routines
| 1/****************************************************************************** 2 * 3 * Module Name: dsfield - Dispatcher field routines
|
4 * $Revision: 62 $
| 4 * $Revision: 65 $
|
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117#define __DSFIELD_C__ 118 119#include "acpi.h" 120#include "amlcode.h" 121#include "acdispat.h" 122#include "acinterp.h" 123#include "acnamesp.h" 124#include "acparser.h" 125 126 127#define _COMPONENT ACPI_DISPATCHER 128 ACPI_MODULE_NAME ("dsfield") 129 130 131/******************************************************************************* 132 * 133 * FUNCTION: AcpiDsCreateBufferField 134 * 135 * PARAMETERS: Opcode - The opcode to be executed 136 * Operands - List of operands for the opcode 137 * WalkState - Current state 138 * 139 * RETURN: Status 140 * 141 * DESCRIPTION: Execute the CreateField operators: 142 * CreateBitFieldOp, 143 * CreateByteFieldOp, 144 * CreateWordFieldOp, 145 * CreateDWordFieldOp, 146 * CreateQWordFieldOp, 147 * CreateFieldOp (all of which define fields in buffers) 148 * 149 ******************************************************************************/ 150 151ACPI_STATUS 152AcpiDsCreateBufferField ( 153 ACPI_PARSE_OBJECT *Op, 154 ACPI_WALK_STATE *WalkState) 155{ 156 ACPI_PARSE_OBJECT *Arg; 157 ACPI_NAMESPACE_NODE *Node; 158 ACPI_STATUS Status; 159 ACPI_OPERAND_OBJECT *ObjDesc; 160 ACPI_OPERAND_OBJECT *SecondDesc = NULL; 161 UINT32 Flags; 162 163 164 ACPI_FUNCTION_TRACE ("DsCreateBufferField"); 165 166 167 /* Get the NameString argument */ 168
| 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117#define __DSFIELD_C__ 118 119#include "acpi.h" 120#include "amlcode.h" 121#include "acdispat.h" 122#include "acinterp.h" 123#include "acnamesp.h" 124#include "acparser.h" 125 126 127#define _COMPONENT ACPI_DISPATCHER 128 ACPI_MODULE_NAME ("dsfield") 129 130 131/******************************************************************************* 132 * 133 * FUNCTION: AcpiDsCreateBufferField 134 * 135 * PARAMETERS: Opcode - The opcode to be executed 136 * Operands - List of operands for the opcode 137 * WalkState - Current state 138 * 139 * RETURN: Status 140 * 141 * DESCRIPTION: Execute the CreateField operators: 142 * CreateBitFieldOp, 143 * CreateByteFieldOp, 144 * CreateWordFieldOp, 145 * CreateDWordFieldOp, 146 * CreateQWordFieldOp, 147 * CreateFieldOp (all of which define fields in buffers) 148 * 149 ******************************************************************************/ 150 151ACPI_STATUS 152AcpiDsCreateBufferField ( 153 ACPI_PARSE_OBJECT *Op, 154 ACPI_WALK_STATE *WalkState) 155{ 156 ACPI_PARSE_OBJECT *Arg; 157 ACPI_NAMESPACE_NODE *Node; 158 ACPI_STATUS Status; 159 ACPI_OPERAND_OBJECT *ObjDesc; 160 ACPI_OPERAND_OBJECT *SecondDesc = NULL; 161 UINT32 Flags; 162 163 164 ACPI_FUNCTION_TRACE ("DsCreateBufferField"); 165 166 167 /* Get the NameString argument */ 168
|
169 if (Op->Opcode == AML_CREATE_FIELD_OP)
| 169 if (Op->Common.AmlOpcode == AML_CREATE_FIELD_OP)
|
170 { 171 Arg = AcpiPsGetArg (Op, 3); 172 } 173 else 174 { 175 /* Create Bit/Byte/Word/Dword field */ 176 177 Arg = AcpiPsGetArg (Op, 2); 178 } 179 180 if (!Arg) 181 { 182 return_ACPI_STATUS (AE_AML_NO_OPERAND); 183 } 184 185 /* 186 * During the load phase, we want to enter the name of the field into 187 * the namespace. During the execute phase (when we evaluate the size 188 * operand), we want to lookup the name 189 */ 190 if (WalkState->ParseFlags & ACPI_PARSE_EXECUTE) 191 { 192 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; 193 } 194 else 195 { 196 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; 197 } 198 199 /* 200 * Enter the NameString into the namespace 201 */
| 170 { 171 Arg = AcpiPsGetArg (Op, 3); 172 } 173 else 174 { 175 /* Create Bit/Byte/Word/Dword field */ 176 177 Arg = AcpiPsGetArg (Op, 2); 178 } 179 180 if (!Arg) 181 { 182 return_ACPI_STATUS (AE_AML_NO_OPERAND); 183 } 184 185 /* 186 * During the load phase, we want to enter the name of the field into 187 * the namespace. During the execute phase (when we evaluate the size 188 * operand), we want to lookup the name 189 */ 190 if (WalkState->ParseFlags & ACPI_PARSE_EXECUTE) 191 { 192 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; 193 } 194 else 195 { 196 Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; 197 } 198 199 /* 200 * Enter the NameString into the namespace 201 */
|
202 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
| 202 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
|
203 INTERNAL_TYPE_DEF_ANY, ACPI_IMODE_LOAD_PASS1, 204 Flags, WalkState, &(Node)); 205 if (ACPI_FAILURE (Status)) 206 { 207 return_ACPI_STATUS (Status); 208 } 209 210 /* We could put the returned object (Node) on the object stack for later, but 211 * for now, we will put it in the "op" object that the parser uses, so we 212 * can get it again at the end of this scope 213 */
| 203 INTERNAL_TYPE_DEF_ANY, ACPI_IMODE_LOAD_PASS1, 204 Flags, WalkState, &(Node)); 205 if (ACPI_FAILURE (Status)) 206 { 207 return_ACPI_STATUS (Status); 208 } 209 210 /* We could put the returned object (Node) on the object stack for later, but 211 * for now, we will put it in the "op" object that the parser uses, so we 212 * can get it again at the end of this scope 213 */
|
214 Op->Node = Node;
| 214 Op->Common.Node = Node;
|
215 216 /* 217 * If there is no object attached to the node, this node was just created and 218 * we need to create the field object. Otherwise, this was a lookup of an 219 * existing node and we don't want to create the field object again. 220 */ 221 ObjDesc = AcpiNsGetAttachedObject (Node); 222 if (ObjDesc) 223 { 224 return_ACPI_STATUS (AE_OK); 225 } 226 227 /* 228 * The Field definition is not fully parsed at this time. 229 * (We must save the address of the AML for the buffer and index operands) 230 */ 231 232 /* Create the buffer field object */ 233 234 ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER_FIELD); 235 if (!ObjDesc) 236 { 237 Status = AE_NO_MEMORY; 238 goto Cleanup; 239 } 240 241 /* 242 * Remember location in AML stream of the field unit 243 * opcode and operands -- since the buffer and index 244 * operands must be evaluated. 245 */ 246 SecondDesc = ObjDesc->Common.NextObject;
| 215 216 /* 217 * If there is no object attached to the node, this node was just created and 218 * we need to create the field object. Otherwise, this was a lookup of an 219 * existing node and we don't want to create the field object again. 220 */ 221 ObjDesc = AcpiNsGetAttachedObject (Node); 222 if (ObjDesc) 223 { 224 return_ACPI_STATUS (AE_OK); 225 } 226 227 /* 228 * The Field definition is not fully parsed at this time. 229 * (We must save the address of the AML for the buffer and index operands) 230 */ 231 232 /* Create the buffer field object */ 233 234 ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER_FIELD); 235 if (!ObjDesc) 236 { 237 Status = AE_NO_MEMORY; 238 goto Cleanup; 239 } 240 241 /* 242 * Remember location in AML stream of the field unit 243 * opcode and operands -- since the buffer and index 244 * operands must be evaluated. 245 */ 246 SecondDesc = ObjDesc->Common.NextObject;
|
247 SecondDesc->Extra.AmlStart = ((ACPI_PARSE2_OBJECT *) Op)->Data; 248 SecondDesc->Extra.AmlLength = ((ACPI_PARSE2_OBJECT *) Op)->Length;
| 247 SecondDesc->Extra.AmlStart = Op->Named.Data; 248 SecondDesc->Extra.AmlLength = Op->Named.Length;
|
249 ObjDesc->BufferField.Node = Node; 250 251 /* Attach constructed field descriptors to parent node */ 252 253 Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_BUFFER_FIELD); 254 if (ACPI_FAILURE (Status)) 255 { 256 goto Cleanup; 257 } 258 259 260Cleanup: 261 262 /* Remove local reference to the object */ 263 264 AcpiUtRemoveReference (ObjDesc); 265 return_ACPI_STATUS (Status); 266} 267 268 269/******************************************************************************* 270 * 271 * FUNCTION: AcpiDsGetFieldNames 272 * 273 * PARAMETERS: Info - CreateField info structure 274 * ` WalkState - Current method state 275 * Arg - First parser arg for the field name list 276 * 277 * RETURN: Status 278 * 279 * DESCRIPTION: Process all named fields in a field declaration. Names are 280 * entered into the namespace. 281 * 282 ******************************************************************************/ 283 284ACPI_STATUS 285AcpiDsGetFieldNames ( 286 ACPI_CREATE_FIELD_INFO *Info, 287 ACPI_WALK_STATE *WalkState, 288 ACPI_PARSE_OBJECT *Arg) 289{ 290 ACPI_STATUS Status;
| 249 ObjDesc->BufferField.Node = Node; 250 251 /* Attach constructed field descriptors to parent node */ 252 253 Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_BUFFER_FIELD); 254 if (ACPI_FAILURE (Status)) 255 { 256 goto Cleanup; 257 } 258 259 260Cleanup: 261 262 /* Remove local reference to the object */ 263 264 AcpiUtRemoveReference (ObjDesc); 265 return_ACPI_STATUS (Status); 266} 267 268 269/******************************************************************************* 270 * 271 * FUNCTION: AcpiDsGetFieldNames 272 * 273 * PARAMETERS: Info - CreateField info structure 274 * ` WalkState - Current method state 275 * Arg - First parser arg for the field name list 276 * 277 * RETURN: Status 278 * 279 * DESCRIPTION: Process all named fields in a field declaration. Names are 280 * entered into the namespace. 281 * 282 ******************************************************************************/ 283 284ACPI_STATUS 285AcpiDsGetFieldNames ( 286 ACPI_CREATE_FIELD_INFO *Info, 287 ACPI_WALK_STATE *WalkState, 288 ACPI_PARSE_OBJECT *Arg) 289{ 290 ACPI_STATUS Status;
|
| 291 ACPI_INTEGER Position;
|
291 292 293 ACPI_FUNCTION_TRACE_PTR ("DsGetFieldNames", Info); 294 295 296 /* First field starts at bit zero */ 297 298 Info->FieldBitPosition = 0; 299 300 /* Process all elements in the field list (of parse nodes) */ 301 302 while (Arg) 303 { 304 /* 305 * Three types of field elements are handled: 306 * 1) Offset - specifies a bit offset 307 * 2) AccessAs - changes the access mode 308 * 3) Name - Enters a new named field into the namespace 309 */
| 292 293 294 ACPI_FUNCTION_TRACE_PTR ("DsGetFieldNames", Info); 295 296 297 /* First field starts at bit zero */ 298 299 Info->FieldBitPosition = 0; 300 301 /* Process all elements in the field list (of parse nodes) */ 302 303 while (Arg) 304 { 305 /* 306 * Three types of field elements are handled: 307 * 1) Offset - specifies a bit offset 308 * 2) AccessAs - changes the access mode 309 * 3) Name - Enters a new named field into the namespace 310 */
|
310 switch (Arg->Opcode)
| 311 switch (Arg->Common.AmlOpcode)
|
311 { 312 case AML_INT_RESERVEDFIELD_OP: 313
| 312 { 313 case AML_INT_RESERVEDFIELD_OP: 314
|
314 if (((ACPI_INTEGER) Info->FieldBitPosition + Arg->Value.Size) > 315 ACPI_UINT32_MAX)
| 315 Position = (ACPI_INTEGER) Info->FieldBitPosition 316 + (ACPI_INTEGER) Arg->Common.Value.Size; 317 318 if (Position > ACPI_UINT32_MAX)
|
316 { 317 ACPI_REPORT_ERROR (("Bit offset within field too large (> 0xFFFFFFFF)\n")); 318 return_ACPI_STATUS (AE_SUPPORT); 319 } 320
| 319 { 320 ACPI_REPORT_ERROR (("Bit offset within field too large (> 0xFFFFFFFF)\n")); 321 return_ACPI_STATUS (AE_SUPPORT); 322 } 323
|
321 Info->FieldBitPosition += Arg->Value.Size;
| 324 Info->FieldBitPosition = (UINT32) Position;
|
322 break; 323 324 325 case AML_INT_ACCESSFIELD_OP: 326 327 /* 328 * Get a new AccessType and AccessAttribute -- to be used for all 329 * field units that follow, until field end or another AccessAs keyword. 330 * 331 * In FieldFlags, preserve the flag bits other than the ACCESS_TYPE bits 332 */ 333 Info->FieldFlags = (UINT8) ((Info->FieldFlags & ~(AML_FIELD_ACCESS_TYPE_MASK)) |
| 325 break; 326 327 328 case AML_INT_ACCESSFIELD_OP: 329 330 /* 331 * Get a new AccessType and AccessAttribute -- to be used for all 332 * field units that follow, until field end or another AccessAs keyword. 333 * 334 * In FieldFlags, preserve the flag bits other than the ACCESS_TYPE bits 335 */ 336 Info->FieldFlags = (UINT8) ((Info->FieldFlags & ~(AML_FIELD_ACCESS_TYPE_MASK)) |
|
334 ((UINT8) (Arg->Value.Integer32 >> 8)));
| 337 ((UINT8) (Arg->Common.Value.Integer32 >> 8)));
|
335
| 338
|
336 Info->Attribute = (UINT8) (Arg->Value.Integer32);
| 339 Info->Attribute = (UINT8) (Arg->Common.Value.Integer32);
|
337 break; 338 339 340 case AML_INT_NAMEDFIELD_OP: 341 342 /* Lookup the name */ 343 344 Status = AcpiNsLookup (WalkState->ScopeInfo,
| 340 break; 341 342 343 case AML_INT_NAMEDFIELD_OP: 344 345 /* Lookup the name */ 346 347 Status = AcpiNsLookup (WalkState->ScopeInfo,
|
345 (NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)Arg)->Name,
| 348 (NATIVE_CHAR *) &Arg->Named.Name,
|
346 Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE, 347 WalkState, &Info->FieldNode); 348 if (ACPI_FAILURE (Status)) 349 { 350 if (Status != AE_ALREADY_EXISTS) 351 { 352 return_ACPI_STATUS (Status); 353 } 354 355 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
| 349 Info->FieldType, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE, 350 WalkState, &Info->FieldNode); 351 if (ACPI_FAILURE (Status)) 352 { 353 if (Status != AE_ALREADY_EXISTS) 354 { 355 return_ACPI_STATUS (Status); 356 } 357 358 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
|
356 &((ACPI_PARSE2_OBJECT *)Arg)->Name));
| 359 &Arg->Named.Name));
|
357 } 358 else 359 {
| 360 } 361 else 362 {
|
360 Arg->Node = Info->FieldNode; 361 Info->FieldBitLength = Arg->Value.Size;
| 363 Arg->Common.Node = Info->FieldNode; 364 Info->FieldBitLength = Arg->Common.Value.Size;
|
362 363 /* Create and initialize an object for the new Field Node */ 364 365 Status = AcpiExPrepFieldValue (Info); 366 if (ACPI_FAILURE (Status)) 367 { 368 return_ACPI_STATUS (Status); 369 } 370 } 371 372 /* Keep track of bit position for the next field */ 373
| 365 366 /* Create and initialize an object for the new Field Node */ 367 368 Status = AcpiExPrepFieldValue (Info); 369 if (ACPI_FAILURE (Status)) 370 { 371 return_ACPI_STATUS (Status); 372 } 373 } 374 375 /* Keep track of bit position for the next field */ 376
|
374 if (((ACPI_INTEGER) Info->FieldBitPosition + Arg->Value.Size) > 375 ACPI_UINT32_MAX)
| 377 Position = (ACPI_INTEGER) Info->FieldBitPosition 378 + (ACPI_INTEGER) Arg->Common.Value.Size; 379 380 if (Position > ACPI_UINT32_MAX)
|
376 { 377 ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", 378 &Info->FieldNode->Name)); 379 return_ACPI_STATUS (AE_SUPPORT); 380 } 381 382 Info->FieldBitPosition += Info->FieldBitLength; 383 break; 384 385 386 default: 387 388 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid opcode in field list: %X\n",
| 381 { 382 ACPI_REPORT_ERROR (("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", 383 &Info->FieldNode->Name)); 384 return_ACPI_STATUS (AE_SUPPORT); 385 } 386 387 Info->FieldBitPosition += Info->FieldBitLength; 388 break; 389 390 391 default: 392 393 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid opcode in field list: %X\n",
|
389 Arg->Opcode)); 390 return_ACPI_STATUS (AE_AML_ERROR);
| 394 Arg->Common.AmlOpcode)); 395 return_ACPI_STATUS (AE_AML_BAD_OPCODE);
|
391 } 392
| 396 } 397
|
393 Arg = Arg->Next;
| 398 Arg = Arg->Common.Next;
|
394 } 395 396 return_ACPI_STATUS (AE_OK); 397} 398 399 400/******************************************************************************* 401 * 402 * FUNCTION: AcpiDsCreateField 403 * 404 * PARAMETERS: Op - Op containing the Field definition and args 405 * RegionNode - Object for the containing Operation Region 406 * ` WalkState - Current method state 407 * 408 * RETURN: Status 409 * 410 * DESCRIPTION: Create a new field in the specified operation region 411 * 412 ******************************************************************************/ 413 414ACPI_STATUS 415AcpiDsCreateField ( 416 ACPI_PARSE_OBJECT *Op, 417 ACPI_NAMESPACE_NODE *RegionNode, 418 ACPI_WALK_STATE *WalkState) 419{
| 399 } 400 401 return_ACPI_STATUS (AE_OK); 402} 403 404 405/******************************************************************************* 406 * 407 * FUNCTION: AcpiDsCreateField 408 * 409 * PARAMETERS: Op - Op containing the Field definition and args 410 * RegionNode - Object for the containing Operation Region 411 * ` WalkState - Current method state 412 * 413 * RETURN: Status 414 * 415 * DESCRIPTION: Create a new field in the specified operation region 416 * 417 ******************************************************************************/ 418 419ACPI_STATUS 420AcpiDsCreateField ( 421 ACPI_PARSE_OBJECT *Op, 422 ACPI_NAMESPACE_NODE *RegionNode, 423 ACPI_WALK_STATE *WalkState) 424{
|
420 ACPI_STATUS Status = AE_AML_ERROR;
| 425 ACPI_STATUS Status;
|
421 ACPI_PARSE_OBJECT *Arg; 422 ACPI_CREATE_FIELD_INFO Info; 423 424 425 ACPI_FUNCTION_TRACE_PTR ("DsCreateField", Op); 426 427 428 /* First arg is the name of the parent OpRegion (must already exist) */ 429
| 426 ACPI_PARSE_OBJECT *Arg; 427 ACPI_CREATE_FIELD_INFO Info; 428 429 430 ACPI_FUNCTION_TRACE_PTR ("DsCreateField", Op); 431 432 433 /* First arg is the name of the parent OpRegion (must already exist) */ 434
|
430 Arg = Op->Value.Arg;
| 435 Arg = Op->Common.Value.Arg;
|
431 if (!RegionNode) 432 {
| 436 if (!RegionNode) 437 {
|
433 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.Name,
| 438 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
|
434 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 435 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 436 if (ACPI_FAILURE (Status)) 437 { 438 return_ACPI_STATUS (Status); 439 } 440 } 441 442 /* Second arg is the field flags */ 443
| 439 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 440 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 441 if (ACPI_FAILURE (Status)) 442 { 443 return_ACPI_STATUS (Status); 444 } 445 } 446 447 /* Second arg is the field flags */ 448
|
444 Arg = Arg->Next; 445 Info.FieldFlags = Arg->Value.Integer8;
| 449 Arg = Arg->Common.Next; 450 Info.FieldFlags = Arg->Common.Value.Integer8;
|
446 Info.Attribute = 0; 447 448 /* Each remaining arg is a Named Field */ 449 450 Info.FieldType = INTERNAL_TYPE_REGION_FIELD; 451 Info.RegionNode = RegionNode; 452
| 451 Info.Attribute = 0; 452 453 /* Each remaining arg is a Named Field */ 454 455 Info.FieldType = INTERNAL_TYPE_REGION_FIELD; 456 Info.RegionNode = RegionNode; 457
|
453 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next);
| 458 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
|
454 455 return_ACPI_STATUS (Status); 456} 457 458 459/******************************************************************************* 460 * 461 * FUNCTION: AcpiDsInitFieldObjects 462 * 463 * PARAMETERS: Op - Op containing the Field definition and args 464 * ` WalkState - Current method state 465 * 466 * RETURN: Status 467 * 468 * DESCRIPTION: For each "Field Unit" name in the argument list that is 469 * part of the field declaration, enter the name into the 470 * namespace. 471 * 472 ******************************************************************************/ 473 474ACPI_STATUS 475AcpiDsInitFieldObjects ( 476 ACPI_PARSE_OBJECT *Op, 477 ACPI_WALK_STATE *WalkState) 478{
| 459 460 return_ACPI_STATUS (Status); 461} 462 463 464/******************************************************************************* 465 * 466 * FUNCTION: AcpiDsInitFieldObjects 467 * 468 * PARAMETERS: Op - Op containing the Field definition and args 469 * ` WalkState - Current method state 470 * 471 * RETURN: Status 472 * 473 * DESCRIPTION: For each "Field Unit" name in the argument list that is 474 * part of the field declaration, enter the name into the 475 * namespace. 476 * 477 ******************************************************************************/ 478 479ACPI_STATUS 480AcpiDsInitFieldObjects ( 481 ACPI_PARSE_OBJECT *Op, 482 ACPI_WALK_STATE *WalkState) 483{
|
479 ACPI_STATUS Status = AE_AML_ERROR;
| 484 ACPI_STATUS Status;
|
480 ACPI_PARSE_OBJECT *Arg = NULL; 481 ACPI_NAMESPACE_NODE *Node; 482 UINT8 Type = 0; 483 484 485 ACPI_FUNCTION_TRACE_PTR ("DsInitFieldObjects", Op); 486 487 488 switch (WalkState->Opcode) 489 { 490 case AML_FIELD_OP: 491 Arg = AcpiPsGetArg (Op, 2); 492 Type = INTERNAL_TYPE_REGION_FIELD; 493 break; 494 495 case AML_BANK_FIELD_OP: 496 Arg = AcpiPsGetArg (Op, 4); 497 Type = INTERNAL_TYPE_BANK_FIELD; 498 break; 499 500 case AML_INDEX_FIELD_OP: 501 Arg = AcpiPsGetArg (Op, 3); 502 Type = INTERNAL_TYPE_INDEX_FIELD; 503 break;
| 485 ACPI_PARSE_OBJECT *Arg = NULL; 486 ACPI_NAMESPACE_NODE *Node; 487 UINT8 Type = 0; 488 489 490 ACPI_FUNCTION_TRACE_PTR ("DsInitFieldObjects", Op); 491 492 493 switch (WalkState->Opcode) 494 { 495 case AML_FIELD_OP: 496 Arg = AcpiPsGetArg (Op, 2); 497 Type = INTERNAL_TYPE_REGION_FIELD; 498 break; 499 500 case AML_BANK_FIELD_OP: 501 Arg = AcpiPsGetArg (Op, 4); 502 Type = INTERNAL_TYPE_BANK_FIELD; 503 break; 504 505 case AML_INDEX_FIELD_OP: 506 Arg = AcpiPsGetArg (Op, 3); 507 Type = INTERNAL_TYPE_INDEX_FIELD; 508 break;
|
| 509 510 default: 511 return_ACPI_STATUS (AE_BAD_PARAMETER);
|
504 } 505 506 /* 507 * Walk the list of entries in the FieldList 508 */ 509 while (Arg) 510 { 511 /* Ignore OFFSET and ACCESSAS terms here */ 512
| 512 } 513 514 /* 515 * Walk the list of entries in the FieldList 516 */ 517 while (Arg) 518 { 519 /* Ignore OFFSET and ACCESSAS terms here */ 520
|
513 if (Arg->Opcode == AML_INT_NAMEDFIELD_OP)
| 521 if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
|
514 { 515 Status = AcpiNsLookup (WalkState->ScopeInfo,
| 522 { 523 Status = AcpiNsLookup (WalkState->ScopeInfo,
|
516 (NATIVE_CHAR *) &((ACPI_PARSE2_OBJECT *)Arg)->Name,
| 524 (NATIVE_CHAR *) &Arg->Named.Name,
|
517 Type, ACPI_IMODE_LOAD_PASS1, 518 ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, 519 WalkState, &Node); 520 if (ACPI_FAILURE (Status)) 521 { 522 if (Status != AE_ALREADY_EXISTS) 523 { 524 return_ACPI_STATUS (Status); 525 } 526 527 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
| 525 Type, ACPI_IMODE_LOAD_PASS1, 526 ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND, 527 WalkState, &Node); 528 if (ACPI_FAILURE (Status)) 529 { 530 if (Status != AE_ALREADY_EXISTS) 531 { 532 return_ACPI_STATUS (Status); 533 } 534 535 ACPI_REPORT_ERROR (("Field name [%4.4s] already exists in current scope\n",
|
528 &((ACPI_PARSE2_OBJECT *)Arg)->Name));
| 536 &Arg->Named.Name)); 537 538 /* Name already exists, just ignore this error */ 539 540 Status = AE_OK;
|
529 } 530
| 541 } 542
|
531 Arg->Node = Node;
| 543 Arg->Common.Node = Node;
|
532 } 533 534 /* Move to next field in the list */ 535
| 544 } 545 546 /* Move to next field in the list */ 547
|
536 Arg = Arg->Next;
| 548 Arg = Arg->Common.Next;
|
537 } 538
| 549 } 550
|
539 return_ACPI_STATUS (Status);
| 551 return_ACPI_STATUS (AE_OK);
|
540} 541 542 543/******************************************************************************* 544 * 545 * FUNCTION: AcpiDsCreateBankField 546 * 547 * PARAMETERS: Op - Op containing the Field definition and args 548 * RegionNode - Object for the containing Operation Region 549 * ` WalkState - Current method state 550 * 551 * RETURN: Status 552 * 553 * DESCRIPTION: Create a new bank field in the specified operation region 554 * 555 ******************************************************************************/ 556 557ACPI_STATUS 558AcpiDsCreateBankField ( 559 ACPI_PARSE_OBJECT *Op, 560 ACPI_NAMESPACE_NODE *RegionNode, 561 ACPI_WALK_STATE *WalkState) 562{
| 552} 553 554 555/******************************************************************************* 556 * 557 * FUNCTION: AcpiDsCreateBankField 558 * 559 * PARAMETERS: Op - Op containing the Field definition and args 560 * RegionNode - Object for the containing Operation Region 561 * ` WalkState - Current method state 562 * 563 * RETURN: Status 564 * 565 * DESCRIPTION: Create a new bank field in the specified operation region 566 * 567 ******************************************************************************/ 568 569ACPI_STATUS 570AcpiDsCreateBankField ( 571 ACPI_PARSE_OBJECT *Op, 572 ACPI_NAMESPACE_NODE *RegionNode, 573 ACPI_WALK_STATE *WalkState) 574{
|
563 ACPI_STATUS Status = AE_AML_ERROR;
| 575 ACPI_STATUS Status;
|
564 ACPI_PARSE_OBJECT *Arg; 565 ACPI_CREATE_FIELD_INFO Info; 566 567 568 ACPI_FUNCTION_TRACE_PTR ("DsCreateBankField", Op); 569 570 571 /* First arg is the name of the parent OpRegion (must already exist) */ 572
| 576 ACPI_PARSE_OBJECT *Arg; 577 ACPI_CREATE_FIELD_INFO Info; 578 579 580 ACPI_FUNCTION_TRACE_PTR ("DsCreateBankField", Op); 581 582 583 /* First arg is the name of the parent OpRegion (must already exist) */ 584
|
573 Arg = Op->Value.Arg;
| 585 Arg = Op->Common.Value.Arg;
|
574 if (!RegionNode) 575 {
| 586 if (!RegionNode) 587 {
|
576 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.Name,
| 588 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.Name,
|
577 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 578 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 579 if (ACPI_FAILURE (Status)) 580 { 581 return_ACPI_STATUS (Status); 582 } 583 } 584 585 /* Second arg is the Bank Register (must already exist) */ 586
| 589 ACPI_TYPE_REGION, ACPI_IMODE_EXECUTE, 590 ACPI_NS_SEARCH_PARENT, WalkState, &RegionNode); 591 if (ACPI_FAILURE (Status)) 592 { 593 return_ACPI_STATUS (Status); 594 } 595 } 596 597 /* Second arg is the Bank Register (must already exist) */ 598
|
587 Arg = Arg->Next; 588 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
| 599 Arg = Arg->Common.Next; 600 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
|
589 INTERNAL_TYPE_BANK_FIELD_DEFN, ACPI_IMODE_EXECUTE, 590 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 591 if (ACPI_FAILURE (Status)) 592 { 593 return_ACPI_STATUS (Status); 594 } 595 596 /* Third arg is the BankValue */ 597
| 601 INTERNAL_TYPE_BANK_FIELD_DEFN, ACPI_IMODE_EXECUTE, 602 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 603 if (ACPI_FAILURE (Status)) 604 { 605 return_ACPI_STATUS (Status); 606 } 607 608 /* Third arg is the BankValue */ 609
|
598 Arg = Arg->Next; 599 Info.BankValue = Arg->Value.Integer32;
| 610 Arg = Arg->Common.Next; 611 Info.BankValue = Arg->Common.Value.Integer32;
|
600 601 /* Fourth arg is the field flags */ 602
| 612 613 /* Fourth arg is the field flags */ 614
|
603 Arg = Arg->Next; 604 Info.FieldFlags = Arg->Value.Integer8;
| 615 Arg = Arg->Common.Next; 616 Info.FieldFlags = Arg->Common.Value.Integer8;
|
605 606 /* Each remaining arg is a Named Field */ 607 608 Info.FieldType = INTERNAL_TYPE_BANK_FIELD; 609 Info.RegionNode = RegionNode; 610
| 617 618 /* Each remaining arg is a Named Field */ 619 620 Info.FieldType = INTERNAL_TYPE_BANK_FIELD; 621 Info.RegionNode = RegionNode; 622
|
611 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next);
| 623 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
|
612 613 return_ACPI_STATUS (Status); 614} 615 616 617/******************************************************************************* 618 * 619 * FUNCTION: AcpiDsCreateIndexField 620 * 621 * PARAMETERS: Op - Op containing the Field definition and args 622 * RegionNode - Object for the containing Operation Region 623 * ` WalkState - Current method state 624 * 625 * RETURN: Status 626 * 627 * DESCRIPTION: Create a new index field in the specified operation region 628 * 629 ******************************************************************************/ 630 631ACPI_STATUS 632AcpiDsCreateIndexField ( 633 ACPI_PARSE_OBJECT *Op, 634 ACPI_NAMESPACE_NODE *RegionNode, 635 ACPI_WALK_STATE *WalkState) 636{ 637 ACPI_STATUS Status; 638 ACPI_PARSE_OBJECT *Arg; 639 ACPI_CREATE_FIELD_INFO Info; 640 641 642 ACPI_FUNCTION_TRACE_PTR ("DsCreateIndexField", Op); 643 644 645 /* First arg is the name of the Index register (must already exist) */ 646
| 624 625 return_ACPI_STATUS (Status); 626} 627 628 629/******************************************************************************* 630 * 631 * FUNCTION: AcpiDsCreateIndexField 632 * 633 * PARAMETERS: Op - Op containing the Field definition and args 634 * RegionNode - Object for the containing Operation Region 635 * ` WalkState - Current method state 636 * 637 * RETURN: Status 638 * 639 * DESCRIPTION: Create a new index field in the specified operation region 640 * 641 ******************************************************************************/ 642 643ACPI_STATUS 644AcpiDsCreateIndexField ( 645 ACPI_PARSE_OBJECT *Op, 646 ACPI_NAMESPACE_NODE *RegionNode, 647 ACPI_WALK_STATE *WalkState) 648{ 649 ACPI_STATUS Status; 650 ACPI_PARSE_OBJECT *Arg; 651 ACPI_CREATE_FIELD_INFO Info; 652 653 654 ACPI_FUNCTION_TRACE_PTR ("DsCreateIndexField", Op); 655 656 657 /* First arg is the name of the Index register (must already exist) */ 658
|
647 Arg = Op->Value.Arg; 648 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
| 659 Arg = Op->Common.Value.Arg; 660 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
|
649 ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, 650 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 651 if (ACPI_FAILURE (Status)) 652 { 653 return_ACPI_STATUS (Status); 654 } 655 656 /* Second arg is the data register (must already exist) */ 657
| 661 ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, 662 ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode); 663 if (ACPI_FAILURE (Status)) 664 { 665 return_ACPI_STATUS (Status); 666 } 667 668 /* Second arg is the data register (must already exist) */ 669
|
658 Arg = Arg->Next; 659 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Value.String,
| 670 Arg = Arg->Common.Next; 671 Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
|
660 INTERNAL_TYPE_INDEX_FIELD_DEFN, ACPI_IMODE_EXECUTE, 661 ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode); 662 if (ACPI_FAILURE (Status)) 663 { 664 return_ACPI_STATUS (Status); 665 } 666 667 /* Next arg is the field flags */ 668
| 672 INTERNAL_TYPE_INDEX_FIELD_DEFN, ACPI_IMODE_EXECUTE, 673 ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode); 674 if (ACPI_FAILURE (Status)) 675 { 676 return_ACPI_STATUS (Status); 677 } 678 679 /* Next arg is the field flags */ 680
|
669 Arg = Arg->Next; 670 Info.FieldFlags = Arg->Value.Integer8;
| 681 Arg = Arg->Common.Next; 682 Info.FieldFlags = Arg->Common.Value.Integer8;
|
671 672 673 /* Each remaining arg is a Named Field */ 674 675 Info.FieldType = INTERNAL_TYPE_INDEX_FIELD; 676 Info.RegionNode = RegionNode; 677
| 683 684 685 /* Each remaining arg is a Named Field */ 686 687 Info.FieldType = INTERNAL_TYPE_INDEX_FIELD; 688 Info.RegionNode = RegionNode; 689
|
678 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Next);
| 690 Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
|
679 680 return_ACPI_STATUS (Status); 681} 682 683
| 691 692 return_ACPI_STATUS (Status); 693} 694 695
|