From patchwork Thu Dec 7 20:30:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 1873427 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SmQrX1Dchz23nW for ; Fri, 8 Dec 2023 07:30:35 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rBL0s-0001Rk-Um; Thu, 07 Dec 2023 20:30:26 +0000 Received: from mout.gmx.net ([212.227.15.19]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rBL0n-0001RE-Ku for fwts-devel@lists.ubuntu.com; Thu, 07 Dec 2023 20:30:22 +0000 X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MNt0M-1qrcGL0pZI-00OGCK for ; Thu, 07 Dec 2023 21:30:21 +0100 From: Armin Wolf To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] acpi/wmi: Warn if a WMI GUID has zero instances Date: Thu, 7 Dec 2023 21:30:14 +0100 Message-Id: <20231207203014.210751-2-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231207203014.210751-1-W_Armin@gmx.de> References: <20231207203014.210751-1-W_Armin@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:EnhnEO0Se4tRw3ocr/k3c92qG/24OVR4id4Bilt1VN5KaC9X7Pe WBM5ynsUxgqLA9kEaeo43GovihHEk1mITGIEgJr4EVK73eiCTVFTzaCmKXQ8udSKlNQW4Yp vYYk6oBYKSExTaraD0KRM+kxQuaMG9EgvgDilCOC88mwOF5VcJxXKlnjFLn6eIbhvBgMqGR kOJm00pSTcJUJms3JZOnQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3Pdvd51gixg=;6OThu2bqt3Z8LbBRgUCxphh9EOC Kc748S5/uf/ZrH5pud+Y1D+ZSUxd3C7/cxRq6p6lI2V0pd7ykl0ntYjuJ9DUh/6JrcLwVLyDR w41cmJeHj/enDHjSLFIhXws27BKDKFlI9bc8kJ2QujMsggojoCnO4RmCzPzuZOEdQsLE/jq+N Oz2axxiNFNPIxoZyohb1Lr3O+GVy36hULAEPyKv8Csu9vQFal9mgaokXbLrMqjskJpCl0lO/k NpOmx/8KNDo3N8WxMjcAaH7afhIp52ge4YCkjcm9sfE6Mlik4XUAHRHQ4Saedel1HZURLyKkD gXV6If4qZapFcXi03qEtfiRQ0CfF6mlNmIkIL8F0I5i5MqWfMoCidKihDN/r/zKc8RU1g+8Mz CZ11eUgWTuL8h9LrA082k99OXiuyAbEJckFnFWHK57KClGJksRupYsUyVOaWP6eIujm/cpW3+ Z34z99mTXXeaZ8CFeQyJohqMk1SmnRmj8snGIanaGG9gDRLuHDgf9fe/6McDGA5MfJEyU3m61 Hz06GS2Eufv9yPq/DKmGhYV5xROtK7xfjfmUS6PJcyKrUap4zwOzyUOiZtNky54WfH+8uJiQ9 jKpwd4BvyUH6O/6qf95JWSmIG94l3ar94LyMpmRJzP3IAICIhyky+ChzRWq+15MrQdE7HJFM+ ZAZkSaOTU86xon6+LE3DLgfseDCld/TbBGmL0DHEahYqrigtWcgF285qLhzNQlNtM62NNcX0P WkNW37tDtJ2PVqgOFUOrUSA8FSGyB9nwSPAsN37KgpR6e5kmd9JjYUO/obTg99Mwn/KL7azez GWOSPnqb1fg2jgoU0/zfNY2hDf+E9xhVz8g45buEsGroGM9L3FSrlTOoHy0UB9gsAESR1myIM MRdhxo5X7YmTdA91fMdyzVNPR9FDc7r/qhVn/isIcw71NJL2UydrNEkDc7WJQeNPfTmUkzWAx gPNrFfsfGPCR0wfIb8kLx4+5aGY= X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Some machines like the HP Omen 17 ck2000nf contain WMI blocks with zero instances. This WMI blocks should have been removed from the _WDG buffer instead, since otherwise those entries are useless. Warn in such a case so that manufacturers can remove them from the _WDG buffer. Signed-off-by: Armin Wolf Acked-by: Ivan Hu --- fwts-test/wmi-0001/wmi-0001.log | 30 +++++++++++++++++++++++++++++- fwts-test/wmi-0001/wmi-0002.log | 6 +++++- fwts-test/wmi-0001/wmi-0003.log | 14 +++++++++++++- src/acpi/wmi/wmi.c | 6 ++++++ 4 files changed, 53 insertions(+), 3 deletions(-) -- 2.39.2 diff --git a/fwts-test/wmi-0001/wmi-0001.log b/fwts-test/wmi-0001/wmi-0001.log index ecb71184..a7144eeb 100644 --- a/fwts-test/wmi-0001/wmi-0001.log +++ b/fwts-test/wmi-0001/wmi-0001.log @@ -12,6 +12,8 @@ wmi Instance : 0x50 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 51F5230E-9677-46CD-A1CF-C0B23EE34DB7 has wmi associated query method \_SB_.WMI1.WQA0 +wmi PASSED: Test 1, 51F5230E-9677-46CD-A1CF-C0B23EE34DB7 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (2 of 9) wmi GUID: 98479A64-33F5-4E33-A707-8E251EBBC3A1 @@ -22,6 +24,8 @@ wmi Instance : 0x01 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 98479A64-33F5-4E33-A707-8E251EBBC3A1 has wmi associated method \_SB_.WMI1.WMA1 +wmi PASSED: Test 1, 98479A64-33F5-4E33-A707-8E251EBBC3A1 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (3 of 9) wmi GUID: 6A4B54EF-A5ED-4D33-9455-B0D9B48DF4B3 @@ -32,6 +36,8 @@ wmi Instance : 0x01 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 6A4B54EF-A5ED-4D33-9455-B0D9B48DF4B3 has wmi associated method \_SB_.WMI1.WMA2 +wmi PASSED: Test 1, 6A4B54EF-A5ED-4D33-9455-B0D9B48DF4B3 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (4 of 9) wmi GUID: 74F1EBB6-927A-4C7D-95DF-698E21E80EB5 @@ -41,6 +47,8 @@ wmi Object ID : A3 wmi Instance : 0x01 wmi PASSED: Test 1, 74F1EBB6-927A-4C7D-95DF-698E21E80EB5 has wmi associated method \_SB_.WMI1.WMA3 +wmi PASSED: Test 1, 74F1EBB6-927A-4C7D-95DF-698E21E80EB5 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (5 of 9) wmi GUID: 7EEF04FF-4328-447C-B5BB-D449925D538D @@ -50,6 +58,8 @@ wmi Object ID : A4 wmi Instance : 0x01 wmi PASSED: Test 1, 7EEF04FF-4328-447C-B5BB-D449925D538D has wmi associated method \_SB_.WMI1.WMA4 +wmi PASSED: Test 1, 7EEF04FF-4328-447C-B5BB-D449925D538D has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (6 of 9) wmi GUID: 8ADB159E-1E32-455C-BC93-308A7ED98246 @@ -60,6 +70,8 @@ wmi Instance : 0x01 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 8ADB159E-1E32-455C-BC93-308A7ED98246 has wmi associated query method \_SB_.WMI1.WQA5 +wmi PASSED: Test 1, 8ADB159E-1E32-455C-BC93-308A7ED98246 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (7 of 9) wmi GUID: 2651D9FD-911C-4B69-B94E-D0DED5963BD7 @@ -70,6 +82,8 @@ wmi Instance : 0x01 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 2651D9FD-911C-4B69-B94E-D0DED5963BD7 has wmi associated method \_SB_.WMI1.WMA6 +wmi PASSED: Test 1, 2651D9FD-911C-4B69-B94E-D0DED5963BD7 has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (8 of 9) wmi GUID: 7364651A-132F-4FE7-ADAA-40C6C7EE2E3B @@ -80,6 +94,8 @@ wmi Instance : 0x01 wmi Driver : think-lmi (Lenovo) wmi PASSED: Test 1, 7364651A-132F-4FE7-ADAA-40C6C7EE2E3B has wmi associated method \_SB_.WMI1.WMA7 +wmi PASSED: Test 1, 7364651A-132F-4FE7-ADAA-40C6C7EE2E3B has +wmi more than zero instances wmi wmi \_SB_.WMI1._WDG (9 of 9) wmi GUID: 05901221-D566-11D1-B2F0-00A0C9062910 @@ -90,6 +106,8 @@ wmi Instance : 0x01 wmi Driver : wmi-bmof (Generic) wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has wmi associated query method \_SB_.WMI1.WQBA +wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has +wmi more than zero instances wmi wmi \_SB_.WMI2._WDG (1 of 5) wmi GUID: FCB424F1-075A-4E0E-BFC4-62F3E71771FA @@ -99,6 +117,8 @@ wmi Object ID : A7 wmi Instance : 0x01 wmi PASSED: Test 1, FCB424F1-075A-4E0E-BFC4-62F3E71771FA has wmi associated query method \_SB_.WMI2.WQA7 +wmi PASSED: Test 1, FCB424F1-075A-4E0E-BFC4-62F3E71771FA has +wmi more than zero instances wmi wmi \_SB_.WMI2._WDG (2 of 5) wmi GUID: E2BE5EE3-42DA-49DB-8378-1F5247388202 @@ -108,6 +128,8 @@ wmi Object ID : A8 wmi Instance : 0x01 wmi PASSED: Test 1, E2BE5EE3-42DA-49DB-8378-1F5247388202 has wmi associated method \_SB_.WMI2.WMA8 +wmi PASSED: Test 1, E2BE5EE3-42DA-49DB-8378-1F5247388202 has +wmi more than zero instances wmi wmi \_SB_.WMI2._WDG (3 of 5) wmi GUID: 7430019A-DCE9-4548-BAB0-9FDE0935CAFF @@ -117,6 +139,8 @@ wmi Object ID : A9 wmi Instance : 0x0a wmi PASSED: Test 1, 7430019A-DCE9-4548-BAB0-9FDE0935CAFF has wmi associated query method \_SB_.WMI2.WQA9 +wmi PASSED: Test 1, 7430019A-DCE9-4548-BAB0-9FDE0935CAFF has +wmi more than zero instances wmi wmi \_SB_.WMI2._WDG (4 of 5) wmi GUID: 7FF47003-3B6C-4E5E-A227-E979824A85D1 @@ -126,6 +150,8 @@ wmi Object ID : AA wmi Instance : 0x01 wmi PASSED: Test 1, 7FF47003-3B6C-4E5E-A227-E979824A85D1 has wmi associated method \_SB_.WMI2.WMAA +wmi PASSED: Test 1, 7FF47003-3B6C-4E5E-A227-E979824A85D1 has +wmi more than zero instances wmi wmi \_SB_.WMI2._WDG (5 of 5) wmi GUID: 05901221-D566-11D1-B2F0-00A0C9062910 @@ -136,8 +162,10 @@ wmi Instance : 0x01 wmi Driver : wmi-bmof (Generic) wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has wmi associated query method \_SB_.WMI2.WQBB +wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has +wmi more than zero instances wmi wmi ========================================================== -wmi 14 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +wmi 28 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 wmi info only. wmi ========================================================== diff --git a/fwts-test/wmi-0001/wmi-0002.log b/fwts-test/wmi-0001/wmi-0002.log index 5b56b28b..3fcc0144 100644 --- a/fwts-test/wmi-0001/wmi-0002.log +++ b/fwts-test/wmi-0001/wmi-0002.log @@ -12,6 +12,8 @@ wmi Instance : 0x01 wmi Driver : asus-wmi (Asus) wmi PASSED: Test 1, 97845ED0-4E6D-11DE-8A39-0800200C9A66 has wmi associated method \_SB_.ATKD.WMNB +wmi PASSED: Test 1, 97845ED0-4E6D-11DE-8A39-0800200C9A66 has +wmi more than zero instances wmi wmi \_SB_.ATKD._WDG (2 of 2) wmi GUID: 0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C @@ -21,10 +23,12 @@ wmi Notification ID: 0xff wmi Reserved : 0x00 wmi Instance : 0x01 wmi Driver : asus-nb-wmi (Asus) +wmi PASSED: Test 1, 0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C has +wmi more than zero instances wmi PASSED: Test 1, All events associated with \_SB_.ATKD._WDG wmi are handled by a kernel driver. wmi wmi ========================================================== -wmi 2 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +wmi 4 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 wmi info only. wmi ========================================================== diff --git a/fwts-test/wmi-0001/wmi-0003.log b/fwts-test/wmi-0001/wmi-0003.log index c12736d5..4813041d 100644 --- a/fwts-test/wmi-0001/wmi-0003.log +++ b/fwts-test/wmi-0001/wmi-0003.log @@ -12,6 +12,8 @@ wmi Instance : 0x01 wmi Driver : dell-wmi-descriptor (Dell) wmi PASSED: Test 1, 8D9DDCBC-A997-11DA-B012-B622A1EF5492 has wmi associated query method \_SB_.AMW0.WQAA +wmi PASSED: Test 1, 8D9DDCBC-A997-11DA-B012-B622A1EF5492 has +wmi more than zero instances wmi wmi \_SB_.AMW0._WDG (2 of 6) wmi GUID: A80593CE-A997-11DA-B012-B622A1EF5492 @@ -22,6 +24,8 @@ wmi Instance : 0x01 wmi Driver : alienware-wmi (Alienware) wmi PASSED: Test 1, A80593CE-A997-11DA-B012-B622A1EF5492 has wmi associated method \_SB_.AMW0.WMBA +wmi PASSED: Test 1, A80593CE-A997-11DA-B012-B622A1EF5492 has +wmi more than zero instances wmi wmi \_SB_.AMW0._WDG (3 of 6) wmi GUID: DD8C7670-1CB5-11DB-A98B-669A0C200008 @@ -31,6 +35,8 @@ wmi Object ID : BC wmi Instance : 0x01 wmi PASSED: Test 1, DD8C7670-1CB5-11DB-A98B-669A0C200008 has wmi associated method \_SB_.AMW0.WMBC +wmi PASSED: Test 1, DD8C7670-1CB5-11DB-A98B-669A0C200008 has +wmi more than zero instances wmi wmi \_SB_.AMW0._WDG (4 of 6) wmi GUID: 9DBB5994-A997-11DA-B012-B622A1EF5492 @@ -40,6 +46,8 @@ wmi Notification ID: 0xd0 wmi Reserved : 0x00 wmi Instance : 0x01 wmi Driver : dell-wmi-base (Dell) +wmi PASSED: Test 1, 9DBB5994-A997-11DA-B012-B622A1EF5492 has +wmi more than zero instances wmi wmi \_SB_.AMW0._WDG (5 of 6) wmi GUID: A3776CE0-1E88-11DB-A98B-0800200C9A66 @@ -51,6 +59,8 @@ wmi FAILED [LOW] WMIMissingQueryMethod: Test 1, GUID wmi A3776CE0-1E88-11DB-A98B-0800200C9A66 should have an wmi associated query method WQBC defined, however this does wmi not seem to exist. +wmi PASSED: Test 1, A3776CE0-1E88-11DB-A98B-0800200C9A66 has +wmi more than zero instances wmi wmi \_SB_.AMW0._WDG (6 of 6) wmi GUID: 05901221-D566-11D1-B2F0-00A0C9062910 @@ -61,10 +71,12 @@ wmi Instance : 0x01 wmi Driver : wmi-bmof (Generic) wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has wmi associated query method \_SB_.AMW0.WQMO +wmi PASSED: Test 1, 05901221-D566-11D1-B2F0-00A0C9062910 has +wmi more than zero instances wmi PASSED: Test 1, All events associated with \_SB_.AMW0._WDG wmi are handled by a kernel driver. wmi wmi ========================================================== -wmi 5 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 +wmi 11 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 wmi info only. wmi ========================================================== diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c index 8777eb17..097c3873 100644 --- a/src/acpi/wmi/wmi.c +++ b/src/acpi/wmi/wmi.c @@ -461,6 +461,12 @@ static void wmi_parse_wdg_data( wmi_known_driver(fw, known); wmi_block_query_exist_count(fw, info, acpi_object_name, guid_str); } + + if (info->instance == 0) + fwts_failed(fw, LOG_LEVEL_LOW, "WMIZeroInstance", + "GUID %s has zero instances", guid_str); + else + fwts_passed(fw, "%s has more than zero instances", guid_str); } if (events && all_events_known)