1 2/****************************************************************************** 3 * 4 * Module Name: aslcodegen - AML code generation |
5 * $Revision: 1.62 $ |
6 * 7 *****************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * |
13 * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp. |
14 * All rights reserved. 15 * 16 * 2. License 17 * 18 * 2.1. This is your license from Intel Corp. under its intellectual property 19 * rights. You may have additional license terms from the party that provided 20 * you this software, covering your right to use that party's intellectual 21 * property rights. --- 178 unchanged lines hidden (view full) --- 200 201static ACPI_STATUS 202CgAmlWriteWalk ( 203 ACPI_PARSE_OBJECT *Op, 204 UINT32 Level, 205 void *Context) 206{ 207 |
208 /* 209 * Print header at level 0. Alignment assumes 32-bit pointers 210 */ 211 if (!Level) 212 { 213 DbgPrint (ASL_TREE_OUTPUT, 214 "Final parse tree used for AML output:\n"); 215 DbgPrint (ASL_TREE_OUTPUT, 216 "%*s Value P_Op A_Op OpLen PByts Len SubLen PSubLen OpPtr Child Parent Flags AcTyp Final Col L\n", 217 76, " "); 218 } 219 |
220 /* Debug output */ 221 222 DbgPrint (ASL_TREE_OUTPUT, 223 "%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level); 224 UtPrintFormattedName (Op->Asl.ParseOpcode, Level); 225 226 if (Op->Asl.ParseOpcode == PARSEOP_NAMESEG || 227 Op->Asl.ParseOpcode == PARSEOP_NAMESTRING || 228 Op->Asl.ParseOpcode == PARSEOP_METHODCALL) 229 { 230 DbgPrint (ASL_TREE_OUTPUT, 231 "%10.32s ", Op->Asl.ExternalName); 232 } 233 else 234 { 235 DbgPrint (ASL_TREE_OUTPUT, " "); 236 } 237 |
238 DbgPrint (ASL_TREE_OUTPUT, 239 "%08X %04X %04X %01X %04X %04X %04X %04X %08X %08X %08X %08X %08X %04X %02d %02d\n", 240 /* 1 */ (UINT32) Op->Asl.Value.Integer, 241 /* 2 */ Op->Asl.ParseOpcode, 242 /* 3 */ Op->Asl.AmlOpcode, 243 /* 4 */ Op->Asl.AmlOpcodeLength, 244 /* 5 */ Op->Asl.AmlPkgLenBytes, 245 /* 6 */ Op->Asl.AmlLength, 246 /* 7 */ Op->Asl.AmlSubtreeLength, 247 /* 8 */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0, 248 /* 9 */ Op, 249 /* 10 */ Op->Asl.Child, 250 /* 11 */ Op->Asl.Parent, 251 /* 12 */ Op->Asl.CompileFlags, 252 /* 13 */ Op->Asl.AcpiBtype, 253 /* 14 */ Op->Asl.FinalAmlLength, 254 /* 15 */ Op->Asl.Column, 255 /* 16 */ Op->Asl.LineNumber); |
256 257 /* Generate the AML for this node */ 258 259 CgWriteNode (Op); 260 return (AE_OK); 261} 262 263 --- 127 unchanged lines hidden (view full) --- 391 if (Op->Asl.CompileFlags & NODE_AML_PACKAGE) 392 { 393 if (Op->Asl.AmlPkgLenBytes == 1) 394 { 395 /* Simplest case -- no bytes to follow, just write the count */ 396 397 CgLocalWriteAmlData (Op, &PkgLen.LenBytes[0], 1); 398 } |
399 else if (Op->Asl.AmlPkgLenBytes != 0) |
400 { 401 /* 402 * Encode the "bytes to follow" in the first byte, top two bits. 403 * The low-order nybble of the length is in the bottom 4 bits 404 */ 405 PkgLenFirstByte = (UINT8) 406 (((UINT32) (Op->Asl.AmlPkgLenBytes - 1) << 6) | 407 (PkgLen.LenBytes[0] & 0x0F)); --- 175 unchanged lines hidden (view full) --- 583 584static void 585CgWriteNode ( 586 ACPI_PARSE_OBJECT *Op) 587{ 588 ASL_RESOURCE_NODE *Rnode; 589 590 |
591 /* Always check for DEFAULT_ARG and other "Noop" nodes */ 592 /* TBD: this may not be the best place for this check */ 593 594 if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) || 595 (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) || 596 (Op->Asl.ParseOpcode == PARSEOP_INCLUDE) || 597 (Op->Asl.ParseOpcode == PARSEOP_INCLUDE_END)) 598 { 599 return; 600 } 601 |
602 Op->Asl.FinalAmlLength = 0; 603 |
604 switch (Op->Asl.AmlOpcode) 605 { 606 case AML_RAW_DATA_BYTE: 607 case AML_RAW_DATA_WORD: 608 case AML_RAW_DATA_DWORD: 609 case AML_RAW_DATA_QWORD: 610 611 CgLocalWriteAmlData (Op, &Op->Asl.Value.Integer, Op->Asl.AmlLength); --- 50 unchanged lines hidden --- |