From patchwork Thu Feb 4 21:53:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 61218 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp728050lbl; Thu, 4 Feb 2016 14:11:52 -0800 (PST) X-Received: by 10.140.32.203 with SMTP id h69mr12341024qgh.55.1454623911798; Thu, 04 Feb 2016 14:11:51 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s65si12713227qhb.93.2016.02.04.14.11.51 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 04 Feb 2016 14:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:44443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRS7z-0000Wn-7Q for patch@linaro.org; Thu, 04 Feb 2016 17:11:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRRqU-0000RK-0W for qemu-devel@nongnu.org; Thu, 04 Feb 2016 16:53:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRRqS-0005iW-HZ for qemu-devel@nongnu.org; Thu, 04 Feb 2016 16:53:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRRqO-0005gn-Cn; Thu, 04 Feb 2016 16:53:40 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E667FBC6CE; Thu, 4 Feb 2016 21:53:39 +0000 (UTC) Received: from redhat.com (vpn1-4-163.ams2.redhat.com [10.36.4.163]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u14LrYhx012674; Thu, 4 Feb 2016 16:53:35 -0500 Date: Thu, 4 Feb 2016 23:53:34 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1454612376-7072-40-git-send-email-mst@redhat.com> References: <1454612376-7072-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1454612376-7072-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Eduardo Habkost , Igor Mammedov , Steven Newbury , Michael Tokarev , "Richard W . M . Jones" , Aleksei Kovura , qemu-arm@nongnu.org, Shannon Zhao , Shannon Zhao , Paolo Bonzini , Laszlo Ersek , Richard Henderson Subject: [Qemu-devel] [PULL 39/49] acpi: expose oem_id and oem_table_id in build_rsdt() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Laszlo Ersek Since build_rsdt() is implemented as common utility code (in "hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and oem_table_id parameters between board code and the generic build_header() function. Cc: "Michael S. Tsirkin" (supporter:ACPI/SMBIOS) Cc: Igor Mammedov (supporter:ACPI/SMBIOS) Cc: Shannon Zhao (maintainer:ARM ACPI Subsystem) Cc: Paolo Bonzini (maintainer:X86) Cc: Richard W.M. Jones Cc: Aleksei Kovura Cc: Michael Tokarev Cc: Steven Newbury RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758 LP: https://bugs.launchpad.net/qemu/+bug/1533848 Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Shannon Zhao --- include/hw/acpi/aml-build.h | 3 ++- hw/acpi/aml-build.c | 5 +++-- hw/arm/virt-acpi-build.c | 2 +- hw/i386/acpi-build.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) -- MST diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index c460bdd..aa29d30 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -364,6 +364,7 @@ void acpi_add_table(GArray *table_offsets, GArray *table_data); void acpi_build_tables_init(AcpiBuildTables *tables); void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre); void -build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets); +build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets, + const char *oem_id, const char *oem_table_id); #endif diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index e4b6c0c..603068b 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1492,7 +1492,8 @@ void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre) /* Build rsdt table */ void -build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets) +build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets, + const char *oem_id, const char *oem_table_id) { AcpiRsdtDescriptorRev1 *rsdt; size_t rsdt_len; @@ -1511,5 +1512,5 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets) sizeof(uint32_t)); } build_header(linker, table_data, - (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL); + (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id); } diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 8017b12..560764f 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -643,7 +643,7 @@ void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables) /* RSDT is pointed to by RSDP */ rsdt = tables_blob->len; - build_rsdt(tables_blob, tables->linker, table_offsets); + build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL); /* RSDP is in FSEG memory, so allocate it separately */ build_rsdp(tables->rsdp, tables->linker, rsdt); diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 061a9cb..705d12f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2681,7 +2681,7 @@ void acpi_build(AcpiBuildTables *tables) /* RSDT is pointed to by RSDP */ rsdt = tables_blob->len; - build_rsdt(tables_blob, tables->linker, table_offsets); + build_rsdt(tables_blob, tables->linker, table_offsets, NULL, NULL); /* RSDP is in FSEG memory, so allocate it separately */ build_rsdp(tables->rsdp, tables->linker, rsdt);