2020-10-29 20:13:33 +00:00
|
|
|
From e942e785b3ec47693029e3841075becba31f2635 Mon Sep 17 00:00:00 2001
|
2020-10-28 21:27:56 +00:00
|
|
|
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
|
|
|
|
|
2020-10-29 20:13:33 +00:00
|
|
|
Just odds and ends of some resource types and ASL analysis
|
|
|
|
|
2020-10-28 21:27:56 +00:00
|
|
|
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
|
---
|
2020-10-29 20:13:33 +00:00
|
|
|
source/compiler/aslanalyze.c | 4 ++--
|
|
|
|
source/compiler/aslrestype1.c | 16 ++++++++--------
|
|
|
|
source/compiler/aslrestype1i.c | 2 +-
|
|
|
|
3 files changed, 11 insertions(+), 11 deletions(-)
|
2020-10-28 21:27:56 +00:00
|
|
|
|
2020-10-29 20:13:33 +00:00
|
|
|
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 (
|
2020-10-28 21:27:56 +00:00
|
|
|
|
|
|
|
/* 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;
|
|
|
|
|
|
|
|
/*
|
2020-10-29 20:13:33 +00:00
|
|
|
@@ -604,7 +604,7 @@ ApCheckForGpeNameConflict (
|
2020-10-28 21:27:56 +00:00
|
|
|
* 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") */
|
|
|
|
|
2020-10-29 20:13:33 +00:00
|
|
|
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 (
|
2020-10-28 21:27:56 +00:00
|
|
|
/* 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,
|
2020-10-29 20:13:33 +00:00
|
|
|
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Minimum),
|
|
|
|
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Maximum),
|
|
|
|
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.AddressLength),
|
|
|
|
+ (UINT32) AcpiUtReadUint16(&Descriptor->Memory24.Alignment),
|
2020-10-28 21:27:56 +00:00
|
|
|
MinOp, MaxOp, LengthOp, NULL, Info->DescriptorTypeOp);
|
|
|
|
|
|
|
|
return (Rnode);
|
2020-10-29 20:13:33 +00:00
|
|
|
@@ -442,10 +442,10 @@ RsDoMemory32Descriptor (
|
2020-10-28 21:27:56 +00:00
|
|
|
/* 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);
|
2020-10-29 20:13:33 +00:00
|
|
|
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
|
|
|
|
|