Missed a couple of minor endianness corrections

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2020-10-29 14:13:33 -06:00
parent 7ae04aaa72
commit defe2b6433

View File

@ -1,19 +1,22 @@
From 71357f9d65334b1667a87a940a3ac06049c9aedb Mon Sep 17 00:00:00 2001
From e942e785b3ec47693029e3841075becba31f2635 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
Just odds and ends of some resource types and ASL analysis
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(-)
source/compiler/aslrestype1i.c | 2 +-
3 files changed, 11 insertions(+), 11 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 (
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 63feba2b1..f76a8c3cd 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -577,7 +577,7 @@ ApCheckForGpeNameConflict (
/* Need a null-terminated string version of NameSeg */
@ -22,7 +25,7 @@ Index: acpica-unix2-20200925/source/compiler/aslanalyze.c
Name[ACPI_NAMESEG_SIZE] = 0;
/*
@@ -496,7 +496,7 @@ ApCheckForGpeNameConflict (
@@ -604,7 +604,7 @@ ApCheckForGpeNameConflict (
* We are now sure we have an _Lxx or _Exx.
* Create the target name that would cause collision (Flip E/L)
*/
@ -31,11 +34,11 @@ Index: acpica-unix2-20200925/source/compiler/aslanalyze.c
/* 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 (
diff --git a/source/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
index e7639c0bb..fd4428aab 100644
--- a/source/compiler/aslrestype1.c
+++ b/source/compiler/aslrestype1.c
@@ -328,10 +328,10 @@ RsDoMemory24Descriptor (
/* Validate the Min/Max/Len/Align values (Alignment==0 means 64K) */
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY24,
@ -43,14 +46,14 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c
- 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),
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Minimum),
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Maximum),
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.AddressLength),
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Alignment),
MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
return (Rnode);
@@ -334,10 +334,10 @@ RsDoMemory32Descriptor (
@@ -442,10 +442,10 @@ RsDoMemory32Descriptor (
/* Validate the Min/Max/Len/Align values */
RsSmallAddressCheck (ACPI_RESOURCE_NAME_MEMORY32,
@ -65,3 +68,19 @@ Index: acpica-unix2-20200925/source/compiler/aslrestype1.c
MinOp, MaxOp, LengthOp, AlignOp, Info->DescriptorTypeOp);
return (Rnode);
diff --git a/source/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
index 532553c4b..d41e3a1e8 100644
--- a/source/compiler/aslrestype1i.c
+++ b/source/compiler/aslrestype1i.c
@@ -436,7 +436,7 @@ RsDoFixedIoDescriptor (
/* Error checks */
- if (Descriptor->FixedIo.Address > 0x03FF)
+ if (AcpiUtReadUint16(&Descriptor->FixedIo.Address) > 0x03FF)
{
AslError (ASL_WARNING, ASL_MSG_ISA_ADDRESS, AddressOp, NULL);
}
--
2.26.2