public Node CreateNodeAt(NodePath nodePath)
        {
            Node node = acpiNamespace.CreateNodeAt(nodePath, currentPath);

            frameStack.Peek().NotifyCreateNodeAt(nodePath, node);
            return(node);
        }
Exemple #2
0
            public void VisitField(AmlParser.SourceBuff sourceBuff,
                                   TermArg indexTermArg, ulong bitIndexMultiplier,
                                   ulong bitSize,
                                   NodePath fieldName)
            {
                AcpiObject.AcpiObject indexObj = LoadTimeEvaluate(indexTermArg);
                CheckObjectType(indexObj, AcpiObjectType.Integer);

                ulong index    = ((AcpiObject.Integer)(indexObj.GetTarget())).Value;
                ulong bitIndex = index * bitIndexMultiplier;

                AcpiObject.AcpiObject bufferObj = LoadTimeEvaluate(sourceBuff.buffer);
                CheckObjectType(bufferObj, AcpiObjectType.Buffer);

                Node node = acpiNamespace.LookupNode(fieldName, currentPath);

                node.Value = new BufferField((AcpiObject.Buffer)(bufferObj.GetTarget()), bitIndex, bitSize);
            }
        public bool IsNullTarget(AmlParser.Target target)
        {
            SuperName superName = target.superName;

            if (superName.Tag != SuperName.TagValue.SimpleName)
            {
                return(false);
            }
            SimpleName simpleName = superName.GetAsSimpleName();

            if (simpleName.Tag != SimpleName.TagValue.NameString)
            {
                return(false);
            }
            NodePath nodePath = simpleName.GetAsNameString().nodePath;

            return(!nodePath.IsAbsolute &&
                   nodePath.NumParentPrefixes == 0 &&
                   nodePath.NameSegments.Length == 0);
        }
 public Node LookupNode(NodePath nodePath)
 {
     return(acpiNamespace.LookupNode(nodePath, currentPath));
 }
 public void NotifyCreateNodeAt(NodePath nodePath, Node node)
 {
     methodTemporaryNamespaceObjectSet.Add(node);
 }
 public Field(AmlParser.FieldFlags fieldFlags, NodePath nodePath, FieldElement[] fieldElements)
 {
     this.fieldFlags    = fieldFlags;
     this.nodePath      = nodePath;
     this.fieldElements = fieldElements;
 }
 public OperationRegion(RegionSpace operationSpace, NodePath nodePath)
 {
     this.operationSpace = operationSpace;
     this.nodePath       = nodePath;
 }
 public JumpIfNodePathExists(NodePath nodePath)
 {
     this.nodePath = nodePath;
 }
 public Load(NodePath nodePath)
 {
     this.nodePath = nodePath;
 }
 public DefName(NodePath nodePath)
 {
     this.nodePath = nodePath;
 }
 public CreateField(NodePath nodePath)
 {
     this.nodePath = nodePath;
 }
 public PushNodePath(NodePath value)
 {
     this.value = value;
 }