From nobody Wed Nov 5 10:42:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1533741491118365.50152926758926; Wed, 8 Aug 2018 08:18:11 -0700 (PDT) Received: from localhost ([::1]:44279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnQDx-0006po-At for importer@patchew.org; Wed, 08 Aug 2018 11:18:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnQBx-0005pI-Th for qemu-devel@nongnu.org; Wed, 08 Aug 2018 11:16:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnQBu-0002gi-7W for qemu-devel@nongnu.org; Wed, 08 Aug 2018 11:16:05 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:42906 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fnQBu-0002gO-39 for qemu-devel@nongnu.org; Wed, 08 Aug 2018 11:16:02 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB8C240216E9 for ; Wed, 8 Aug 2018 15:16:01 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 26FF5104083A; Wed, 8 Aug 2018 15:16:01 +0000 (UTC) From: Igor Mammedov To: qemu-devel@nongnu.org Date: Wed, 8 Aug 2018 17:15:47 +0200 Message-Id: <1533741349-199141-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1533741349-199141-1-git-send-email-imammedo@redhat.com> References: <1533741349-199141-1-git-send-email-imammedo@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 08 Aug 2018 15:16:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 08 Aug 2018 15:16:01 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'imammedo@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [RFC PATCH 2/4] acpi: add aml_create_byte_field() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" will be used by for packing _CST package in follow up patch Signed-off-by: Igor Mammedov --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 10c7946..8c8ca0b 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -371,6 +371,7 @@ Aml *aml_release(Aml *mutex); Aml *aml_alias(const char *source_object, const char *alias_object); Aml *aml_create_field(Aml *srcbuf, Aml *bit_index, Aml *num_bits, const char *name); +Aml *aml_create_byte_field(Aml *srcbuf, Aml *index, const char *name); 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); diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index def62b3..977d929 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1094,6 +1094,13 @@ Aml *aml_create_field(Aml *srcbuf, Aml *bit_index, A= ml *num_bits, return var; } =20 +/* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefCreateByteField */ +Aml *aml_create_byte_field(Aml *srcbuf, Aml *index, const char *name) +{ + return create_field_common(0x8C /* CreateByteFieldOp */, + srcbuf, index, name); +} + /* ACPI 1.0b: 16.2.5.2 Named Objects Encoding: DefCreateDWordField */ Aml *aml_create_dword_field(Aml *srcbuf, Aml *index, const char *name) { --=20 2.7.4