From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpSvI-0007Px-Mt for qemu-devel@nongnu.org; Mon, 04 May 2015 22:49:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpSvE-0003cr-Ks for qemu-devel@nongnu.org; Mon, 04 May 2015 22:49:28 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:32220) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpSvE-0003bs-3I for qemu-devel@nongnu.org; Mon, 04 May 2015 22:49:24 -0400 Message-ID: <55482EB2.7080803@huawei.com> Date: Tue, 5 May 2015 10:45:06 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1429104309-3844-1-git-send-email-zhaoshenglong@huawei.com> <1429104309-3844-16-git-send-email-zhaoshenglong@huawei.com> In-Reply-To: <1429104309-3844-16-git-send-email-zhaoshenglong@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v5 15/20] hw/acpi/aml-build: Add aml_not() term List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com, christoffer.dall@linaro.org, a.spyridakis@virtualopensystems.com, claudio.fontana@huawei.com, imammedo@redhat.com, hanjun.guo@linaro.org, mst@redhat.com, lersek@redhat.com, alex.bennee@linaro.org Cc: hangaohuai@huawei.com, peter.huangpeng@huawei.com, shannon.zhao@linaro.org On 2015/4/15 21:25, Shannon Zhao wrote: > From: Shannon Zhao > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > Reviewed-by: Alex Bennée > --- > hw/acpi/aml-build.c | 9 +++++++++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 10 insertions(+) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index cd4ffe2..139099f 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -608,6 +608,15 @@ Aml *aml_irq_no_flags(uint8_t irq) > return var; > } > > +/* ACPI 1.0: 16.2.3 Operators: DefLNot */ > +Aml *aml_not(Aml *arg) > +{ > + Aml *var = aml_opcode(0x92 /* LNotOp */); > + aml_append(var, arg); > + build_append_int(var->buf, 0x00); /* NullNameOp */ This is not necessary to append 0, will remove it at next version. > + return var; > +} > + > /* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefLEqual */ > Aml *aml_equal(Aml *arg1, Aml *arg2) > { > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h > index 61c1a03..08b3fbd 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -224,6 +224,7 @@ Aml *aml_named_field(const char *name, unsigned length); > Aml *aml_reserved_field(unsigned length); > Aml *aml_local(int num); > Aml *aml_string(const char *name_format, ...) GCC_FMT_ATTR(1, 2); > +Aml *aml_not(Aml *arg); > Aml *aml_equal(Aml *arg1, Aml *arg2); > Aml *aml_processor(uint8_t proc_id, uint32_t pblk_addr, uint8_t pblk_len, > const char *name_format, ...) GCC_FMT_ATTR(4, 5); > -- Shannon