mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
8b018de64f
commit
61fb1657e5
|
@ -93,7 +93,7 @@ EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding = {
|
|||
AtapiScsiPassThruDriverBindingSupported,
|
||||
AtapiScsiPassThruDriverBindingStart,
|
||||
AtapiScsiPassThruDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding = {
|
|||
CirrusLogic5430ControllerDriverSupported,
|
||||
CirrusLogic5430ControllerDriverStart,
|
||||
CirrusLogic5430ControllerDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -218,7 +218,7 @@ EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding = {
|
|||
EhciDriverBindingSupported,
|
||||
EhciDriverBindingStart,
|
||||
EhciDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -26,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
|
|||
IDEBusDriverBindingSupported,
|
||||
IDEBusDriverBindingStart,
|
||||
IDEBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -67,7 +67,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPciBusDriverBinding = {
|
|||
PciBusDriverBindingSupported,
|
||||
PciBusDriverBindingStart,
|
||||
PciBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -364,7 +364,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding = {
|
|||
UHCIDriverBindingSupported,
|
||||
UHCIDriverBindingStart,
|
||||
UHCIDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -192,7 +192,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUndiDriverBinding = {
|
|||
UndiDriverSupported,
|
||||
UndiDriverStart,
|
||||
UndiDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@ EFI_DRIVER_BINDING_PROTOCOL gSCSIBusDriverBinding = {
|
|||
SCSIBusDriverBindingSupported,
|
||||
SCSIBusDriverBindingStart,
|
||||
SCSIBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -162,6 +162,17 @@ ScsiDiskComponentNameGetControllerName (
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gScsiDiskDriverBinding.DriverBindingHandle,
|
||||
&gEfiScsiIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
//
|
||||
// Get the device context
|
||||
//
|
||||
|
|
|
@ -48,7 +48,7 @@ EFI_DRIVER_BINDING_PROTOCOL gScsiDiskDriverBinding = {
|
|||
ScsiDiskDriverBindingSupported,
|
||||
ScsiDiskDriverBindingStart,
|
||||
ScsiDiskDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -62,7 +62,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBotDriverBinding = {
|
|||
BotDriverBindingSupported,
|
||||
BotDriverBindingStart,
|
||||
BotDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -68,7 +68,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbBusDriverBinding = {
|
|||
UsbBusControllerDriverSupported,
|
||||
UsbBusControllerDriverStart,
|
||||
UsbBusControllerDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -73,7 +73,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbCbi0DriverBinding = {
|
|||
Cbi0DriverBindingSupported,
|
||||
Cbi0DriverBindingStart,
|
||||
Cbi0DriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -117,7 +117,7 @@ EFI_DRIVER_BINDING_PROTOCOL gCBI1DriverBinding = {
|
|||
CBI1DriverBindingSupported,
|
||||
CBI1DriverBindingStart,
|
||||
CBI1DriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -103,7 +103,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = {
|
|||
USBKeyboardDriverBindingSupported,
|
||||
USBKeyboardDriverBindingStart,
|
||||
USBKeyboardDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -109,7 +109,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUSBFloppyDriverBinding = {
|
|||
USBFloppyDriverBindingSupported,
|
||||
USBFloppyDriverBindingStart,
|
||||
USBFloppyDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -61,7 +61,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
|||
USBMouseDriverBindingSupported,
|
||||
USBMouseDriverBindingStart,
|
||||
USBMouseDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {
|
|||
ConPlatformTextInDriverBindingSupported,
|
||||
ConPlatformTextInDriverBindingStart,
|
||||
ConPlatformDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = {
|
|||
ConPlatformTextOutDriverBindingSupported,
|
||||
ConPlatformTextOutDriverBindingStart,
|
||||
ConPlatformDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -217,7 +217,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding = {
|
|||
ConSplitterConInDriverBindingSupported,
|
||||
ConSplitterConInDriverBindingStart,
|
||||
ConSplitterConInDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@ -226,7 +226,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding = {
|
|||
ConSplitterSimplePointerDriverBindingSupported,
|
||||
ConSplitterSimplePointerDriverBindingStart,
|
||||
ConSplitterSimplePointerDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@ -235,7 +235,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding = {
|
|||
ConSplitterConOutDriverBindingSupported,
|
||||
ConSplitterConOutDriverBindingStart,
|
||||
ConSplitterConOutDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
@ -244,7 +244,7 @@ EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding = {
|
|||
ConSplitterStdErrDriverBindingSupported,
|
||||
ConSplitterStdErrDriverBindingStart,
|
||||
ConSplitterStdErrDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -144,7 +144,7 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
|
|||
GraphicsConsoleControllerDriverSupported,
|
||||
GraphicsConsoleControllerDriverStart,
|
||||
GraphicsConsoleControllerDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -162,12 +162,34 @@ TerminalComponentNameGetControllerName (
|
|||
EFI_SIMPLE_TEXT_OUT_PROTOCOL *SimpleTextOutput;
|
||||
TERMINAL_DEV *TerminalDevice;
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gTerminalDriverBinding.DriverBindingHandle,
|
||||
&gEfiSerialIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// This is a bus driver, so ChildHandle can not be NULL.
|
||||
//
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
&gEfiSerialIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
|
|
|
@ -57,7 +57,7 @@ EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding = {
|
|||
TerminalDriverBindingSupported,
|
||||
TerminalDriverBindingStart,
|
||||
TerminalDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -88,7 +88,7 @@ EFI_DRIVER_BINDING_PROTOCOL gDiskIoDriverBinding = {
|
|||
DiskIoDriverBindingSupported,
|
||||
DiskIoDriverBindingStart,
|
||||
DiskIoDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = {
|
|||
PartitionDriverBindingSupported,
|
||||
PartitionDriverBindingStart,
|
||||
PartitionDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -2119,7 +2119,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPxeBcDriverBinding = {
|
|||
PxeBcDriverSupported,
|
||||
PxeBcDriverStart,
|
||||
PxeBcDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPxeDhcp4DriverBinding = {
|
|||
PxeDhcp4DriverBindingSupported,
|
||||
PxeDhcp4DriverBindingStart,
|
||||
PxeDhcp4DriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@ EFI_DRIVER_BINDING_PROTOCOL mSimpleNetworkDriverBinding = {
|
|||
SimpleNetworkDriverSupported,
|
||||
SimpleNetworkDriverStart,
|
||||
SimpleNetworkDriverStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue