Vlv2TbltDevicePkg/PlatformInitPei: Support USB init
In order to support recovery in PEI phase, a platform need initialize USB controller. This logic is missing in current PchInitPeim. We removed MultiPlatformInfoInit() because it is already done in PlatformEarlyInitEntry(). We also initialize XhciMemBaseAddr to 0, or it is garbage value. Cc: David Wei <david.wei@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: David Wei <david.wei@intel.com>
This commit is contained in:
@@ -53,6 +53,11 @@ PchInitInterrupt (
|
||||
|
||||
VOID
|
||||
PchPolicySetupInit (
|
||||
IN CONST EFI_PEI_SERVICES **PeiServices,
|
||||
IN SYSTEM_CONFIGURATION *SystemConfiguration
|
||||
);
|
||||
|
||||
VOID
|
||||
PchInitInterrupt (
|
||||
IN SYSTEM_CONFIGURATION *SystemConfiguration
|
||||
);
|
||||
@@ -541,8 +546,18 @@ PlatformPchInit (
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
EFI_STATUS
|
||||
PlatformPchInit (
|
||||
IN SYSTEM_CONFIGURATION *SystemConfiguration,
|
||||
IN CONST EFI_PEI_SERVICES **PeiServices,
|
||||
IN UINT16 PlatformType
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
|
||||
Status = PeiServicesGetBootMode (&BootMode);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
@@ -721,7 +736,8 @@ InstallPeiPchUsbPolicy (
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
InstallPeiPchUsbPolicy (
|
||||
InstallPeiPchUsbPolicy (
|
||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
@@ -745,12 +761,6 @@ InstallPeiPchUsbPolicy (
|
||||
|
||||
Status = (*PeiServices)->AllocatePool (PeiServices, sizeof (PCH_USB_CONFIG), (void **)&UsbConfig);
|
||||
|
||||
|
||||
//
|
||||
// Initiate PCH USB policy.
|
||||
//
|
||||
PeiPchUsbPolicyPpi->Revision = PCH_USB_POLICY_PPI_REVISION_1;
|
||||
UsbConfig->Usb20Settings[0].Enable = PCH_DEVICE_ENABLE;
|
||||
|
||||
//
|
||||
// Initiate PCH USB policy.
|
||||
@@ -784,6 +794,8 @@ InstallPeiPchUsbPolicy (
|
||||
//
|
||||
UsbConfig->Usb20PortLength[0] = 0x53;
|
||||
UsbConfig->Usb20PortLength[1] = 0x49;
|
||||
UsbConfig->Usb20PortLength[2] = 0x47;
|
||||
UsbConfig->Usb20PortLength[3] = 0x80;
|
||||
|
||||
PeiPchUsbPolicyPpi->Mode = EHCI_MODE;
|
||||
|
||||
|
Reference in New Issue
Block a user