yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
34b321
From 39f2d80c57f648afd2eab27816e8f93cf48e718d Mon Sep 17 00:00:00 2001
34b321
From: Laszlo Ersek <lersek@redhat.com>
34b321
Date: Wed, 11 May 2016 12:33:46 +0200
34b321
Subject: [PATCH 07/10] acpi: expose oem_id and oem_table_id in build_rsdt()
34b321
34b321
RH-Author: Laszlo Ersek <lersek@redhat.com>
34b321
Message-id: <1462970028-10959-6-git-send-email-lersek@redhat.com>
34b321
Patchwork-id: 70382
34b321
O-Subject: [RHEL-7.3 qemu-kvm PATCH v2 5/7] acpi: expose oem_id and oem_table_id in build_rsdt()
34b321
Bugzilla: 1330969
34b321
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
34b321
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
34b321
RH-Acked-by: Thomas Huth <thuth@redhat.com>
34b321
34b321
Since build_rsdt() is implemented as common utility code (in
34b321
"hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and
34b321
oem_table_id parameters between board code and the generic build_header()
34b321
function.
34b321
34b321
Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
34b321
Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
34b321
Cc: Shannon Zhao <zhaoshenglong@huawei.com> (maintainer:ARM ACPI Subsystem)
34b321
Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
34b321
Cc: Richard W.M. Jones <rjones@redhat.com>
34b321
Cc: Aleksei Kovura <alex3kov@zoho.com>
34b321
Cc: Michael Tokarev <mjt@tls.msk.ru>
34b321
Cc: Steven Newbury <steve@snewbury.org.uk>
34b321
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1248758
34b321
LP: https://bugs.launchpad.net/qemu/+bug/1533848
34b321
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
34b321
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
34b321
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
34b321
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
34b321
(cherry picked from commit 5151355898699eb66fad0a710b8b6011690a0dfc)
34b321
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
34b321
34b321
Conflicts:
34b321
	hw/acpi/aml-build.c
34b321
	hw/arm/virt-acpi-build.c
34b321
	hw/i386/acpi-build.c
34b321
	include/hw/acpi/aml-build.h
34b321
34b321
RHEL-7 backport note: this is actually a manual reimplementation of the
34b321
upstream patch, which is mostly mechanic. A clean cherry-pick would depend
34b321
on a lot of reorganizatorial upstream patches (e.g., 658c27181bf3
34b321
("hw/i386/acpi-build: move generic acpi building helpers into dedictated
34b321
file")), and many new features that overlap with ACPI generation (e.g.,
34b321
the "virt" machtype of the arm/aarch64 targets).
34b321
34b321
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
34b321
---
34b321
 hw/i386/acpi-build.c | 7 ++++---
34b321
 1 file changed, 4 insertions(+), 3 deletions(-)
34b321
---
34b321
 hw/i386/acpi-build.c | 7 ++++---
34b321
 1 file changed, 4 insertions(+), 3 deletions(-)
34b321
34b321
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
34b321
index 4839b0e..d9433e6 100644
34b321
--- a/hw/i386/acpi-build.c
34b321
+++ b/hw/i386/acpi-build.c
34b321
@@ -951,7 +951,8 @@ build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
34b321
 
34b321
 /* Build final rsdt table */
34b321
 static void
34b321
-build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
34b321
+build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets,
34b321
+           const char *oem_id, const char *oem_table_id)
34b321
 {
34b321
     AcpiRsdtDescriptorRev1 *rsdt;
34b321
     size_t rsdt_len;
34b321
@@ -970,7 +971,7 @@ build_rsdt(GArray *table_data, GArray *linker, GArray *table_offsets)
34b321
                                        sizeof(uint32_t));
34b321
     }
34b321
     build_header(linker, table_data,
34b321
-                 (void *)rsdt, "RSDT", rsdt_len, 1, NULL, NULL);
34b321
+                 (void *)rsdt, "RSDT", rsdt_len, 1, oem_id, oem_table_id);
34b321
 }
34b321
 
34b321
 static GArray *
34b321
@@ -1126,7 +1127,7 @@ void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
34b321
 
34b321
     /* RSDT is pointed to by RSDP */
34b321
     rsdt = tables->table_data->len;
34b321
-    build_rsdt(tables->table_data, tables->linker, table_offsets);
34b321
+    build_rsdt(tables->table_data, tables->linker, table_offsets, NULL, NULL);
34b321
 
34b321
     /* RSDP is in FSEG memory, so allocate it separately */
34b321
     build_rsdp(tables->rsdp, tables->linker, rsdt);
34b321
-- 
34b321
1.8.3.1
34b321