From 255d6798f82c5f72ab9b386044ee3989a8a25da6 Mon Sep 17 00:00:00 2001 From: Nitin Puranik Date: Wed, 20 May 2020 04:10:29 +0000 Subject: [PATCH] Configure Terminal to be picked up by Consplitter Add the terminal device to be picked up by Consplitter so we can interact with UEFI VMs over serial console terminals like Putty. --- MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c | 8 ++++++++ .../Universal/Console/TerminalDxe/TerminalDxe.inf | 2 ++ 2 files changed, 10 insertions(+) diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c index 076edc7c34..406d897768 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c @@ -800,6 +800,10 @@ TerminalDriverBindingStart ( &TerminalDevice->SimpleTextOutput, &gEfiDevicePathProtocolGuid, TerminalDevice->DevicePath, + &gEfiConsoleOutDeviceGuid, + NULL, // Terminal is a ConOut device (picked up by Consplitter). + &gEfiConsoleInDeviceGuid, + NULL, // Terminal is a ConIn device (picked up by Consplitter). NULL ); if (!EFI_ERROR (Status)) { @@ -1002,6 +1006,10 @@ TerminalDriverBindingStop ( &TerminalDevice->SimpleTextOutput, &gEfiDevicePathProtocolGuid, TerminalDevice->DevicePath, + &gEfiConsoleOutDeviceGuid, + NULL, + &gEfiConsoleInDeviceGuid, + NULL, NULL ); if (EFI_ERROR (Status)) { diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf index b12a1bf504..8ff14c0b10 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf @@ -74,6 +74,8 @@ gEdkiiVT400Guid ## SOMETIMES_CONSUMES ## GUID # used with a Vendor-Defined Messaging Device Path gEdkiiSCOTermGuid ## SOMETIMES_CONSUMES ## GUID # used with a Vendor-Defined Messaging Device Path gEdkiiStatusCodeDataTypeVariableGuid ## SOMETIMES_CONSUMES ## GUID + gEfiConsoleOutDeviceGuid ## SOMETIMES_CONSUMES ## MU_CHANGE + gEfiConsoleInDeviceGuid ## SOMETIMES_CONSUMES ## MU_CHANGE [Protocols] gEfiSerialIoProtocolGuid ## TO_START