summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 11:02:59 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-17 11:02:59 +0000
commitdd4047a51c56bae1080b357330ed99dcd286c766 (patch)
treebf0d46a5ac947d2cb6963b99ef22e43cc363b848 /MdeModulePkg
parent90d44b32f45d342e320acccbfaad03996e660848 (diff)
downloadedk2-dd4047a51c56bae1080b357330ed99dcd286c766.zip
edk2-dd4047a51c56bae1080b357330ed99dcd286c766.tar.gz
edk2-dd4047a51c56bae1080b357330ed99dcd286c766.tar.bz2
[Description]:
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c4
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf5
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c4
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h1
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf4
-rw-r--r--MdeModulePkg/MdeModulePkg.dec1
7 files changed, 17 insertions, 4 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 949aa04..0f711e1 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -1580,7 +1580,9 @@ EhcDriverBindingStart (
// Robustnesss improvement such as for UoL
// Default is not required.
//
- // EhcClearLegacySupport (Ehc);
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {
+ EhcClearLegacySupport (Ehc);
+ }
EhcResetHC (Ehc, EHC_RESET_TIMEOUT);
Status = EhcInitHC (Ehc);
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
index 50a3f1c..94e415e 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
@@ -36,7 +36,7 @@ Revision History
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
-
+#include <Library/PcdLib.h>
#include <IndustryStandard/Pci22.h>
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
index 5534bc8..423a042 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
@@ -49,7 +49,10 @@
[Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+[FeaturePcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport
[LibraryClasses]
MemoryAllocationLib
@@ -59,7 +62,7 @@
UefiDriverEntryPoint
BaseMemoryLib
DebugLib
-
+ PcdLib
[Protocols]
gEfiPciIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index 0fc633d..f0aedc7 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -1658,7 +1658,9 @@ UhciDriverBindingStart (
// Robustnesss improvement such as for UoL
// Default is not required.
//
- // UhciTurnOffUsbEmulation (PciIo);
+ if (FeaturePcdGet (PcdUsbLegacySupport)) {
+ UhciTurnOffUsbEmulation (PciIo);
+ }
Status = PciIo->Attributes (
PciIo,
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
index d0aea61..73f9fe2 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
@@ -39,6 +39,7 @@ Revision History
#include <Library/UefiLib.h>
#include <Library/BaseLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/PcdLib.h>
#include <IndustryStandard/Pci22.h>
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
index 4f46bf5..818ff6d 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
@@ -49,7 +49,10 @@
[Packages]
MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+[FeaturePcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport
[LibraryClasses]
MemoryAllocationLib
@@ -59,6 +62,7 @@
UefiDriverEntryPoint
BaseMemoryLib
DebugLib
+ PcdLib
[Protocols]
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 44ab3f9..78f298a 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -128,6 +128,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreImageLoaderSearchTeSectionFirst|TRUE|BOOLEAN|0x00010044
gEfiMdeModulePkgTokenSpaceGuid.PcdSupportHardwareErrorRecord|FALSE|BOOLEAN|0x00010045
gEfiMdeModulePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00010046
+ gEfiMdeModulePkgTokenSpaceGuid.PcdUsbLegacySupport|FALSE|BOOLEAN|0x00010047
[PcdsFixedAtBuild.common]
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPcdCallBackNumberPerPcdEntry|0x08|UINT32|0x0001000f