From f3595ddf16d7b8ae8db366bf5bd0402e59b3a347 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Wed, 26 Feb 2020 10:29:04 -0700 Subject: [PATCH] Add corrections to nsutils.c to allow for big-endian support Signed-off-by: Al Stone --- acpica-tools.spec | 5 ++++- big-endian-v3.patch | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 big-endian-v3.patch diff --git a/acpica-tools.spec b/acpica-tools.spec index 1d33f70..02c365a 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -51,6 +51,7 @@ Patch23: no-common.patch Patch24: armv7-str-fixes.patch Patch25: dbtest.patch Patch26: pcc.patch +Patch27: big-endian-v3.patch BuildRequires: bison patchutils flex gcc @@ -129,6 +130,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f - %patch24 -p1 -b .armv7-str-fixes %patch25 -p1 -b .dbtest %patch26 -p1 -b .pcc +%patch27 -p1 -b .big-endian-v3 cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE3} iasl.1 @@ -245,7 +247,7 @@ fi %changelog -* Tue Feb 25 2020 Al Stone - 20200214-1 +* Wed Feb 26 2020 Al Stone - 20200214-1 - Update to 20200214 source tree, including patch refreshes - Add patch to fix up issues where strings and 4-byte quantities get interchanged; C strings want to be null terminated now, but @@ -254,6 +256,7 @@ fi string on the stack behaves a little differently - "PCC" is a defined Register() type, but "PlatformCommChannel" was being used instead; put it back to "PCC" as it should be in pcc.patch +- Add another big-endian patch to compensate for changes to nsutils.c * Mon Feb 24 2020 Al Stone - 20200110-1 - Update to 20200110 source tree, including patch refreshes diff --git a/big-endian-v3.patch b/big-endian-v3.patch new file mode 100644 index 0000000..11fab3f --- /dev/null +++ b/big-endian-v3.patch @@ -0,0 +1,19 @@ +diff -Naur acpica-unix2-20200214.orig/source/components/namespace/nsutils.c acpica-unix2-20200214/source/components/namespace/nsutils.c +--- acpica-unix2-20200214.orig/source/components/namespace/nsutils.c 2020-02-14 10:33:55.000000000 -0700 ++++ acpica-unix2-20200214/source/components/namespace/nsutils.c 2020-02-26 10:25:43.477022167 -0700 +@@ -363,6 +363,15 @@ + + /* Move on the next segment */ + ++ { ++ /* Make sure the name segment reflects endian-ness first */ ++ ++ UINT32 Tmp32 = 0; ++ ++ memcpy(&Tmp32, Result, ACPI_NAMESEG_SIZE); ++ ACPI_MOVE_32_TO_32(Result, &Tmp32); ++ } ++ + ExternalName++; + Result += ACPI_NAMESEG_SIZE; + }