From: Star Zeng Date: Thu, 16 Nov 2017 10:44:07 +0000 (+0800) Subject: MdeModulePkg XhciPei: Minor refinement about IoMmu X-Git-Tag: edk2-stable201903~3078 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=0aa179411872d1f3340107e91b3a590dccd44f88;p=mirror_edk2.git MdeModulePkg XhciPei: Minor refinement about IoMmu 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 Reviewed-by: Jiewen Yao --- diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c b/MdeModulePkg/Bus/Pci/XhciPei/XhcPeim.c index 99f69f730b..c5631e87ca 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 (