[edk2-devel] [PATCH 2/2] MdeModulePkg/Universal: Added control on disable / enable Console redirection

Veerabaghu jayanthi.nallax.veerabaghu at intel.com
Fri Jan 24 05:36:01 UTC 2020


REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2399

In TerminalDriverBindingStart funtion of Terminal.c file
added condition which depends on setup variable ConsoleRedirection

Change-Id: Ib9b9ce2271b1dab8a1c87a66bd30b5a7c1611cf0
Signed-off-by: Contributor Veerabaghu <jayanthi.nallax.veerabaghu at intel.com>
---
 MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c      | 5 ++++-
 MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
index a98b690c8b..74b77eb771 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
@@ -478,7 +478,10 @@ TerminalDriverBindingStart (
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL     *SimpleTextOutput;
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL      *SimpleTextInput;
   EFI_UNICODE_STRING_TABLE            *ControllerNameTable;
-
+  
+  if(!PcdGetBool(PcdConsoleRedirectionSupport)) {
+    return EFI_DEVICE_ERROR;
+  }
   //
   // Get the Device Path Protocol to build the device path of the child device
   //
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
index b2a8aeba85..2ba688138f 100644
--- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
@@ -87,6 +87,7 @@
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType           ## SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable    ## CONSUMES
+gEfiMdePkgTokenSpaceGuid.PcdConsoleRedirectionSupport
 
 # [Event]
 # # Relative timer event set by UnicodeToEfiKey(), used to be one 2 seconds input timeout.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#53479): https://edk2.groups.io/g/devel/message/53479
Mute This Topic: https://groups.io/mt/70069549/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list