diff --git a/src/acpi/aml/type2opcode.rs b/src/acpi/aml/type2opcode.rs index c0b1bc8c3036b30f3763e40e0083de8db6358b74..d4591ce6614803af0f34e11de336a4f95a3ae94a 100644 --- a/src/acpi/aml/type2opcode.rs +++ b/src/acpi/aml/type2opcode.rs @@ -266,13 +266,22 @@ fn parse_def_ref_of(data: &[u8], }) } - // TODO: Perform computation parser_opcode!(data, 0x71); let obj = parse_super_name(&data[1..], ctx)?; + let res = match obj.val { + AmlValue::String(ref s) => { + match ctx.get(AmlValue::String(s.clone())) { + AmlValue::None => return Err(AmlError::AmlValueError), + _ => ObjectReference::Object(s.clone()) + } + }, + AmlValue::ObjectReference(ref o) => o.clone(), + _ => return Err(AmlError::AmlValueError) + }; Ok(AmlParseType { - val: AmlValue::Uninitialized, + val: AmlValue::ObjectReference(res), len: 1 + obj.len }) }