[PATCH 3/4] acpi: method: update _PSD and _TSD tests according to ACPI 6.1 errata
Alex Hung
alex.hung at canonical.com
Fri Jun 16 04:41:52 UTC 2017
Spec updates (mantis 1642) limit _PSD and _TSD to have a package only.
This is also how most OS implements _PSD and _TSD.
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/method/method.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index b957f79..dddb20f 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -3757,6 +3757,9 @@ static void method_test_PSD_return(
if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
return;
+ if (method_package_count_equal(fw, name, "_PSD", obj, 1) != FWTS_OK)
+ return;
+
if (method_package_elements_all_type(fw, name, "_PSD", obj, ACPI_TYPE_PACKAGE) != FWTS_OK)
return;
@@ -3894,8 +3897,7 @@ static void method_test_TSD_return(
if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
return;
- /* Something is really wrong if we don't have any elements in _TSD */
- if (method_package_count_min(fw, name, "_TSD", obj, 1) != FWTS_OK)
+ if (method_package_count_equal(fw, name, "_TSD", obj, 1) != FWTS_OK)
return;
/* Could be one or more packages */
--
2.7.4
More information about the fwts-devel
mailing list