Add corrections to nsutils.c to allow for big-endian support

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2020-02-26 10:29:04 -07:00
parent a359383058
commit f3595ddf16
2 changed files with 23 additions and 1 deletions

View File

@ -51,6 +51,7 @@ Patch23: no-common.patch
Patch24: armv7-str-fixes.patch Patch24: armv7-str-fixes.patch
Patch25: dbtest.patch Patch25: dbtest.patch
Patch26: pcc.patch Patch26: pcc.patch
Patch27: big-endian-v3.patch
BuildRequires: bison patchutils flex gcc BuildRequires: bison patchutils flex gcc
@ -129,6 +130,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
%patch24 -p1 -b .armv7-str-fixes %patch24 -p1 -b .armv7-str-fixes
%patch25 -p1 -b .dbtest %patch25 -p1 -b .dbtest
%patch26 -p1 -b .pcc %patch26 -p1 -b .pcc
%patch27 -p1 -b .big-endian-v3
cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE2} README.Fedora
cp -p %{SOURCE3} iasl.1 cp -p %{SOURCE3} iasl.1
@ -245,7 +247,7 @@ fi
%changelog %changelog
* Tue Feb 25 2020 Al Stone <ahs3@redhat.com> - 20200214-1 * Wed Feb 26 2020 Al Stone <ahs3@redhat.com> - 20200214-1
- Update to 20200214 source tree, including patch refreshes - Update to 20200214 source tree, including patch refreshes
- Add patch to fix up issues where strings and 4-byte quantities - Add patch to fix up issues where strings and 4-byte quantities
get interchanged; C strings want to be null terminated now, but get interchanged; C strings want to be null terminated now, but
@ -254,6 +256,7 @@ fi
string on the stack behaves a little differently string on the stack behaves a little differently
- "PCC" is a defined Register() type, but "PlatformCommChannel" was - "PCC" is a defined Register() type, but "PlatformCommChannel" was
being used instead; put it back to "PCC" as it should be in pcc.patch 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 <ahs3@redhat.com> - 20200110-1 * Mon Feb 24 2020 Al Stone <ahs3@redhat.com> - 20200110-1
- Update to 20200110 source tree, including patch refreshes - Update to 20200110 source tree, including patch refreshes

19
big-endian-v3.patch Normal file
View File

@ -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;
}