diff options
14 files changed, 105 insertions, 11 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/ComponentName.c index a24f6da..fb9cc42 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/ComponentName.c @@ -160,7 +160,17 @@ WinNtBlockIoComponentNameGetControllerName ( if (ChildHandle != NULL) {
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
//
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c index 014f8a6..c160aaf 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c @@ -66,7 +66,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBlockIoDriverBinding = { WinNtBlockIoDriverBindingSupported,
WinNtBlockIoDriverBindingStart,
WinNtBlockIoDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c index d10f9ab..81db085 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c @@ -160,7 +160,17 @@ WinNtConsoleComponentNameGetControllerName ( if (ChildHandle != NULL) {
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
//
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/Console.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/Console.c index 0bc344c..0027069 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/Console.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/Console.c @@ -50,7 +50,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtConsoleDriverBinding = { WinNtConsoleDriverBindingSupported,
WinNtConsoleDriverBindingStart,
WinNtConsoleDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/ComponentName.c index 9263b3d..8bdf113 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/ComponentName.c @@ -162,8 +162,18 @@ WinNtGopComponentNameGetControllerName ( if (ChildHandle != NULL) { 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 // Status = gBS->OpenProtocol ( diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/WinNtGopDriver.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/WinNtGopDriver.c index 067033b..6013165 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/WinNtGopDriver.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/WinNtGopDriver.c @@ -28,7 +28,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtGopDriverBinding = { WinNtGopDriverBindingSupported, WinNtGopDriverBindingStart, WinNtGopDriverBindingStop, - 0x10, + 0xa, NULL, NULL }; diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c index 8205786..d22f030 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c @@ -155,12 +155,33 @@ WinNtSerialIoComponentNameGetControllerName ( 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.
//
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
+ Status = EfiTestChildHandle (
+ ControllerHandle,
+ ChildHandle,
+ &gEfiWinNtIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get our context back
//
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/WinNtSerialIo.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/WinNtSerialIo.c index 38c03a8..a4a7a32 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/WinNtSerialIo.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/WinNtSerialIo.c @@ -51,7 +51,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtSerialIoDriverBinding = { WinNtSerialIoDriverBindingSupported,
WinNtSerialIoDriverBindingStart,
WinNtSerialIoDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/ComponentName.c index de4abd7..c6240df 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/ComponentName.c @@ -168,6 +168,17 @@ WinNtSimpleFileSystemComponentNameGetControllerName ( }
//
+ // 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
//
Status = gBS->OpenProtocol (
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/WinNtSimpleFileSystem.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/WinNtSimpleFileSystem.c index 5552bc2..bea7de4 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/WinNtSimpleFileSystem.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/WinNtSimpleFileSystem.c @@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtSimpleFileSystemDriverBinding = { WinNtSimpleFileSystemDriverBindingSupported,
WinNtSimpleFileSystemDriverBindingStart,
WinNtSimpleFileSystemDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c index 7b9c297..9107719 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c @@ -162,6 +162,17 @@ WinNtUgaComponentNameGetControllerName ( }
//
+ // 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
//
Status = gBS->OpenProtocol (
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c index 58908d9..a270ec7 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c @@ -31,7 +31,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtUgaDriverBinding = { WinNtUgaDriverBindingSupported,
WinNtUgaDriverBindingStart,
WinNtUgaDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c index 7dee4bd..b03fc8b 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c @@ -155,12 +155,33 @@ WinNtBusDriverComponentNameGetControllerName ( 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.
//
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
+ Status = EfiTestChildHandle (
+ ControllerHandle,
+ ChildHandle,
+ &gEfiWinNtThunkProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get our context back
//
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c index 4ce5286..5eddc08 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c @@ -114,7 +114,7 @@ EFI_DRIVER_BINDING_PROTOCOL gWinNtBusDriverBinding = { WinNtBusDriverBindingSupported,
WinNtBusDriverBindingStart,
WinNtBusDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
|