Add a feature flag in Uhci & Ehci to disable legacy USB SMI.
[Impaction]:
Platform integrator can choose to legacy USB SMI or not.
[Reference Info]
EDK Tracker 1082
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5081
6f19259b-4bc3-4df7-8a09-
765794883524
// Robustnesss improvement such as for UoL\r
// Default is not required.\r
//\r
- // EhcClearLegacySupport (Ehc);\r
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {\r
+ EhcClearLegacySupport (Ehc);\r
+ }\r
EhcResetHC (Ehc, EHC_RESET_TIMEOUT);\r
\r
Status = EhcInitHC (Ehc);\r
#include <Library/UefiLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
-\r
+#include <Library/PcdLib.h>\r
\r
#include <IndustryStandard/Pci22.h>\r
\r
\r
[Packages]\r
MdePkg/MdePkg.dec\r
+ MdeModulePkg/MdeModulePkg.dec\r
\r
+[FeaturePcd]\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport\r
\r
[LibraryClasses]\r
MemoryAllocationLib\r
UefiDriverEntryPoint\r
BaseMemoryLib\r
DebugLib\r
-\r
+ PcdLib\r
\r
[Protocols]\r
gEfiPciIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
// Robustnesss improvement such as for UoL\r
// Default is not required.\r
//\r
- // UhciTurnOffUsbEmulation (PciIo);\r
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {\r
+ UhciTurnOffUsbEmulation (PciIo);\r
+ }\r
\r
Status = PciIo->Attributes (\r
PciIo,\r
#include <Library/UefiLib.h>\r
#include <Library/BaseLib.h>\r
#include <Library/MemoryAllocationLib.h>\r
+#include <Library/PcdLib.h>\r
\r
#include <IndustryStandard/Pci22.h>\r
\r
\r
[Packages]\r
MdePkg/MdePkg.dec\r
+ MdeModulePkg/MdeModulePkg.dec\r
\r
+[FeaturePcd]\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport\r
\r
[LibraryClasses]\r
MemoryAllocationLib\r
UefiDriverEntryPoint\r
BaseMemoryLib\r
DebugLib\r
+ PcdLib\r
\r
\r
[Protocols]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044\r
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010045\r
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00010046\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport|FALSE|BOOLEAN|0x00010047\r
\r
[PcdsFixedAtBuild.common]\r
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f\r