From 21c9d824cc7d2be106abdb3ecea6384214d4f529 Mon Sep 17 00:00:00 2001 From: Connor Wood Date: Thu, 22 Jun 2017 16:25:19 +0100 Subject: [PATCH] Finalized ACPIType --- src/acpi/aml/dataobj.rs | 6 +++--- src/acpi/aml/namespace.rs | 7 ++++--- src/acpi/aml/termlist.rs | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/acpi/aml/dataobj.rs b/src/acpi/aml/dataobj.rs index 885396a..27f81f8 100644 --- a/src/acpi/aml/dataobj.rs +++ b/src/acpi/aml/dataobj.rs @@ -47,7 +47,7 @@ impl AmlExecutable for DataRefObj { fn execute(&self, namespace: &mut BTreeMap, scope: String) -> Option { match *self { DataRefObj::DataObj(ref cd) => cd.execute(namespace, scope), - _ => Some(AmlValue::Integer) + _ => Some(AmlValue::Uninitialized) } } } @@ -57,7 +57,7 @@ impl AmlExecutable for DataObj { match *self { DataObj::ComputationalData(ref cd) => cd.execute(namespace, scope), DataObj::DefPackage(ref pkg) => pkg.execute(namespace, scope), - _ => Some(AmlValue::Integer) + _ => Some(AmlValue::Uninitialized) } } } @@ -73,7 +73,7 @@ impl AmlExecutable for ComputationalData { ComputationalData::One => Some(AmlValue::IntegerConstant(1)), ComputationalData::Ones => Some(AmlValue::IntegerConstant(0xFFFFFFFFFFFFFFFF)), ComputationalData::String(ref s) => Some(AmlValue::String(s.clone())), - _ => Some(AmlValue::Integer) + _ => Some(AmlValue::Uninitialized) } } } diff --git a/src/acpi/aml/namespace.rs b/src/acpi/aml/namespace.rs index a492aab..be49f7b 100644 --- a/src/acpi/aml/namespace.rs +++ b/src/acpi/aml/namespace.rs @@ -8,6 +8,7 @@ use core::str::FromStr; use super::namedobj::{ RegionSpace, FieldFlags, Method }; use super::termlist::Object; use super::namestring::SuperName; +use super::type2opcode::Type2OpCode; #[derive(Debug, Clone)] pub enum FieldSelector { @@ -34,7 +35,7 @@ pub enum AmlValue { index: Box, length: Box }, - DDBHandle, + DDBHandle(u32), // Index into the XSDT DebugObject, Device(BTreeMap), Event, @@ -45,7 +46,7 @@ pub enum AmlValue { offset: usize, length: usize }, - Integer, + Integer(Type2OpCode), IntegerConstant(u64), Method(Method), Mutex(u8), @@ -67,7 +68,7 @@ pub enum AmlValue { p_blk: Option, obj_list: BTreeMap }, - RawDataBuffer, + RawDataBuffer(Vec), ThermalZone(BTreeMap) } diff --git a/src/acpi/aml/termlist.rs b/src/acpi/aml/termlist.rs index 72d876d..c7d0c5f 100644 --- a/src/acpi/aml/termlist.rs +++ b/src/acpi/aml/termlist.rs @@ -70,10 +70,10 @@ impl AmlExecutable for Vec { impl AmlExecutable for TermArg { fn execute(&self, namespace: &mut BTreeMap, scope: String) -> Option { match *self { - TermArg::LocalObj(ref l) => Some(AmlValue::Integer), + TermArg::LocalObj(ref l) => Some(AmlValue::Uninitialized), TermArg::DataObj(ref d) => d.execute(namespace, scope), - TermArg::ArgObj(ref a) => Some(AmlValue::Integer), - TermArg::Type2Opcode(ref o) => Some(AmlValue::Integer) + TermArg::ArgObj(ref a) => Some(AmlValue::Uninitialized), + TermArg::Type2Opcode(ref o) => Some(AmlValue::Uninitialized) } } }