1b78585135
As s390x was the only one remaining, it has now been excluded. This was best done with an update of the source tree to match upstream. This is turn caused additional patch updates. With s390x gone, all of the big-endian patches can be removed, simplifying things enormously. This is the biggest change. Several other patches that are no longer needed due to changes in Fedora builds (ld flags, for example), or that are no longer needed (such as armv7) have also been removed. Added three new patches to fix problems with dumping various tables, and removed all the remaining patches that no longer serve a purpose. Thanks to the contributors for PR#4 and PR#5 for the suggestions. These have all been incorporated even if they are not in exactly the same form. Signed-off-by: Al Stone <ahs3@ahs3.net> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 1fb473e41bcbfbe21c02bcb30983b87aa94a6cb8 Mon Sep 17 00:00:00 2001
|
|
From: Al Stone <ahs3@ahs3.net>
|
|
Date: Tue, 13 Aug 2024 09:50:37 -0600
|
|
Subject: [PATCH] PHAT FW health table can be zero-length
|
|
|
|
When calculating the VendorLength of the PHAT FW health data subtable,
|
|
the result becomes a negative integer. However, since UINT32 is being
|
|
used, it looks like a huge positive integer instead. Conditionalize
|
|
the length calculation to handle this case properly.
|
|
|
|
This was discovered by using the command: iasl -T phat
|
|
|
|
Signed-off-by: Al Stone <ahs3@ahs3.net>
|
|
---
|
|
source/common/dmtbdump2.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c
|
|
index 32b76b382..dd4d4878e 100644
|
|
--- a/source/common/dmtbdump2.c
|
|
+++ b/source/common/dmtbdump2.c
|
|
@@ -2432,8 +2432,10 @@ AcpiDmDumpPhat (
|
|
|
|
/* Get Device-Specific Data - length of which is the remaining subtable length. */
|
|
|
|
- VendorLength =
|
|
- Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength;
|
|
+ VendorLength = 0;
|
|
+ if (Subtable->Length > sizeof (ACPI_PHAT_HEALTH_DATA) + PathLength)
|
|
+ VendorLength =
|
|
+ Subtable->Length - sizeof (ACPI_PHAT_HEALTH_DATA) - PathLength;
|
|
DbgPrint (ASL_DEBUG_OUTPUT, "%u, Subtable->Length %X, VendorLength %X, Offset %X PathLength: %X\n",
|
|
__LINE__, Subtable->Length, VendorLength, Offset, PathLength);
|
|
|
|
--
|
|
2.45.2
|
|
|