qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 04/11] acpi: add aml_concatenate()


From: Xiao Guangrong
Subject: Re: [Qemu-devel] [PATCH v2 04/11] acpi: add aml_concatenate()
Date: Sun, 14 Feb 2016 13:52:53 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1



On 02/08/2016 06:51 PM, Igor Mammedov wrote:
On Wed, 13 Jan 2016 02:50:03 +0800
Xiao Guangrong <address@hidden> wrote:

It will be used by nvdimm acpi

Signed-off-by: Xiao Guangrong <address@hidden>
---
  hw/acpi/aml-build.c         | 14 ++++++++++++++
  include/hw/acpi/aml-build.h |  1 +
  2 files changed, 15 insertions(+)

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 97c9efb..421dd84 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1440,6 +1440,20 @@ Aml *aml_alias(const char *source_object, const char 
*alias_object)
      return var;
  }

+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefConcat */
+Aml *aml_concatenate(Aml *source1, Aml *source2, Aml *target)
+{
+    Aml *var = aml_opcode(0x73 /* ConcatOp */);
+    aml_append(var, source1);
+    aml_append(var, source2);
+
+    if (target) {
+        aml_append(var, target);
+    }
target is not an optional, pls looks at aml_add and use
helper to make patch correct and smaller


Indeed, i will change it to:

/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefConcat */
Aml *aml_concatenate(Aml *source1, Aml *source2, Aml *target)
{
    return  build_opcode_2arg_dst(0x73 /* ConcatOp */, arg1, arg2, dst);
}

Thank you, Igor!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]