From d8f8cb70af41ef36999f4fcfd898021dfe8f885b Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Thu, 16 Nov 2017 18:44:07 +0800 Subject: [PATCH] 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 (cherry picked from commit 0aa179411872d1f3340107e91b3a590dccd44f88) --- 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 aebbbf2817..03ce084958 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 (