Exemplo n.º 1
0
        private AcpiData AmlNotAction(AmlOp amlOp)
        {
            AcpiData data1   = null;
            AcpiData amlData = new AcpiData();

            amlData.Name = "Result";
            amlData.Type = AcpiDataType.Int;
            if (amlOp.amlDatas.Count + amlOp.SubOp.Count != 1)
            {
                //System.Diagnostics.Debug.Assert(false);
                Log.Logs("");
            }
            if (amlOp.amlDatas.Count == 1)
            {
                data1 = amlOp.amlDatas[0];
            }
            else
            {
                data1 = actions[amlOp.SubOp[0].OpCode].Invoke(amlOp.SubOp[0]);
            }
            if (data1 == null)
            {
                //System.Diagnostics.Debug.Assert(false);
                Log.Logs("");
            }
            amlData.PutValue(0);
            if (data1.Value == 0)
            {
                amlData.PutValue(1);
            }
            return(amlData);
        }
Exemplo n.º 2
0
        private AcpiData AmlLEqualAction(AmlOp amlOp)
        {
            AcpiData data1   = null;
            AcpiData data2   = null;
            AcpiData amlData = new AcpiData();

            amlData.Name = "Result";
            amlData.Type = AcpiDataType.Int;
            if (amlOp.amlDatas.Count + amlOp.SubOp.Count != 2)
            {
                //System.Diagnostics.Debug.Assert(false);
                Log.Logs("");
            }
            if (amlOp.amlDatas.Count == 2)
            {
                data1 = amlOp.amlDatas[0];
                data2 = amlOp.amlDatas[1];
            }
            else if (amlOp.SubOp.Count == 2)
            {
                data1 = actions[amlOp.SubOp[0].OpCode].Invoke(amlOp.SubOp[0]);
                data2 = actions[amlOp.SubOp[1].OpCode].Invoke(amlOp.SubOp[1]);
            }
            else
            {
                data1 = actions[amlOp.SubOp[0].OpCode].Invoke(amlOp.SubOp[0]);
                data2 = amlOp.amlDatas[0];
            }
            //System.Diagnostics.Debug.Assert(false);
            amlData.PutValue(CompareAcpiData(data1, data2));
            return(amlData);
        }
Exemplo n.º 3
0
        private AcpiData AmlDefaultNonLogicalAction(AmlOp amlOp)
        {
            AcpiData amlData = new AcpiData();

            amlData.Name = "Result";
            amlData.Type = AcpiDataType.Int;
            amlData.PutValue(1);
            return(amlData);
        }