From nobody Fri May 17 01:01:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57075+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57075+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1586366938; cv=none; d=zohomail.com; s=zohoarc; b=jze3BAWxxNsYpZDyrHBo9xbV/thiQ1yibIXe7Zl/nh7yAIULSG5FJx7SS8t30RhT6SSNKnDLHcFju8dZY9d4c4+8uJAF6k/5qfETUjRp+2+R0rgHU6SLDEqxxCPCJzCAYjOA/J4iL0XfTKQcvoFzg4dWcVP2nRMhJ/ar6JXLABQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586366938; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=F42g/SQk5g/7BYXfsYIVdy1oel+EZ8JRP7UYCXCo/1g=; b=CPyK4ZA/u2f4FEuu+aQhl74YA4BLabmpCOn9eg34mW20TZZqJG+Ws3mkxbgz59Npt66xM8LOk1FYpvrH0wEKu09I9DLxzFBWmvu6ijPSZw7/VkR8JYEtQ06xG7v7L8F1Oo0XlvX0BmWdb65NnsNY+yoSnk5XCqDCRsEsrNPDjaw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57075+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586366938789361.0268166351336; Wed, 8 Apr 2020 10:28:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id PoznYY1788612xcIUM4HzRj1; Wed, 08 Apr 2020 10:28:58 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.16924.1586366937670638870 for ; Wed, 08 Apr 2020 10:28:57 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 10B1D31B; Wed, 8 Apr 2020 10:28:52 -0700 (PDT) X-Received: from cam-smtp0.cambridge.arm.com (unknown [10.37.8.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A90E63F52E; Wed, 8 Apr 2020 10:28:49 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Zhichao Gao , Ray Ni , Jian J Wang , Hao A Wu , Dandan Bi Subject: [edk2-devel] [PATCH] MdeModulePkg/DeviceManagerUiLib: connect all before creating menu page Date: Wed, 8 Apr 2020 19:28:07 +0200 Message-Id: <20200408172807.10108-1-ard.biesheuvel@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@arm.com X-Gm-Message-State: GIp4BoJYWXEAP2xI1zOXBtngx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586366938; bh=XS18Z+qhfqGcmySk8irYt7GlgvIhs92cuKyrpG6F/e4=; h=Cc:Date:From:Reply-To:Subject:To; b=mmwssUrHmehqN5OTYcpSfSSSPPcC1ecOcfkA1HunIE9+jNDP3WF0WXKV1ul4zymkRit Qebh14UDRm/nFazjs7SygR9J+rYIhwgbs9vYjzwRK2R2NluWTvXkwxEiGt42bSy5PbuXv 7Rn1vPFFYDNXmwndUqPW7410PfCHSAR7zkc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The device manager UI library creates a UiApp submenu that contains a list of network devices in the system. The logic that creates this menu assumes that all handles have been connected to their drivers, but this is not guaranteed in the general case. So work around this by doing an explicit ConnectAll() before populating the pages. Cc: Zhichao Gao Cc: Ray Ni Cc: Jian J Wang Cc: Hao A Wu Cc: Dandan Bi Signed-off-by: Ard Biesheuvel Reviewed-by: Dandan Bi for this patch. --- MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 7 +++++++ MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.h | 1 + MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf | 1 + 3 files changed, 9 insertions(+) diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c b/MdeM= odulePkg/Library/DeviceManagerUiLib/DeviceManager.c index 0540e6fa8a44..3bc13d340775 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c @@ -892,6 +892,13 @@ DeviceManagerUiLibConstructor ( ); ASSERT (gDeviceManagerPrivate.HiiHandle !=3D NULL); =20 + // + // The device manager form contains a page listing all the network + // controllers in the system. This list can only be populated if all + // handles have been connected, so do it here. + // + EfiBootManagerConnectAll (); + // // Update boot manager page // diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.h b/MdeM= odulePkg/Library/DeviceManagerUiLib/DeviceManager.h index 22fe12d2a5e8..c53c2a1a0e1a 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.h +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.h @@ -23,6 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include =20 // diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf= b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf index cb01b3b85180..d7f833d8b23a 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf @@ -40,6 +40,7 @@ [LibraryClasses] DebugLib PrintLib HiiLib + UefiBootManagerLib UefiHiiServicesLib =20 [Guids] --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57075): https://edk2.groups.io/g/devel/message/57075 Mute This Topic: https://groups.io/mt/72879609/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-