From patchwork Thu Jan 14 01:36:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 567232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 179CD140BA2 for ; Thu, 14 Jan 2016 12:38:31 +1100 (AEDT) Received: from localhost ([::1]:39900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJWrt-0007Dj-4a for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2016 20:38:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJWqk-0005JC-Rw for qemu-devel@nongnu.org; Wed, 13 Jan 2016 20:37:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJWqh-0006Cs-HU for qemu-devel@nongnu.org; Wed, 13 Jan 2016 20:37:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJWqh-0006Co-AZ for qemu-devel@nongnu.org; Wed, 13 Jan 2016 20:37:15 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id EF245C0A1603; Thu, 14 Jan 2016 01:37:14 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com ([10.3.113.3]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0E1b19E024824; Wed, 13 Jan 2016 20:37:13 -0500 From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Thu, 14 Jan 2016 02:36:55 +0100 Message-Id: <1452735417-5461-3-git-send-email-lersek@redhat.com> In-Reply-To: <1452735417-5461-1-git-send-email-lersek@redhat.com> References: <1452735417-5461-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Aleksei Kovura , "Michael S. Tsirkin" , Michael Tokarev , "Richard W.M. Jones" , Paolo Bonzini , Shannon Zhao , Igor Mammedov Subject: [Qemu-devel] [PATCH 2/4] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758 Signed-off-by: Laszlo Ersek --- 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(-) 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 05b8bd0..ce7fe81 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1496,7 +1496,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; @@ -1515,5 +1516,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 6b5aa12..61b6f9a 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -656,7 +656,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 e1ebd07..6408362 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2705,7 +2705,7 @@ void acpi_build(PcGuestInfo *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);