summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/Console
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/Universal/Console
parent8b018de64f54b67f437c95bf0ed591b03a6cc63b (diff)
downloadedk2-platforms-61fb1657e5b2b37a2ec5c879f6fa7689100f0d54.tar.xz
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/Universal/Console')
-rw-r--r--EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c8
-rw-r--r--EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c2
-rw-r--r--EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c22
-rw-r--r--EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c2
4 files changed, 28 insertions, 6 deletions
diff --git a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c
index 8f52c341dc..973f13d0f3 100644
--- a/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c
+++ b/EdkModulePkg/Universal/Console/ConSplitter/Dxe/ConSplitter.c
@@ -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
};
diff --git a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c
index 05edbd0fec..25b0429b1b 100644
--- a/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c
+++ b/EdkModulePkg/Universal/Console/GraphicsConsole/Dxe/GraphicsConsole.c
@@ -144,7 +144,7 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
GraphicsConsoleControllerDriverSupported,
GraphicsConsoleControllerDriverStart,
GraphicsConsoleControllerDriverStop,
- 0x10,
+ 0xa,
NULL,
NULL
};
diff --git a/EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c b/EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c
index cc925b13c9..7a1c23d17c 100644
--- a/EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c
+++ b/EdkModulePkg/Universal/Console/Terminal/Dxe/ComponentName.c
@@ -163,11 +163,33 @@ TerminalComponentNameGetControllerName (
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
//
diff --git a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c
index c7c1bdda8f..6621b64ace 100644
--- a/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c
+++ b/EdkModulePkg/Universal/Console/Terminal/Dxe/Terminal.c
@@ -57,7 +57,7 @@ EFI_DRIVER_BINDING_PROTOCOL gTerminalDriverBinding = {
TerminalDriverBindingSupported,
TerminalDriverBindingStart,
TerminalDriverBindingStop,
- 0x10,
+ 0xa,
NULL,
NULL
};