summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/ComponentName.c12
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/BlockIo/WinNtBlockIo.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ComponentName.c12
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/Console.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/ComponentName.c14
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Gop/WinNtGopDriver.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c21
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/WinNtSerialIo.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/ComponentName.c11
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/SimpleFileSystem/WinNtSimpleFileSystem.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/ComponentName.c11
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/Uga/WinNtUgaDriver.c2
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c21
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/WinNtBusDriver.c2
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 a24f6da602..fb9cc42492 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 014f8a6c06..c160aaf836 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 d10f9ab68e..81db085fd4 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 0bc344c1ec..0027069b7a 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 9263b3de1e..8bdf1130a1 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 067033b435..6013165996 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 82057866c7..d22f030f4b 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 38c03a8bbc..a4a7a32b54 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 de4abd73e7..c6240df293 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 5552bc28be..bea7de40f8 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 7b9c2972d0..910771964d 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 58908d9f07..a270ec7b0d 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 7dee4bd9a4..b03fc8b264 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 4ce5286c7f..5eddc08bb4 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
};