From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.6710.1588927130864428592 for ; Fri, 08 May 2020 01:38:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: guomin.jiang@intel.com) IronPort-SDR: GZR1Nff4151E9OOY5ccwZwePKsYGP6kJwCrW/i6yxNKQbFPTaRA4quvdn75+8XtdN7DkgdmPcZ Nd5ljdmy7Zdg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2020 01:38:49 -0700 IronPort-SDR: qMH/i5PnxGWONOgsaH8gaHY1bBb6g3Uatp/27pGc/+4YrAREC4lBzI6+DtRIKe8F+GT0vjivwV dXIVlJVUO6SA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,367,1583222400"; d="scan'208";a="305366648" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.4.95]) by FMSMGA003.fm.intel.com with ESMTP; 08 May 2020 01:38:47 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Zhichao Gao , Ray Ni Subject: [PATCH 14/18] MdeModulePkg/ConSplitterDxe: Remove All UGA Support. Date: Fri, 8 May 2020 16:38:20 +0800 Message-Id: <20200508083824.1785-15-guomin.jiang@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 In-Reply-To: <20200508083824.1785-1-guomin.jiang@intel.com> References: <20200508083824.1785-1-guomin.jiang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2368 Remove the PcdConOutGopSupport, it is unnecessary any more. Cc: Zhichao Gao Cc: Ray Ni Signed-off-by: Guomin Jiang --- .../Console/ConSplitterDxe/ConSplitter.c | 84 ++++++++----------- .../Console/ConSplitterDxe/ConSplitterDxe.inf | 9 +- .../Console/ConSplitterDxe/ConSplitterDxe.uni | 9 +- 3 files changed, 42 insertions(+), 60 deletions(-) diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 18c25956d0d9..350b85d73028 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -461,11 +461,6 @@ ConSplitterDriverEntry( ); ASSERT_EFI_ERROR (Status); - // - // Graphics Output protocol must be supported. - // - ASSERT (FeaturePcdGet (PcdConOutGopSupport)); - // // The driver creates virtual handles for ConIn, ConOut, StdErr. // The virtual handles will always exist even if no console exist in the @@ -720,9 +715,7 @@ ConSplitterTextOutConstructor ( // // Copy protocols template // - if (FeaturePcdGet (PcdConOutGopSupport)) { - CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL)); - } + CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL)); // // Initilize console output splitter's private data. @@ -764,47 +757,44 @@ ConSplitterTextOutConstructor ( ConOutPrivate->TextOutQueryData[0].Rows = 25; TextOutSetMode (ConOutPrivate, 0); + // + // Setup resource for mode information in Graphics Output Protocol interface + // + if ((ConOutPrivate->GraphicsOutput.Mode = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE))) == NULL) { + return EFI_OUT_OF_RESOURCES; + } + if ((ConOutPrivate->GraphicsOutput.Mode->Info = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) { + return EFI_OUT_OF_RESOURCES; + } + // + // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel + // DevNull will be updated to user-defined mode after driver has started. + // + if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) { + return EFI_OUT_OF_RESOURCES; + } + Info = &ConOutPrivate->GraphicsOutputModeBuffer[0]; + Info->Version = 0; + Info->HorizontalResolution = 800; + Info->VerticalResolution = 600; + Info->PixelFormat = PixelBltOnly; + Info->PixelsPerScanLine = 800; + CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)); + ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); - if (FeaturePcdGet (PcdConOutGopSupport)) { - // - // Setup resource for mode information in Graphics Output Protocol interface - // - if ((ConOutPrivate->GraphicsOutput.Mode = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE))) == NULL) { - return EFI_OUT_OF_RESOURCES; - } - if ((ConOutPrivate->GraphicsOutput.Mode->Info = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) { - return EFI_OUT_OF_RESOURCES; - } - // - // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel - // DevNull will be updated to user-defined mode after driver has started. - // - if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) { - return EFI_OUT_OF_RESOURCES; - } - Info = &ConOutPrivate->GraphicsOutputModeBuffer[0]; - Info->Version = 0; - Info->HorizontalResolution = 800; - Info->VerticalResolution = 600; - Info->PixelFormat = PixelBltOnly; - Info->PixelsPerScanLine = 800; - CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)); - ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION); - - // - // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode() - // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize - // - ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL; - ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0; + // + // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode() + // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize + // + ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) (UINTN) NULL; + ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0; - ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1; - // - // Initial current mode to unknown state, and then set to mode 0 - // - ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff; - ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0); - } + ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1; + // + // Initial current mode to unknown state, and then set to mode 0 + // + ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff; + ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0); return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf index 156757aee653..baa4051fd104 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf @@ -3,11 +3,9 @@ # # This driver acts as a virtual console, takes over the console I/O control from selected # standard console devices, and transmits console I/O to related console device drivers. -# Consplitter could install Graphics Output protocol in system -# table according PCD settings(PcdConOutGopSupport). It always -# consumes Graphics Output protocol which is produced by display device +# It always consumes Graphics Output protocol which is produced by display device # -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -90,9 +88,6 @@ [Protocols] ## SOMETIMES_CONSUMES gEfiGraphicsOutputProtocolGuid -[FeaturePcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport ## CONSUMES - [Pcd] ## SOMETIMES_PRODUCES ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni index 903c505e303c..73b0010a57dd 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.uni @@ -3,11 +3,9 @@ // // This driver acts as a virtual console, takes over the console I/O control from selected // standard console devices, and transmits console I/O to related console device drivers. -// Consplitter could install Graphics Output protocol in system -// table according PCD settings(PcdConOutGopSupport). It always -// consumes Graphics Output protocol which is produced by display device +// It always consumes Graphics Output protocol which is produced by display device // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
// // SPDX-License-Identifier: BSD-2-Clause-Patent // @@ -16,5 +14,4 @@ #string STR_MODULE_ABSTRACT #language en-US "Provides multi console support" -#string STR_MODULE_DESCRIPTION #language en-US "This driver acts as a virtual console, takes over the console I/O control from selected standard console devices, and transmits console I/O to related console device drivers. Consplitter could install Graphics Output protocol in system table according PCD settings(PcdConOutGopSupport). It always consumes Graphics Output protocol, which is produced by display device." - +#string STR_MODULE_DESCRIPTION #language en-US "This driver acts as a virtual console, takes over the console I/O control from selected standard console devices, and transmits console I/O to related console device drivers. It always consumes Graphics Output protocol, which is produced by display device." -- 2.25.1.windows.1