MdeModulePkg XhciPei: Minor refinement about IoMmu

1. Call IoMmuInit() after locating gPeiUsbControllerPpiGuid.
2. Call XhcPeiFreeSched() to do cleanup in XhcEndOfPei.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2017-11-16 18:44:07 +08:00
parent 2c656af04d
commit 0aa1794118
1 changed files with 4 additions and 2 deletions

View File

@ -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 (