这篇教程C++ AcpiDmIndent函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AcpiDmIndent函数的典型用法代码示例。如果您正苦于以下问题:C++ AcpiDmIndent函数的具体用法?C++ AcpiDmIndent怎么用?C++ AcpiDmIndent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AcpiDmIndent函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: AcpiDmMemory24DescriptorvoidAcpiDmMemory24Descriptor ( AML_RESOURCE *Resource, UINT32 Length, UINT32 Level){ /* Dump name and read/write flag */ AcpiDmIndent (Level); AcpiOsPrintf ("Memory24 (%s,/n", AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->Memory24.Flags)]); /* Dump the 4 contiguous WORD values */ AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level); /* Insert a descriptor name */ AcpiDmIndent (Level + 1); AcpiDmDescriptorName (); AcpiOsPrintf (")/n");}
开发者ID:99corps,项目名称:runtime,代码行数:23,
示例2: AcpiDmFixedIoDescriptorvoidAcpiDmFixedIoDescriptor ( ACPI_OP_WALK_INFO *Info, AML_RESOURCE *Resource, UINT32 Length, UINT32 Level){ AcpiDmIndent (Level); AcpiOsPrintf ("FixedIO (/n"); AcpiDmIndent (Level + 1); AcpiDmDumpInteger16 (Resource->FixedIo.Address, "Address"); AcpiDmIndent (Level + 1); AcpiDmDumpInteger8 (Resource->FixedIo.AddressLength, "Length"); /* Insert a descriptor name */ AcpiDmIndent (Level + 1); AcpiDmDescriptorName (); AcpiOsPrintf (")/n");}
开发者ID:Raphine,项目名称:Raph_Kernel,代码行数:23,
示例3: AcpiDmIrqDescriptorvoidAcpiDmIrqDescriptor ( ASL_IRQ_FORMAT_DESC *Resource, UINT32 Length, UINT32 Level){ AcpiDmIndent (Level); AcpiOsPrintf ("%s (", AcpiGbl_IrqDecode [Length & 1]); if (Length & 1) { AcpiOsPrintf ("%s, %s, %s", AcpiGbl_HEDecode [Resource->Flags & 1], AcpiGbl_LLDecode [(Resource->Flags >> 3) & 1], AcpiGbl_SHRDecode [(Resource->Flags >> 4) & 1]); }
开发者ID:MarginC,项目名称:kame,代码行数:18,
示例4: AcpiDmGpioCommonstatic voidAcpiDmGpioCommon ( AML_RESOURCE *Resource, UINT32 Level){ UINT32 PinCount; UINT16 *PinList; UINT8 *VendorData; UINT32 i; /* ResourceSource, ResourceSourceIndex, ResourceType */ AcpiDmIndent (Level + 1); if (Resource->Gpio.ResSourceOffset) { AcpiUtPrintString ( ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset), ACPI_UINT16_MAX); }
开发者ID:Alkzndr,项目名称:freebsd,代码行数:20,
示例5: AcpiDmAddressFieldsstatic voidAcpiDmAddressFields ( void *Source, UINT8 Type, UINT32 Level){ UINT32 i; AcpiOsPrintf ("/n"); for (i = 0; i < 5; i++) { AcpiDmIndent (Level + 1); switch (Type) { case 16: AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], AcpiDmAddressNames[i]); break; case 32: AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], AcpiDmAddressNames[i]); break; case 64: AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i], AcpiDmAddressNames[i]); break; default: return; } }}
开发者ID:Alkzndr,项目名称:freebsd,代码行数:41,
示例6: AcpiDmGpioCommonstatic voidAcpiDmGpioCommon ( ACPI_OP_WALK_INFO *Info, AML_RESOURCE *Resource, UINT32 Level){ UINT16 *PinList; UINT8 *VendorData; char *DeviceName = NULL; UINT32 PinCount; UINT32 i; /* ResourceSource, ResourceSourceIndex, ResourceType */ AcpiDmIndent (Level + 1); if (Resource->Gpio.ResSourceOffset) { DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset), AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX); }
开发者ID:coyizumi,项目名称:cs111,代码行数:21,
示例7: AcpiDmGenericRegisterDescriptorvoidAcpiDmGenericRegisterDescriptor ( ACPI_OP_WALK_INFO *Info, AML_RESOURCE *Resource, UINT32 Length, UINT32 Level){ AcpiDmIndent (Level); AcpiOsPrintf ("Register ("); AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId); AcpiOsPrintf ("/n"); AcpiDmIndent (Level + 1); AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width"); AcpiDmIndent (Level + 1); AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset"); AcpiDmIndent (Level + 1); AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address"); /* Optional field for ACPI 3.0 */ AcpiDmIndent (Level + 1); if (Resource->GenericReg.AccessSize) { AcpiOsPrintf ("0x%2.2X, // %s/n", Resource->GenericReg.AccessSize, "Access Size"); AcpiDmIndent (Level + 1); } else { AcpiOsPrintf (","); } /* DescriptorName was added for ACPI 3.0+ */ AcpiDmDescriptorName (); AcpiOsPrintf (")/n");}
开发者ID:coyizumi,项目名称:cs111,代码行数:41,
示例8: AcpiDmResourceTemplatevoidAcpiDmResourceTemplate ( ACPI_OP_WALK_INFO *Info, ACPI_PARSE_OBJECT *Op, UINT8 *ByteData, UINT32 ByteCount){ ACPI_STATUS Status; UINT32 CurrentByteOffset; UINT8 ResourceType; UINT32 ResourceLength; void *Aml; UINT32 Level; BOOLEAN DependentFns = FALSE; UINT8 ResourceIndex; ACPI_NAMESPACE_NODE *Node; if (Op->Asl.AmlOpcode != AML_FIELD_OP) { Info->MappingOp = Op; } Level = Info->Level; ResourceName = ACPI_DEFAULT_RESNAME; Node = Op->Common.Node; if (Node) { Node = Node->Child; } for (CurrentByteOffset = 0; CurrentByteOffset < ByteCount;) { Aml = &ByteData[CurrentByteOffset]; /* Get the descriptor type and length */ ResourceType = AcpiUtGetResourceType (Aml); ResourceLength = AcpiUtGetResourceLength (Aml); /* Validate the Resource Type and Resource Length */ Status = AcpiUtValidateResource (NULL, Aml, &ResourceIndex); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***//n", ResourceType, AcpiFormatException (Status)); return; } /* Point to next descriptor */ CurrentByteOffset += AcpiUtGetDescriptorLength (Aml); /* Descriptor pre-processing */ switch (ResourceType) { case ACPI_RESOURCE_NAME_START_DEPENDENT: /* Finish a previous StartDependentFns */ if (DependentFns) { Level--; AcpiDmIndent (Level); AcpiOsPrintf ("}/n"); } break; case ACPI_RESOURCE_NAME_END_DEPENDENT: Level--; DependentFns = FALSE; break; case ACPI_RESOURCE_NAME_END_TAG: /* Normal exit, the resource list is finished */ if (DependentFns) { /* * Close an open StartDependentDescriptor. This indicates a * missing EndDependentDescriptor. */ Level--; DependentFns = FALSE; /* Go ahead and insert EndDependentFn() */ AcpiDmEndDependentDescriptor (Info, Aml, ResourceLength, Level); AcpiDmIndent (Level); AcpiOsPrintf ( "/*** Disassembler: inserted missing EndDependentFn () ***//n"); } return; default://.........这里部分代码省略.........
开发者ID:yazshel,项目名称:netbsd-kernel,代码行数:101,
示例9: AcpiDmAscendingOpstatic ACPI_STATUSAcpiDmAscendingOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context){ ACPI_OP_WALK_INFO *Info = Context; ACPI_PARSE_OBJECT *ParentOp; if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE) { /* Ignore this op -- it was handled elsewhere */ return (AE_OK); } if ((Level == 0) && (Op->Common.AmlOpcode == AML_SCOPE_OP)) { /* Indicates the end of the current descriptor block (table) */ AcpiOsPrintf ("}/n/n"); return (AE_OK); } switch (AcpiDmBlockType (Op)) { case BLOCK_PAREN: /* Completed an op that has arguments, add closing paren if needed */ AcpiDmCloseOperator (Op); if (Op->Common.AmlOpcode == AML_NAME_OP) { /* Emit description comment for Name() with a predefined ACPI name */ AcpiDmPredefinedDescription (Op); } else { /* For Create* operators, attempt to emit resource tag description */ AcpiDmFieldPredefinedDescription (Op); } /* Decode Notify() values */ if (Op->Common.AmlOpcode == AML_NOTIFY_OP) { AcpiDmNotifyDescription (Op); } AcpiDmDisplayTargetPathname (Op); /* Could be a nested operator, check if comma required */ if (!AcpiDmCommaIfListMember (Op)) { if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) && (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) && (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP)) { /* * This is a first-level element of a term list * start a new line */ if (!(Info->Flags & ACPI_PARSEOP_PARAMLIST)) { AcpiOsPrintf ("/n"); } } } break; case BLOCK_BRACE: case (BLOCK_BRACE | BLOCK_PAREN): /* Completed an op that has a term list, add closing brace */ if (Op->Common.DisasmFlags & ACPI_PARSEOP_EMPTY_TERMLIST) { AcpiOsPrintf ("}"); } else { AcpiDmIndent (Level); AcpiOsPrintf ("}"); } AcpiDmCommaIfListMember (Op); if (AcpiDmBlockType (Op->Common.Parent) != BLOCK_PAREN) { AcpiOsPrintf ("/n"); if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_EMPTY_TERMLIST)) { if ((Op->Common.AmlOpcode == AML_IF_OP) && (Op->Common.Next) && (Op->Common.Next->Common.AmlOpcode == AML_ELSE_OP))//.........这里部分代码省略.........
开发者ID:alexandermerritt,项目名称:dragonfly,代码行数:101,
示例10: AcpiDmDescendingOpstatic ACPI_STATUSAcpiDmDescendingOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context){ ACPI_OP_WALK_INFO *Info = Context; const ACPI_OPCODE_INFO *OpInfo; UINT32 Name; ACPI_PARSE_OBJECT *NextOp; if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE) { /* Ignore this op -- it was handled elsewhere */ return (AE_CTRL_DEPTH); } /* Level 0 is at the Definition Block level */ if (Level == 0) { /* In verbose mode, print the AML offset, opcode and depth count */ if (Info->WalkState) { VERBOSE_PRINT ((DB_FULL_OP_INFO, (Info->WalkState->MethodNode ? Info->WalkState->MethodNode->Name.Ascii : " "), Op->Common.AmlOffset, (UINT32) Op->Common.AmlOpcode)); } if (Op->Common.AmlOpcode == AML_SCOPE_OP) { /* This is the beginning of the Definition Block */ AcpiOsPrintf ("{/n"); /* Emit all External() declarations here */ AcpiDmEmitExternals (); return (AE_OK); } } else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) && (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) && (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP)) { /* * This is a first-level element of a term list, * indent a new line */ switch (Op->Common.AmlOpcode) { case AML_NOOP_OP: /* * Optionally just ignore this opcode. Some tables use * NoOp opcodes for "padding" out packages that the BIOS * changes dynamically. This can leave hundreds or * thousands of NoOp opcodes that if disassembled, * cannot be compiled because they are syntactically * incorrect. */ if (AcpiGbl_IgnoreNoopOperator) { Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; return (AE_OK); } /* Fallthrough */ default: AcpiDmIndent (Level); break; } Info->LastLevel = Level; Info->Count = 0; } /* * This is an inexpensive mechanism to try and keep lines from getting * too long. When the limit is hit, start a new line at the previous * indent plus one. A better but more expensive mechanism would be to * keep track of the current column. */ Info->Count++; if (Info->Count /* +Info->LastLevel */ > 12) { Info->Count = 0; AcpiOsPrintf ("/n"); AcpiDmIndent (Info->LastLevel + 1); } /* If ASL+ is enabled, check for a C-style operator */ if (AcpiDmCheckForSymbolicOpcode (Op, Info)) {//.........这里部分代码省略.........
开发者ID:alexandermerritt,项目名称:dragonfly,代码行数:101,
示例11: AcpiDmDumpDescendingstatic ACPI_STATUSAcpiDmDumpDescending ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context){ ACPI_OP_WALK_INFO *Info = Context; const ACPI_OPCODE_INFO *OpInfo; char *Path; if (!Op) { return (AE_OK); } OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode); Info->Count++; /* Most of the information (count, level, name) here */ AcpiOsPrintf ("% 5d [%2.2d] ", Info->Count, Level); AcpiDmIndent (Level); AcpiOsPrintf ("%-28s", AcpiPsGetOpcodeName (Op->Common.AmlOpcode)); /* Extra info is helpful */ switch (Op->Common.AmlOpcode) { case AML_BYTE_OP: case AML_WORD_OP: case AML_DWORD_OP: AcpiOsPrintf ("%X", (UINT32) Op->Common.Value.Integer); break; case AML_INT_NAMEPATH_OP: if (Op->Common.Value.String) { AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String, NULL, &Path); AcpiOsPrintf ("%s %p", Path, Op->Common.Node); ACPI_FREE (Path); } else { AcpiOsPrintf ("[NULL]"); } break; case AML_NAME_OP: case AML_METHOD_OP: case AML_DEVICE_OP: case AML_INT_NAMEDFIELD_OP: AcpiOsPrintf ("%4.4s", &Op->Named.Name); break; default: break; } AcpiOsPrintf ("/n"); return (AE_OK);}
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:63,
示例12: AcpiDmAddressCommonstatic voidAcpiDmAddressCommon ( AML_RESOURCE *Resource, UINT8 Type, UINT32 Level){ UINT8 ResourceType; UINT8 SpecificFlags; UINT8 Flags; ResourceType = Resource->Address.ResourceType; SpecificFlags = Resource->Address.SpecificFlags; Flags = Resource->Address.Flags; AcpiDmIndent (Level); /* Validate ResourceType */ if ((ResourceType > 2) && (ResourceType < 0xC0)) { AcpiOsPrintf ( "/**** Invalid Resource Type: 0x%X ****/", ResourceType); return; } /* Prefix is either Word, DWord, QWord, or Extended */ AcpiDmAddressPrefix (Type); /* Resource Types above 0xC0 are vendor-defined */ if (ResourceType > 2) { AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType); AcpiDmSpaceFlags (Flags); AcpiOsPrintf (" 0x%2.2X,", SpecificFlags); return; } /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */ AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]); /* Decode the general and type-specific flags */ if (ResourceType == ACPI_MEMORY_RANGE) { AcpiDmMemoryFlags (Flags, SpecificFlags); } else /* IO range or BusNumberRange */ { AcpiDmIoFlags (Flags); if (ResourceType == ACPI_IO_RANGE) { AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]); } }}
开发者ID:ColinIanKing,项目名称:fwts,代码行数:61,
示例13: AcpiDmAscendingOpstatic ACPI_STATUSAcpiDmAscendingOp ( ACPI_PARSE_OBJECT *Op, UINT32 Level, void *Context){ ACPI_OP_WALK_INFO *Info = Context; ACPI_PARSE_OBJECT *ParentOp; if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE) { /* Ignore this op -- it was handled elsewhere */ return (AE_OK); } if ((Level == 0) && (Op->Common.AmlOpcode == AML_SCOPE_OP)) { /* Indicates the end of the current descriptor block (table) */ AcpiOsPrintf ("}/n/n"); return (AE_OK); } switch (AcpiDmBlockType (Op)) { case BLOCK_PAREN: /* Completed an op that has arguments, add closing paren */ AcpiOsPrintf (")"); if (Op->Common.AmlOpcode == AML_NAME_OP) { /* Emit description comment for Name() with a predefined ACPI name */ AcpiDmPredefinedDescription (Op); } else { /* For Create* operators, attempt to emit resource tag description */ AcpiDmFieldPredefinedDescription (Op); } /* Could be a nested operator, check if comma required */ if (!AcpiDmCommaIfListMember (Op)) { if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) && (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) && (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP)) { /* * This is a first-level element of a term list * start a new line */ if (!(Info->Flags & ACPI_PARSEOP_PARAMLIST)) { AcpiOsPrintf ("/n"); } } } break; case BLOCK_BRACE: case (BLOCK_BRACE | BLOCK_PAREN): /* Completed an op that has a term list, add closing brace */ if (Op->Common.DisasmFlags & ACPI_PARSEOP_EMPTY_TERMLIST) { AcpiOsPrintf ("}"); } else { AcpiDmIndent (Level); AcpiOsPrintf ("}"); } AcpiDmCommaIfListMember (Op); if (AcpiDmBlockType (Op->Common.Parent) != BLOCK_PAREN) { AcpiOsPrintf ("/n"); if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_EMPTY_TERMLIST)) { if ((Op->Common.AmlOpcode == AML_IF_OP) && (Op->Common.Next) && (Op->Common.Next->Common.AmlOpcode == AML_ELSE_OP)) { break; } if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) && (!Op->Common.Next)) { break;//.........这里部分代码省略.........
开发者ID:Jyang772,项目名称:XEOS,代码行数:101,
示例14: AcpiDmDescendingOp//.........这里部分代码省略......... return (AE_OK); } } else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) && (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) && (!(Op->Common.DisasmFlags & ACPI_PARSEOP_ELSEIF)) && (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP)) { /* * This is a first-level element of a term list, * indent a new line */ switch (Op->Common.AmlOpcode) { case AML_NOOP_OP: /* * Optionally just ignore this opcode. Some tables use * NoOp opcodes for "padding" out packages that the BIOS * changes dynamically. This can leave hundreds or * thousands of NoOp opcodes that if disassembled, * cannot be compiled because they are syntactically * incorrect. */ if (AcpiGbl_IgnoreNoopOperator) { Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; return (AE_OK); } /* Fallthrough */ default: AcpiDmIndent (Level); break; } Info->LastLevel = Level; Info->Count = 0; } /* * This is an inexpensive mechanism to try and keep lines from getting * too long. When the limit is hit, start a new line at the previous * indent plus one. A better but more expensive mechanism would be to * keep track of the current column. */ Info->Count++; if (Info->Count /* +Info->LastLevel */ > 12) { Info->Count = 0; AcpiOsPrintf ("/n"); AcpiDmIndent (Info->LastLevel + 1); } /* If ASL+ is enabled, check for a C-style operator */ if (AcpiDmCheckForSymbolicOpcode (Op, Info)) { return (AE_OK); } /* Print the opcode name */ AcpiDmDisassembleOneOp (NULL, Info, Op);
开发者ID:derekmarcotte,项目名称:freebsd,代码行数:66,
注:本文中的AcpiDmIndent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AcpiDsCreateWalkState函数代码示例 C++ AcpiDmDescriptorName函数代码示例 |