From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 5B3B32035A7BA for ; Thu, 16 Nov 2017 08:36:12 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2017 02:45:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,402,1505804400"; d="scan'208";a="2467510" Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.31]) by FMSMGA003.fm.intel.com with ESMTP; 16 Nov 2017 02:45:14 -0800 From: Star Zeng To: edk2-devel@lists.01.org Cc: Star Zeng , Jiewen Yao Date: Thu, 16 Nov 2017 18:45:12 +0800 Message-Id: <1510829112-93900-1-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [PATCH] MdeModulePkg XhciPei: Minor refinement about IoMmu X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2017 16:36:14 -0000 1. Call IoMmuInit() after locating gPeiUsbControllerPpiGuid. 2. Call XhcPeiFreeSched() to do cleanup in XhcEndOfPei. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c index 99f69f730b3f..c5631e87cacc 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c @@ -1427,6 +1427,8 @@ XhcEndOfPei ( XhcPeiHaltHC (Xhc, XHC_GENERIC_TIMEOUT); + XhcPeiFreeSched (Xhc); + return EFI_SUCCESS; } @@ -1461,8 +1463,6 @@ XhcPeimEntry ( return EFI_SUCCESS; } - IoMmuInit (); - Status = PeiServicesLocatePpi ( &gPeiUsbControllerPpiGuid, 0, @@ -1473,6 +1473,8 @@ XhcPeimEntry ( return EFI_UNSUPPORTED; } + IoMmuInit (); + Index = 0; while (TRUE) { Status = UsbControllerPpi->GetUsbController ( -- 2.7.0.windows.1