[PATCH 1/2][V3] acpi: method: add _LSI test according to ACPI 6.2 (mantis 1721)

Alex Hung alex.hung at canonical.com
Wed Aug 23 08:35:51 UTC 2017


Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/acpi/method/method.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 75aac0a..bbd0c59 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -129,6 +129,9 @@
  * _LCK 	 Y
  * _LID 	 Y
  * _LPI 	 Y
+ * _LSI 	 Y
+ * _LSR 	 N
+ * _LSW 	 N
  * _MAT 	 N
  * _MBM 	 Y
  * _MLS 	 Y
@@ -2648,6 +2651,30 @@ static int method_test_FIT(fwts_framework *fw)
 		"_FIT", NULL, 0, method_test_buffer_return, NULL);
 }
 
+static void method_test_LSI_return(
+	fwts_framework *fw,
+	char *name,
+	ACPI_BUFFER *buf,
+	ACPI_OBJECT *obj,
+	void *private)
+{
+	FWTS_UNUSED(private);
+
+	if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK)
+		return;
+
+	if (method_package_elements_all_type(fw, name, "_LSI", obj, ACPI_TYPE_INTEGER) != FWTS_OK)
+		return;
+
+	method_passed_sane(fw, name, "package");
+}
+
+static int method_test_LSI(fwts_framework *fw)
+{
+	return method_evaluate_method(fw, METHOD_OPTIONAL,
+		"_LSI", NULL, 0, method_test_LSI_return, NULL);
+}
+
 static int method_test_DCK(fwts_framework *fw)
 {
 	int i;
@@ -6984,6 +7011,9 @@ static fwts_framework_minor_test method_tests[] = {
 	/* { method_test_REG, "Test _REG (Region)." }, */
 	{ method_test_SEG, "Test _SEG (Segment)." },
 
+	/* Section 6.5.10 NVDIMM Label Methods */
+	{ method_test_LSI, "Test _LSI (Label Storage Information)." },
+
 	/* Section 7.1 Declaring a Power Resource Object */
 
 	{ method_test_OFF, "Test _OFF (Set resource off)." },
-- 
2.7.4




More information about the fwts-devel mailing list