From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a712J-00057s-0z for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:13:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a712F-0005af-Mo for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:13:30 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:36166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a712F-0005aG-Go for qemu-devel@nongnu.org; Thu, 10 Dec 2015 08:13:27 -0500 Received: by mail-wm0-x232.google.com with SMTP id w144so23300804wmw.1 for ; Thu, 10 Dec 2015 05:13:27 -0800 (PST) References: <1449704528-289297-1-git-send-email-imammedo@redhat.com> <1449704528-289297-14-git-send-email-imammedo@redhat.com> From: Marcel Apfelbaum Message-ID: <56697A75.4070800@gmail.com> Date: Thu, 10 Dec 2015 15:13:25 +0200 MIME-Version: 1.0 In-Reply-To: <1449704528-289297-14-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 13/74] acpi: add aml_alias() Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org On 12/10/2015 01:41 AM, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > 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 dcaa7e9..6a63477 100644 > --- a/hw/acpi/aml-build.c > +++ b/hw/acpi/aml-build.c > @@ -1242,6 +1242,15 @@ Aml *aml_release(Aml *mutex) > return var; > } > > +/* ACPI 1.0b: 16.2.5.1 Name Space Modifier Objects Encoding: DefAlias */ > +Aml *aml_alias(const char *source_object, const char *alias_object) > +{ > + Aml *var = aml_opcode(0x06 /* AliasOp */); > + aml_append(var, aml_name("%s", source_object)); > + aml_append(var, aml_name("%s", alias_object)); > + 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 a694a67..cd3f3b7 100644 > --- a/include/hw/acpi/aml-build.h > +++ b/include/hw/acpi/aml-build.h > @@ -278,6 +278,7 @@ Aml *aml_field(const char *name, AmlAccessType type, AmlUpdateRule rule); > Aml *aml_mutex(const char *name, uint8_t sync_level); > Aml *aml_acquire(Aml *mutex, uint16_t timeout); > Aml *aml_release(Aml *mutex); > +Aml *aml_alias(const char *source_object, const char *alias_object); > Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name); > Aml *aml_create_qword_field(Aml *srcbuf, Aml *index, const char *name); > Aml *aml_varpackage(uint32_t num_elements); > Reviewed-by: Marcel Apfelbaum