From 0aa179411872d1f3340107e91b3a590dccd44f88 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 --- 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 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 ( -- 2.39.2