qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] acpi: fix OEM ID/OEM Table ID padding


From: Dmitry V. Orekhov
Subject: Re: [PATCH 3/4] acpi: fix OEM ID/OEM Table ID padding
Date: Thu, 13 Jan 2022 16:19:24 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 1/13/22 13:22, Ani Sinha wrote:

On Thu, 13 Jan 2022, Dmitry V. Orekhov wrote:
I can't apply the patch to the qemu-6.1.0 source code on my own.
There is no acpi_table_begin function in the qemu-6.1.0 source code
(hw/acpi/aml-buld.c).

Try the following patch :

 From 10620c384bf05f0a7561c1afd0ec8ad5af9b7c0f Mon Sep 17 00:00:00 2001
From: Ani Sinha <ani@anisinha.ca>
Date: Thu, 13 Jan 2022 15:48:16 +0530
Subject: [PATCH] acpi: fix OEM ID/OEM Table ID padding for qemu 6.1.1

Replace whitespace padding with '\0' padding in accordance with spec
and expectations of guest OS.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
  hw/acpi/aml-build.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index d5103e6..0df053c 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1703,9 +1703,9 @@ build_header(BIOSLinker *linker, GArray *table_data,
      h->length = cpu_to_le32(len);
      h->revision = rev;

-    strpadcpy((char *)h->oem_id, sizeof h->oem_id, oem_id, ' ');
+    strpadcpy((char *)h->oem_id, sizeof h->oem_id, oem_id, '\0');
      strpadcpy((char *)h->oem_table_id, sizeof h->oem_table_id,
-              oem_table_id, ' ');
+              oem_table_id, '\0');

      h->oem_revision = cpu_to_le32(1);
      memcpy(h->asl_compiler_id, ACPI_BUILD_APPNAME8, 4);

The problem has been solved. Thanks.

Tested-by: Dmitry V. Orekhov dima.orekhov@gmail.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]