From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.9197.1579844171045272296 for ; Thu, 23 Jan 2020 21:36:11 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: jayanthi.nallax.veerabaghu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2020 21:36:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,356,1574150400"; d="scan'208";a="220920577" Received: from pidsbabios005.gar.corp.intel.com ([10.66.128.37]) by orsmga008.jf.intel.com with ESMTP; 23 Jan 2020 21:36:09 -0800 From: Veerabaghu To: devel@edk2.groups.io Cc: Contributor Veerabaghu Subject: [PATCH 2/2] MdeModulePkg/Universal: Added control on disable / enable Console redirection Date: Fri, 24 Jan 2020 11:06:01 +0530 Message-Id: <26cf5adc37775a87d6a1899d4f40d241927a8463.1579786910.git.jayanthi.nallax.veerabaghu@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <6b82d9f65c4aca38776f84ab8c8a2745238f6f87.1579786910.git.jayanthi.nallax.veerabaghu@intel.com> References: <6b82d9f65c4aca38776f84ab8c8a2745238f6f87.1579786910.git.jayanthi.nallax.veerabaghu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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