acpica-tools/0045-Correct-a-couple-of-endianness-issues-previously-uns.patch

68 lines
2.7 KiB
Diff
Raw Normal View History

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);