From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Mammedov Subject: Re: [PATCH v3 02/32] acpi: add aml_sizeof Date: Tue, 13 Oct 2015 14:33:51 +0200 Message-ID: <20151013143351.05ee0f96@nial.brq.redhat.com> References: <1444535584-18220-1-git-send-email-guangrong.xiao@linux.intel.com> <1444535584-18220-3-git-send-email-guangrong.xiao@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: pbonzini@redhat.com, gleb@kernel.org, mtosatti@redhat.com, stefanha@redhat.com, mst@redhat.com, rth@twiddle.net, ehabkost@redhat.com, dan.j.williams@intel.com, kvm@vger.kernel.org, qemu-devel@nongnu.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35280 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752603AbbJMMdz (ORCPT ); Tue, 13 Oct 2015 08:33:55 -0400 In-Reply-To: <1444535584-18220-3-git-send-email-guangrong.xiao@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 11 Oct 2015 11:52:34 +0800 Xiao Guangrong wrote: > Implement SizeOf term which is used by NVDIMM _DSM method in later patch > > Signed-off-by: Xiao Guangrong Reviewed-by: Igor Mammedov > --- > hw/acpi/aml-build.c | 8 ++++++++ > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c > index cbd53f4..a72214d 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -1143,6 +1143,14 @@ Aml *aml_derefof(Aml *arg) > return var; > } > > +/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefSizeOf */ > +Aml *aml_sizeof(Aml *arg) > +{ > + Aml *var = aml_opcode(0x87 /* SizeOfOp */); > + aml_append(var, arg); > + return var; > +} > + > void > build_header(GArray *linker, GArray *table_data, > AcpiTableHeader *h, const char *sig, int len, uint8_t rev) > diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h > index 5a03d33..7296efb 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -275,6 +275,7 @@ Aml *aml_varpackage(uint32_t num_elements); > Aml *aml_touuid(const char *uuid); > Aml *aml_unicode(const char *str); > Aml *aml_derefof(Aml *arg); > +Aml *aml_sizeof(Aml *arg); > > void > build_header(GArray *linker, GArray *table_data,