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@2273 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e1b95c15ab
commit
8b018de64f
|
@ -160,7 +160,17 @@ WinNtBlockIoComponentNameGetControllerName (
|
||||||
if (ChildHandle != NULL) {
|
if (ChildHandle != NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllerHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtBlockIoDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -66,7 +66,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBlockIoDriverBinding = {
|
||||||
WinNtBlockIoDriverBindingSupported,
|
WinNtBlockIoDriverBindingSupported,
|
||||||
WinNtBlockIoDriverBindingStart,
|
WinNtBlockIoDriverBindingStart,
|
||||||
WinNtBlockIoDriverBindingStop,
|
WinNtBlockIoDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -160,7 +160,17 @@ WinNtConsoleComponentNameGetControllerName (
|
||||||
if (ChildHandle != NULL) {
|
if (ChildHandle != NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllerHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtConsoleDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Get out context back
|
// Get out context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -50,7 +50,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtConsoleDriverBinding = {
|
||||||
WinNtConsoleDriverBindingSupported,
|
WinNtConsoleDriverBindingSupported,
|
||||||
WinNtConsoleDriverBindingStart,
|
WinNtConsoleDriverBindingStart,
|
||||||
WinNtConsoleDriverBindingStop,
|
WinNtConsoleDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -162,8 +162,18 @@ WinNtGopComponentNameGetControllerName (
|
||||||
if (ChildHandle != NULL) {
|
if (ChildHandle != NULL) {
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
//
|
||||||
//
|
// Make sure this driver is currently managing ControllerHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtGopDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
Status = gBS->OpenProtocol (
|
Status = gBS->OpenProtocol (
|
||||||
|
|
|
@ -28,7 +28,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtGopDriverBinding = {
|
||||||
WinNtGopDriverBindingSupported,
|
WinNtGopDriverBindingSupported,
|
||||||
WinNtGopDriverBindingStart,
|
WinNtGopDriverBindingStart,
|
||||||
WinNtGopDriverBindingStop,
|
WinNtGopDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -154,6 +154,18 @@ WinNtSerialIoComponentNameGetControllerName (
|
||||||
EFI_SERIAL_IO_PROTOCOL *SerialIo;
|
EFI_SERIAL_IO_PROTOCOL *SerialIo;
|
||||||
WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;
|
WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtSerialIoDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a bus driver, so ChildHandle must not be NULL.
|
// This is a bus driver, so ChildHandle must not be NULL.
|
||||||
//
|
//
|
||||||
|
@ -161,6 +173,15 @@ WinNtSerialIoComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = EfiTestChildHandle (
|
||||||
|
ControllerHandle,
|
||||||
|
ChildHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -51,7 +51,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = {
|
||||||
WinNtSerialIoDriverBindingSupported,
|
WinNtSerialIoDriverBindingSupported,
|
||||||
WinNtSerialIoDriverBindingStart,
|
WinNtSerialIoDriverBindingStart,
|
||||||
WinNtSerialIoDriverBindingStop,
|
WinNtSerialIoDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -167,6 +167,17 @@ WinNtSimpleFileSystemComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllerHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtSimpleFileSystemDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtSimpleFileSystemDriverBinding = {
|
||||||
WinNtSimpleFileSystemDriverBindingSupported,
|
WinNtSimpleFileSystemDriverBindingSupported,
|
||||||
WinNtSimpleFileSystemDriverBindingStart,
|
WinNtSimpleFileSystemDriverBindingStart,
|
||||||
WinNtSimpleFileSystemDriverBindingStop,
|
WinNtSimpleFileSystemDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -161,6 +161,17 @@ WinNtUgaComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllerHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtUgaDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtIoProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -31,7 +31,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtUgaDriverBinding = {
|
||||||
WinNtUgaDriverBindingSupported,
|
WinNtUgaDriverBindingSupported,
|
||||||
WinNtUgaDriverBindingStart,
|
WinNtUgaDriverBindingStart,
|
||||||
WinNtUgaDriverBindingStop,
|
WinNtUgaDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -154,6 +154,18 @@ WinNtBusDriverComponentNameGetControllerName (
|
||||||
EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
|
EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
|
||||||
WIN_NT_IO_DEVICE *Private;
|
WIN_NT_IO_DEVICE *Private;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Make sure this driver is currently managing ControllHandle
|
||||||
|
//
|
||||||
|
Status = EfiTestManagedDevice (
|
||||||
|
ControllerHandle,
|
||||||
|
gWinNtBusDriverBinding.DriverBindingHandle,
|
||||||
|
&gEfiWinNtThunkProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// This is a bus driver, so ChildHandle can not be NULL.
|
// This is a bus driver, so ChildHandle can not be NULL.
|
||||||
//
|
//
|
||||||
|
@ -161,6 +173,15 @@ WinNtBusDriverComponentNameGetControllerName (
|
||||||
return EFI_UNSUPPORTED;
|
return EFI_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = EfiTestChildHandle (
|
||||||
|
ControllerHandle,
|
||||||
|
ChildHandle,
|
||||||
|
&gEfiWinNtThunkProtocolGuid
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get our context back
|
// Get our context back
|
||||||
//
|
//
|
||||||
|
|
|
@ -114,7 +114,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding = {
|
||||||
WinNtBusDriverBindingSupported,
|
WinNtBusDriverBindingSupported,
|
||||||
WinNtBusDriverBindingStart,
|
WinNtBusDriverBindingStart,
|
||||||
WinNtBusDriverBindingStop,
|
WinNtBusDriverBindingStop,
|
||||||
0x10,
|
0xa,
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue