Ejemplo n.º 1
0
 public AmlInterpreterThread(AcpiNamespace acpiNamespace, MethodResultCallback callback,
                             IOperationRegionAccessor operationRegionAccessor)
 {
     this.acpiNamespace           = acpiNamespace;
     this.currentPath             = AbsoluteNodePath.CreateRoot();
     this.callback                = callback;
     this.operationRegionAccessor = operationRegionAccessor;
 }
Ejemplo n.º 2
0
        public static AcpiDevice[] LoadDevices()
        {
            OperationRegionAccessor operationRegionAccessor = new OperationRegionAccessor();

            acpiNamespace   = new AcpiNamespace();
            reservedObjects = new ReservedObjects(acpiNamespace);
            reservedObjects.CreateReservedObjects();

            if (dsdt != null)
            {
                if (ParseAndLoadRegion(dsdt.Region, operationRegionAccessor) == AmlParser.ParseSuccess.Failure)
                {
                    throw new Exception("AML parser failure while parsing DSDT");
                }
            }

            // From the spec: "SSDTs are a continuation of the DSDT. Multiple SSDTs
            // can be used as part of a platform description. After the DSDT is loaded
            // into the ACPI Namespace, each secondary description table listed in the
            // RSDT/XSDT with a unique OEM Table ID is loaded." - section 2.1, General
            // ACPI Terminology
            StringSet visitedOemTableIds = new StringSet();

            for (int i = 0; i < rsdt.EntryCount; i++)
            {
                SystemTableHeader header = rsdt.GetTableHeader(i);
                VerboseOut.Print("    {0:x8}\n", __arglist(header.Signature));

                string oemTableId = header.OemTableId;
                if (!visitedOemTableIds.Contains(oemTableId) && header.Signature == Ssdt.Signature)
                {
                    visitedOemTableIds.Add(oemTableId);
                    ssdt = Ssdt.Create(header);
                    if (ParseAndLoadRegion(ssdt.Region, operationRegionAccessor) == AmlParser.ParseSuccess.Failure)
                    {
                        throw new Exception("AML parser failure while parsing SSDT " + oemTableId);
                    }
                }
            }

#if DUMP_ACPI_NAMESPACE
            DebugStub.WriteLine("Dumping ACPI namespace tree...");
            acpiNamespace.DumpTree();
#endif

            return(GetDeviceInfo(operationRegionAccessor));
        }
Ejemplo n.º 3
0
 public NamesVisitor(AcpiNamespace acpiNamespace)
 {
     this.acpiNamespace = acpiNamespace;
     this.currentPath   = AbsoluteNodePath.CreateRoot();
 }
Ejemplo n.º 4
0
 public LoadTimeEvaluateVisitor(AcpiNamespace acpiNamespace, AbsoluteNodePath currentPath)
 {
     this.acpiNamespace = acpiNamespace;
     this.currentPath   = currentPath;
 }
Ejemplo n.º 5
0
 public AmlLoader(AcpiNamespace acpiNamespace,
                  AcpiObject.IOperationRegionAccessor operationRegionAccessor)
 {
     this.acpiNamespace           = acpiNamespace;
     this.operationRegionAccessor = operationRegionAccessor;
 }
Ejemplo n.º 6
0
 public ValuesVisitor(AmlLoader loader, AcpiNamespace acpiNamespace)
 {
     this.acpiNamespace = acpiNamespace;
     this.currentPath   = AbsoluteNodePath.CreateRoot();
     this.loader        = loader;
 }
Ejemplo n.º 7
0
 public AmlInterpreter(AcpiNamespace acpiNamespace,
                       IOperationRegionAccessor operationRegionAccessor)
 {
     this.acpiNamespace           = acpiNamespace;
     this.operationRegionAccessor = operationRegionAccessor;
 }
Ejemplo n.º 8
0
 public ReservedObjects(AcpiNamespace acpiNamespace)
 {
     this.acpiNamespace = acpiNamespace;
 }