summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Bus
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-19 08:06:15 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-19 08:06:15 +0000
commit61fb1657e5b2b37a2ec5c879f6fa7689100f0d54 (patch)
treead1debff869454be6fdf84bc7528597931b57dcc /EdkModulePkg/Bus
parent8b018de64f54b67f437c95bf0ed591b03a6cc63b (diff)
downloadedk2-61fb1657e5b2b37a2ec5c879f6fa7689100f0d54.zip
edk2-61fb1657e5b2b37a2ec5c879f6fa7689100f0d54.tar.gz
edk2-61fb1657e5b2b37a2ec5c879f6fa7689100f0d54.tar.bz2
Fix component name bugs when input Controller Name is invalid
Fix the driver binding version for platform/OEM specific drivers git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2274 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus')
-rw-r--r--EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c2
-rw-r--r--EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430.c2
-rw-r--r--EdkModulePkg/Bus/Pci/Ehci/Dxe/ComponentName.c11
-rw-r--r--EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c2
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/ComponentName.c24
-rw-r--r--EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c2
-rw-r--r--EdkModulePkg/Bus/Pci/PciBus/Dxe/pcibus.c2
-rw-r--r--EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c11
-rw-r--r--EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c2
-rw-r--r--EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c2
-rw-r--r--EdkModulePkg/Bus/Scsi/ScsiBus/Dxe/ScsiBus.c2
-rw-r--r--EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ComponentName.c11
-rw-r--r--EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c12
-rw-r--r--EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c12
-rw-r--r--EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c2
-rw-r--r--EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c2
22 files changed, 86 insertions, 27 deletions
diff --git a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
index 8eac997..f11158b 100644
--- a/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
+++ b/EdkModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.c
@@ -93,7 +93,7 @@ EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding = {
AtapiScsiPassThruDriverBindingSupported,
AtapiScsiPassThruDriverBindingStart,
AtapiScsiPassThruDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430.c b/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430.c
index 68c4830..c5fa534 100644
--- a/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430.c
+++ b/EdkModulePkg/Bus/Pci/CirrusLogic/Dxe/CirrusLogic5430.c
@@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding = {
CirrusLogic5430ControllerDriverSupported,
CirrusLogic5430ControllerDriverStart,
CirrusLogic5430ControllerDriverStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/ComponentName.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/ComponentName.c
index e0d2010..12cb766 100644
--- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/ComponentName.c
@@ -162,6 +162,17 @@ EhciComponentNameGetControllerName (
return EFI_UNSUPPORTED;
}
//
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gEhciDriverBinding.DriverBindingHandle,
+ &gEfiPciIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ //
// Get the device context
//
Status = gBS->OpenProtocol (
diff --git a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c
index 8f32abf..2d6dc83 100644
--- a/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c
+++ b/EdkModulePkg/Bus/Pci/Ehci/Dxe/Ehci.c
@@ -218,7 +218,7 @@ EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding = {
EhciDriverBindingSupported,
EhciDriverBindingStart,
EhciDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ComponentName.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ComponentName.c
index edead72..12673c9 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/ComponentName.c
@@ -125,16 +125,13 @@ IDEBusComponentNameGetControllerName (
IDE_BLK_IO_DEV *IdeBlkIoDevice;
//
- // Get the controller context
+ // Make sure this driver is currently managing ControllHandle
//
- Status = gBS->OpenProtocol (
- ControllerHandle,
- &gEfiCallerIdGuid,
- NULL,
- gIDEBusDriverBinding.DriverBindingHandle,
- ControllerHandle,
- EFI_OPEN_PROTOCOL_TEST_PROTOCOL
- );
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gIDEBusDriverBinding.DriverBindingHandle,
+ &gEfiIdeControllerInitProtocolGuid
+ );
if (EFI_ERROR (Status)) {
return Status;
}
@@ -148,6 +145,15 @@ IDEBusComponentNameGetControllerName (
);
}
+ Status = EfiTestChildHandle (
+ ControllerHandle,
+ ChildHandle,
+ &gEfiPciIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get the child context
//
diff --git a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
index 3b0e69e..c0cec60 100644
--- a/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
+++ b/EdkModulePkg/Bus/Pci/IdeBus/Dxe/idebus.c
@@ -26,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
IDEBusDriverBindingSupported,
IDEBusDriverBindingStart,
IDEBusDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/PciBus/Dxe/pcibus.c b/EdkModulePkg/Bus/Pci/PciBus/Dxe/pcibus.c
index ed56578..43d3e38 100644
--- a/EdkModulePkg/Bus/Pci/PciBus/Dxe/pcibus.c
+++ b/EdkModulePkg/Bus/Pci/PciBus/Dxe/pcibus.c
@@ -67,7 +67,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPciBusDriverBinding = {
PciBusDriverBindingSupported,
PciBusDriverBindingStart,
PciBusDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c b/EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c
index 71d9339..909912f 100644
--- a/EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c
@@ -162,6 +162,17 @@ UhciComponentNameGetControllerName (
return EFI_UNSUPPORTED;
}
//
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUhciDriverBinding.DriverBindingHandle,
+ &gEfiPciIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ //
// Get the device context
//
Status = gBS->OpenProtocol (
diff --git a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c
index 14f8bf2..96c5be4 100644
--- a/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c
+++ b/EdkModulePkg/Bus/Pci/Uhci/Dxe/uhci.c
@@ -364,7 +364,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding = {
UHCIDriverBindingSupported,
UHCIDriverBindingStart,
UHCIDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c b/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c
index ecb32f9..a5692f4 100644
--- a/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c
+++ b/EdkModulePkg/Bus/Pci/Undi/RuntimeDxe/Init.c
@@ -192,7 +192,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUndiDriverBinding = {
UndiDriverSupported,
UndiDriverStart,
UndiDriverStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Scsi/ScsiBus/Dxe/ScsiBus.c b/EdkModulePkg/Bus/Scsi/ScsiBus/Dxe/ScsiBus.c
index 6a3778c..2ef31fb 100644
--- a/EdkModulePkg/Bus/Scsi/ScsiBus/Dxe/ScsiBus.c
+++ b/EdkModulePkg/Bus/Scsi/ScsiBus/Dxe/ScsiBus.c
@@ -50,7 +50,7 @@ EFI_DRIVER_BINDING_PROTOCOL gSCSIBusDriverBinding = {
SCSIBusDriverBindingSupported,
SCSIBusDriverBindingStart,
SCSIBusDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ComponentName.c b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ComponentName.c
index 15f02d6..e1d0f8d 100644
--- a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ComponentName.c
@@ -163,6 +163,17 @@ ScsiDiskComponentNameGetControllerName (
}
//
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gScsiDiskDriverBinding.DriverBindingHandle,
+ &gEfiScsiIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+ //
// Get the device context
//
Status = gBS->OpenProtocol (
diff --git a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c
index 88c4c3a..4be2c38 100644
--- a/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c
+++ b/EdkModulePkg/Bus/Scsi/ScsiDisk/Dxe/ScsiDisk.c
@@ -48,7 +48,7 @@ EFI_DRIVER_BINDING_PROTOCOL gScsiDiskDriverBinding = {
ScsiDiskDriverBindingSupported,
ScsiDiskDriverBindingStart,
ScsiDiskDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c
index 6a9cf13..34ab758 100644
--- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c
+++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/ComponentName.c
@@ -161,7 +161,17 @@ UsbBotComponentNameGetControllerName (
if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+ //
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUsbBotDriverBinding.DriverBindingHandle,
+ &gEfiUsbIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Get the device context
//
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
index 8cd6b8e..acba154 100644
--- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
+++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c
@@ -62,7 +62,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBotDriverBinding = {
BotDriverBindingSupported,
BotDriverBindingStart,
BotDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c
index 7bbb6f7..837a600 100644
--- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c
+++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c
@@ -68,7 +68,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBusDriverBinding = {
UsbBusControllerDriverSupported,
UsbBusControllerDriverStart,
UsbBusControllerDriverStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c
index 913ac22..d9b094d 100644
--- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c
+++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/Cbi0.c
@@ -73,7 +73,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbCbi0DriverBinding = {
Cbi0DriverBindingSupported,
Cbi0DriverBindingStart,
Cbi0DriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c
index 7bbbb0f..7d16b5a 100644
--- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c
+++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi0/ComponentName.c
@@ -163,7 +163,17 @@ UsbCbi0ComponentNameGetControllerName (
if (ChildHandle != NULL) {
return EFI_UNSUPPORTED;
}
-
+ //
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUsbCbi0DriverBinding.DriverBindingHandle,
+ &gEfiUsbIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
//
// Get the device context
//
diff --git a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c
index dd1c927..d778497 100644
--- a/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c
+++ b/EdkModulePkg/Bus/Usb/UsbCbi/Dxe/Cbi1/cbi1.c
@@ -117,7 +117,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCBI1DriverBinding = {
CBI1DriverBindingSupported,
CBI1DriverBindingStart,
CBI1DriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c
index a59de11..ec496a6 100644
--- a/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c
+++ b/EdkModulePkg/Bus/Usb/UsbKb/Dxe/efikey.c
@@ -103,7 +103,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = {
USBKeyboardDriverBindingSupported,
USBKeyboardDriverBindingStart,
USBKeyboardDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c
index 932b8c5..0d57f76 100644
--- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c
+++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorage.c
@@ -109,7 +109,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUSBFloppyDriverBinding = {
USBFloppyDriverBindingSupported,
USBFloppyDriverBindingStart,
USBFloppyDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c
index 81da020..0632473 100644
--- a/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c
+++ b/EdkModulePkg/Bus/Usb/UsbMouse/Dxe/usbmouse.c
@@ -61,7 +61,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
USBMouseDriverBindingSupported,
USBMouseDriverBindingStart,
USBMouseDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};