Fixed two more obscure endian problems

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2020-10-28 15:27:56 -06:00
parent c6ecf612fe
commit 41d9121d77
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,67 @@
From 71357f9d65334b1667a87a940a3ac06049c9aedb Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Wed, 28 Oct 2020 12:53:34 -0600
Subject: [PATCH] Correct a couple of endianness issues previously unseen
Signed-off-by: Al Stone <ahs3@redhat.com>
---
source/compiler/aslanalyze.c | 4 ++--
source/compiler/aslrestype1.c | 16 ++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
Index: acpica-unix2-20200925/source/compiler/aslanalyze.c
===================================================================
--- acpica-unix2-20200925.orig/source/compiler/aslanalyze.c
+++ acpica-unix2-20200925/source/compiler/aslanalyze.c
@@ -469,7 +469,7 @@ ApCheckForGpeNameConflict (
/* Need a null-terminated string version of NameSeg */
- ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
+ ACPI_COPY_NAMESEG (Name, Op->Asl.NameSeg);
Name[ACPI_NAMESEG_SIZE] = 0;
/*
@@ -496,7 +496,7 @@ ApCheckForGpeNameConflict (
* We are now sure we have an _Lxx or _Exx.
* Create the target name that would cause collision (Flip E/L)
*/
- ACPI_MOVE_32_TO_32 (Target, Name);
+ ACPI_COPY_NAMESEG (Target, Name);
/* Inject opposite letter ("L" versus "E") */
Index: acpica-unix2-20200925/source/compiler/aslrestype1.c
===================================================================
--- acpica-unix2-20200925.orig/source/compiler/aslrestype1.c
+++ acpica-unix2-20200925/source/compiler/aslrestype1.c
@@ -220,10 +220,10 @@ RsDoMemory24Descriptor (
/* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
- Descriptor->Memory24.Minimum,
- Descriptor->Memory24.Maximum,
- Descriptor->Memory24.AddressLength,
- Descriptor->Memory24.Alignment,
+ AcpiUtReadUint32(&Descriptor->Memory24.Minimum),
+ AcpiUtReadUint32(&Descriptor->Memory24.Maximum),
+ AcpiUtReadUint32(&Descriptor->Memory24.AddressLength),
+ AcpiUtReadUint32(&Descriptor->Memory24.Alignment),
MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
return (Rnode);
@@ -334,10 +334,10 @@ RsDoMemory32Descriptor (
/* Validate the Min/Max/Len/Align values */
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
- Descriptor->Memory32.Minimum,
- Descriptor->Memory32.Maximum,
- Descriptor->Memory32.AddressLength,
- Descriptor->Memory32.Alignment,
+ AcpiUtReadUint32(&Descriptor->Memory32.Minimum),
+ AcpiUtReadUint32(&Descriptor->Memory32.Maximum),
+ AcpiUtReadUint32(&Descriptor->Memory32.AddressLength),
+ AcpiUtReadUint32(&Descriptor->Memory32.Alignment),
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
return (Rnode);

View File

@ -68,6 +68,7 @@ Patch40: 0041-Support-MTMR-in-a-big-endian-world.patch
Patch41: 0042-Support-VRTC-in-a-big-endian-world.patch
Patch42: 0043-Support-S3PT-in-a-big-endian-world.patch
Patch43: 0044-Correct-an-endian-ness-problem-when-converting-ASL-t.patch
Patch44: 0045-Correct-a-couple-of-endianness-issues-previously-uns.patch
# other miscellaneous patches
Patch100: unaligned.patch
@ -180,6 +181,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
# apply the remaining patches
%patch100 -p1