From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6C8282035A7C8 for ; Thu, 16 Nov 2017 18:28:13 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2017 18:32:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,406,1505804400"; d="scan'208";a="174495197" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 16 Nov 2017 18:32:23 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 16 Nov 2017 18:32:22 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 16 Nov 2017 18:32:22 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Fri, 17 Nov 2017 10:32:20 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg XhciPei: Minor refinement about IoMmu Thread-Index: AQHTXsgDqyLCoNihd0ai8tph1x3s7KMX2vrg Date: Fri, 17 Nov 2017 02:32:20 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AA21059@shsmsx102.ccr.corp.intel.com> References: <1510829112-93900-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1510829112-93900-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDRjMjE2ZDItZTEwYS00MjM1LWFlZDYtZGIzZWEyNGZmMDY1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJiQk1BYkljS1JhTDdWMW1YajEraXN2OXAxTU9wNUI3eXUyZ2dXSmFVK1pid3h6NENKdDZYRW1UTTJpRmhJWnBsIn0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Fri, 17 Nov 2017 02:28:13 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Thursday, November 16, 2017 6:45 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > Subject: [PATCH] MdeModulePkg XhciPei: Minor refinement about IoMmu >=20 > 1. Call IoMmuInit() after locating gPeiUsbControllerPpiGuid. > 2. Call XhcPeiFreeSched() to do cleanup in XhcEndOfPei. >=20 > 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(-) >=20 > 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 ( >=20 > XhcPeiHaltHC (Xhc, XHC_GENERIC_TIMEOUT); >=20 > + XhcPeiFreeSched (Xhc); > + > return EFI_SUCCESS; > } >=20 > @@ -1461,8 +1463,6 @@ XhcPeimEntry ( > return EFI_SUCCESS; > } >=20 > - IoMmuInit (); > - > Status =3D PeiServicesLocatePpi ( > &gPeiUsbControllerPpiGuid, > 0, > @@ -1473,6 +1473,8 @@ XhcPeimEntry ( > return EFI_UNSUPPORTED; > } >=20 > + IoMmuInit (); > + > Index =3D 0; > while (TRUE) { > Status =3D UsbControllerPpi->GetUsbController ( > -- > 2.7.0.windows.1