From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E88E3740053 for ; Mon, 22 Jan 2024 09:53:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lQWktBAe2Yceigw4TrRtWQQJ1O9EJAXy/tB6rYpa+yk=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1705917181; v=1; b=PkiOf1FtuEfF3HizLnEm0dNM1uC6UGdS7rdySfa0RGtB/BgTLtZzVnZKkbnGKf1tTLt6dier PcPVjaIGC/Jo4gRQLkTap0/Gsxlu86d+r++WTYZ7SPISE6GgQ/WX1ytn1sl3ZSc6UCpMi0wnSXE Wf1wfegZEE2Bjpeus6MQVy/E= X-Received: by 127.0.0.2 with SMTP id Us6ZYY7687511xRljPjhBpPv; Mon, 22 Jan 2024 01:53:01 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web10.69970.1705917179856456592 for ; Mon, 22 Jan 2024 01:53:01 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="465424615" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="465424615" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:52:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="735094026" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="735094026" X-Received: from zjin7-devs.sh.intel.com ([10.239.154.113]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 01:52:59 -0800 From: "Zhi Jin" To: devel@edk2.groups.io Cc: Zhi Jin , Liming Gao , Ray Ni , Michael D Kinney Subject: [edk2-devel] [PATCH v2 2/2] MdeModulePkg: Optimize CoreConnectSingleController Date: Mon, 22 Jan 2024 17:53:23 +0800 Message-Id: <20240122095323.1824627-2-zhi.jin@intel.com> In-Reply-To: <20240122095323.1824627-1-zhi.jin@intel.com> References: <20240122095323.1824627-1-zhi.jin@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: 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,zhi.jin@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 36jMdPiEwfxs1ZSr5Mo3rxBAx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PkiOf1Ft; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io CoreConnectSingleController() searches for the Driver Family Override Protocol drivers by looping and checking each Driver Binding Handles. This loop can be skipped by checking if any Driver Family Override Protocol installed in the platform first, to improve the performance. Cc: Liming Gao Cc: Ray Ni Reviewed-by: Michael D Kinney Signed-off-by: Zhi Jin --- MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index 0b824c62b7..64d7474f15 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -497,7 +497,12 @@ CoreConnectSingleController ( // // Add the Driver Family Override Protocol drivers for ControllerHandle // - while (TRUE) { + Status = CoreLocateProtocol ( + &gEfiDriverFamilyOverrideProtocolGuid, + NULL, + (VOID **)&DriverFamilyOverride + ); + while (!EFI_ERROR (Status) && (DriverFamilyOverride != NULL)) { HighestIndex = DriverBindingHandleCount; HighestVersion = 0; for (Index = 0; Index < DriverBindingHandleCount; Index++) { -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114138): https://edk2.groups.io/g/devel/message/114138 Mute This Topic: https://groups.io/mt/103883258/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-