From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web11.1082.1642121466955476862 for ; Thu, 13 Jan 2022 16:51:32 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=P1e7hQiR; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: guomin.jiang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642121492; x=1673657492; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZR1sJ8xOhrsKe0TPoE+S+LkkadTuB2CS4lwkzzvuH/8=; b=P1e7hQiR/TatIKuiKPU/CIvbWTY2J6w/5TT69hMpnuHjgOlSN+7PG4d7 oiqsb4W1R7yvag22uFdlpeZVUdfQZzMrkE7i4hZsbEUt4vtU/EX68rmTw 9CRZW4e8IrY9+wHaeYtM+evKnAD/zhULBdKC5ocfloEtUJA5AVCQiUtYQ ZMs3DVuPlNbSB0jjLU8VlsVGcdP/WJgJrBQY/2PcMuLPohx1I+uMau0vz VD2DxUubJXFhND0krPAigkBpJ9US57gTCVRPS5bCJg8H3eCWv9RUfU0Zt UOdhOXOPdnFhhtEYX5SRmJl+wEgC/wIMerG0EGej0T6IIGJ1ibg6oNvBG w==; X-IronPort-AV: E=McAfee;i="6200,9189,10226"; a="241713939" X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="241713939" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:32 -0800 X-IronPort-AV: E=Sophos;i="5.88,287,1635231600"; d="scan'208";a="475564829" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.9.87]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2022 16:51:30 -0800 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [PATCH 11/11] MdePkg: Remove All UGA Support Date: Fri, 14 Jan 2022 08:50:44 +0800 Message-Id: <20220114005044.1975-12-guomin.jiang@intel.com> X-Mailer: git-send-email 2.30.0.windows.2 In-Reply-To: <20220114005044.1975-1-guomin.jiang@intel.com> References: <20220114005044.1975-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 All UGA Support in MdePkg. Signed-off-by: Guomin Jiang Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu --- MdePkg/MdePkg.dec | 12 -- MdePkg/MdePkg.dsc | 3 - MdePkg/Library/UefiLib/UefiLib.inf | 2 - MdePkg/Include/Protocol/UgaDraw.h | 159 ------------------- MdePkg/Include/Protocol/UgaIo.h | 189 ----------------------- MdePkg/Library/UefiLib/UefiLibInternal.h | 1 - MdePkg/Library/UefiLib/UefiLibPrint.c | 89 ----------- MdePkg/MdePkg.uni | 6 - 8 files changed, 461 deletions(-) delete mode 100644 MdePkg/Include/Protocol/UgaDraw.h delete mode 100644 MdePkg/Include/Protocol/UgaIo.h diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 59b405928bf8..9960c44754bc 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1446,12 +1446,6 @@ [Protocols] ## Include/Protocol/EdidOverride.h gEfiEdidOverrideProtocolGuid = { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9, 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5 }} - ## Include/Protocol/UgaIo.h - gEfiUgaIoProtocolGuid = { 0x61A4D49E, 0x6F68, 0x4F1B, { 0xB9, 0x22, 0xA8, 0x6E, 0xED, 0x0B, 0x07, 0xA2 }} - - ## Include/Protocol/UgaDraw.h - gEfiUgaDrawProtocolGuid = { 0x982C298B, 0xF4FA, 0x41CB, { 0xB8, 0x38, 0x77, 0xAA, 0x68, 0x8F, 0xB8, 0x39 }} - ## Include/Protocol/LoadedImage.h gEfiLoadedImageProtocolGuid = { 0x5B1B31A1, 0x9562, 0x11D2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }} @@ -1942,12 +1936,6 @@ [PcdsFeatureFlag] # @Prompt Deprecate Global Variable LangCodes. gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate|FALSE|BOOLEAN|0x00000012 - ## Indicates if UGA Draw Protocol is still consumed.

- # TRUE - Consume UGA Draw protocol.
- # FALSE - Does not consume UGA Draw protocol.
- # @Prompt Consume UGA Draw Protocol. - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE|BOOLEAN|0x00000027 - ## Indicates if a check will be made to see if a specified node is a member of linked list # in the following BaseLib functions: GetNextNode(), IsNull(), IsNodeAtEnd(), SwapListEntries().

# TRUE - Verify a specified node is a member of linked list.
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index a94959169b2f..939e1a7b5299 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -23,9 +23,6 @@ [Defines] !include MdePkg/MdeLibs.dsc.inc -[PcdsFeatureFlag] - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE - [PcdsFixedAtBuild] gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000 diff --git a/MdePkg/Library/UefiLib/UefiLib.inf b/MdePkg/Library/UefiLib/UefiLib.inf index 01ed92092da2..9f3863787833 100644 --- a/MdePkg/Library/UefiLib/UefiLib.inf +++ b/MdePkg/Library/UefiLib/UefiLib.inf @@ -67,7 +67,6 @@ [Protocols] gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES - gEfiUgaDrawProtocolGuid | gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## SOMETIMES_CONSUMES # Consumes if gEfiGraphicsOutputProtocolGuid uninstalled gEfiComponentNameProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable ## SOMETIMES_PRODUCES # User chooses to produce it gEfiComponentName2ProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable ## SOMETIMES_PRODUCES # User chooses to produce it gEfiDriverConfigurationProtocolGuid ## SOMETIMES_PRODUCES # User chooses to produce it @@ -84,5 +83,4 @@ [FeaturePcd] gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES diff --git a/MdePkg/Include/Protocol/UgaDraw.h b/MdePkg/Include/Protocol/UgaDraw.h deleted file mode 100644 index 8d33bf873cad..000000000000 --- a/MdePkg/Include/Protocol/UgaDraw.h +++ /dev/null @@ -1,159 +0,0 @@ -/** @file - UGA Draw protocol from the EFI 1.10 specification. - - Abstraction of a very simple graphics device. - - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __UGA_DRAW_H__ -#define __UGA_DRAW_H__ - -#define EFI_UGA_DRAW_PROTOCOL_GUID \ - { \ - 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \ - } - -typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL; - -/** - Return the current video mode information. - - @param This The EFI_UGA_DRAW_PROTOCOL instance. - @param HorizontalResolution The size of video screen in pixels in the X dimension. - @param VerticalResolution The size of video screen in pixels in the Y dimension. - @param ColorDepth Number of bits per pixel, currently defined to be 32. - @param RefreshRate The refresh rate of the monitor in Hertz. - - @retval EFI_SUCCESS Mode information returned. - @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode () - @retval EFI_INVALID_PARAMETER One of the input args was NULL. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE)( - IN EFI_UGA_DRAW_PROTOCOL *This, - OUT UINT32 *HorizontalResolution, - OUT UINT32 *VerticalResolution, - OUT UINT32 *ColorDepth, - OUT UINT32 *RefreshRate - ); - -/** - Set the current video mode information. - - @param This The EFI_UGA_DRAW_PROTOCOL instance. - @param HorizontalResolution The size of video screen in pixels in the X dimension. - @param VerticalResolution The size of video screen in pixels in the Y dimension. - @param ColorDepth Number of bits per pixel, currently defined to be 32. - @param RefreshRate The refresh rate of the monitor in Hertz. - - @retval EFI_SUCCESS Mode information returned. - @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode () - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE)( - IN EFI_UGA_DRAW_PROTOCOL *This, - IN UINT32 HorizontalResolution, - IN UINT32 VerticalResolution, - IN UINT32 ColorDepth, - IN UINT32 RefreshRate - ); - -typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; -} EFI_UGA_PIXEL; - -typedef union { - EFI_UGA_PIXEL Pixel; - UINT32 Raw; -} EFI_UGA_PIXEL_UNION; - -/// -/// Enumration value for actions of Blt operations. -/// -typedef enum { - EfiUgaVideoFill, ///< Write data from the BltBuffer pixel (SourceX, SourceY) - ///< directly to every pixel of the video display rectangle - ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). - ///< Only one pixel will be used from the BltBuffer. Delta is NOT used. - - EfiUgaVideoToBltBuffer, ///< Read data from the video display rectangle - ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in - ///< the BltBuffer rectangle (DestinationX, DestinationY ) - ///< (DestinationX + Width, DestinationY + Height). If DestinationX or - ///< DestinationY is not zero then Delta must be set to the length in bytes - ///< of a row in the BltBuffer. - - EfiUgaBltBufferToVideo, ///< Write data from the BltBuffer rectangle - ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the - ///< video display rectangle (DestinationX, DestinationY) - ///< (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is - ///< not zero then Delta must be set to the length in bytes of a row in the - ///< BltBuffer. - - EfiUgaVideoToVideo, ///< Copy from the video display rectangle (SourceX, SourceY) - ///< (SourceX + Width, SourceY + Height) .to the video display rectangle - ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). - ///< The BltBuffer and Delta are not used in this mode. - - EfiUgaBltMax ///< Maxmimum value for enumration value of Blt operation. If a Blt operation - ///< larger or equal to this enumration value, it is invalid. -} EFI_UGA_BLT_OPERATION; - -/** - Blt a rectangle of pixels on the graphics screen. - - @param[in] This - Protocol instance pointer. - @param[in] BltBuffer - Buffer containing data to blit into video buffer. This - buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL) - @param[in] BltOperation - Operation to perform on BlitBuffer and video memory - @param[in] SourceX - X coordinate of source for the BltBuffer. - @param[in] SourceY - Y coordinate of source for the BltBuffer. - @param[in] DestinationX - X coordinate of destination for the BltBuffer. - @param[in] DestinationY - Y coordinate of destination for the BltBuffer. - @param[in] Width - Width of rectangle in BltBuffer in pixels. - @param[in] Height - Hight of rectangle in BltBuffer in pixels. - @param[in] Delta - OPTIONAL - - @retval EFI_SUCCESS - The Blt operation completed. - @retval EFI_INVALID_PARAMETER - BltOperation is not valid. - @retval EFI_DEVICE_ERROR - A hardware error occurred writting to the video buffer. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)( - IN EFI_UGA_DRAW_PROTOCOL *This, - IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, - IN EFI_UGA_BLT_OPERATION BltOperation, - IN UINTN SourceX, - IN UINTN SourceY, - IN UINTN DestinationX, - IN UINTN DestinationY, - IN UINTN Width, - IN UINTN Height, - IN UINTN Delta OPTIONAL - ); - -/// -/// This protocol provides a basic abstraction to set video modes and -/// copy pixels to and from the graphics controller's frame buffer. -/// -struct _EFI_UGA_DRAW_PROTOCOL { - EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode; - EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode; - EFI_UGA_DRAW_PROTOCOL_BLT Blt; -}; - -extern EFI_GUID gEfiUgaDrawProtocolGuid; - -#endif diff --git a/MdePkg/Include/Protocol/UgaIo.h b/MdePkg/Include/Protocol/UgaIo.h deleted file mode 100644 index ffc5b3abe9fa..000000000000 --- a/MdePkg/Include/Protocol/UgaIo.h +++ /dev/null @@ -1,189 +0,0 @@ -/** @file - UGA IO protocol from the EFI 1.10 specification. - - Abstraction of a very simple graphics device. - - Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
- SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __UGA_IO_H__ -#define __UGA_IO_H__ - -#define EFI_UGA_IO_PROTOCOL_GUID \ - { 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } } - -typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL; - -typedef UINT32 UGA_STATUS; - -typedef enum { - UgaDtParentBus = 1, - UgaDtGraphicsController, - UgaDtOutputController, - UgaDtOutputPort, - UgaDtOther -} UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE; - -typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID; - -typedef struct { - UGA_DEVICE_TYPE deviceType; - UGA_DEVICE_ID deviceId; - UINT32 ui32DeviceContextSize; - UINT32 ui32SharedContextSize; -} UGA_DEVICE_DATA, *PUGA_DEVICE_DATA; - -typedef struct _UGA_DEVICE { - VOID *pvDeviceContext; - VOID *pvSharedContext; - VOID *pvRunTimeContext; - struct _UGA_DEVICE *pParentDevice; - VOID *pvBusIoServices; - VOID *pvStdIoServices; - UGA_DEVICE_DATA deviceData; -} UGA_DEVICE, *PUGA_DEVICE; - -typedef enum { - UgaIoGetVersion = 1, - UgaIoGetChildDevice, - UgaIoStartDevice, - UgaIoStopDevice, - UgaIoFlushDevice, - UgaIoResetDevice, - UgaIoGetDeviceState, - UgaIoSetDeviceState, - UgaIoSetPowerState, - UgaIoGetMemoryConfiguration, - UgaIoSetVideoMode, - UgaIoCopyRectangle, - UgaIoGetEdidSegment, - UgaIoDeviceChannelOpen, - UgaIoDeviceChannelClose, - UgaIoDeviceChannelRead, - UgaIoDeviceChannelWrite, - UgaIoGetPersistentDataSize, - UgaIoGetPersistentData, - UgaIoSetPersistentData, - UgaIoGetDevicePropertySize, - UgaIoGetDeviceProperty, - UgaIoBtPrivateInterface -} UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE; - -typedef struct { - IN UGA_IO_REQUEST_CODE ioRequestCode; - IN VOID *pvInBuffer; - IN UINT64 ui64InBufferSize; - OUT VOID *pvOutBuffer; - IN UINT64 ui64OutBufferSize; - OUT UINT64 ui64BytesReturned; -} UGA_IO_REQUEST, *PUGA_IO_REQUEST; - -/** - Dynamically allocate storage for a child UGA_DEVICE. - - @param[in] This The EFI_UGA_IO_PROTOCOL instance. - @param[in] ParentDevice ParentDevice specifies a pointer to the parent device of Device. - @param[in] DeviceData A pointer to UGA_DEVICE_DATA returned from a call to DispatchService() - with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice. - @param[in] RunTimeContext Context to associate with Device. - @param[out] Device The Device returns a dynamically allocated child UGA_DEVICE object - for ParentDevice. The caller is responsible for deleting Device. - - - @retval EFI_SUCCESS Device was returned. - @retval EFI_INVALID_PARAMETER One of the arguments was not valid. - @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UGA_IO_PROTOCOL_CREATE_DEVICE)( - IN EFI_UGA_IO_PROTOCOL *This, - IN UGA_DEVICE *ParentDevice, - IN UGA_DEVICE_DATA *DeviceData, - IN VOID *RunTimeContext, - OUT UGA_DEVICE **Device - ); - -/** - Delete a dynamically allocated child UGA_DEVICE object that was allocated via CreateDevice(). - - @param[in] This The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is - defined in Section 10.7. - @param[in] Device The Device points to a UGA_DEVICE object that was dynamically - allocated via a CreateDevice() call. - - - @retval EFI_SUCCESS Device was returned. - @retval EFI_INVALID_PARAMETER The Device was not allocated via CreateDevice(). - -**/ -typedef -EFI_STATUS -(EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE)( - IN EFI_UGA_IO_PROTOCOL *This, - IN UGA_DEVICE *Device - ); - -/** - This is the main UGA service dispatch routine for all UGA_IO_REQUEST s. - - @param pDevice pDevice specifies a pointer to a device object associated with a - device enumerated by a pIoRequest->ioRequestCode of type - UgaIoGetChildDevice. The root device for the EFI_UGA_IO_PROTOCOL - is represented by pDevice being set to NULL. - - @param pIoRequest - pIoRequest points to a caller allocated buffer that contains data - defined by pIoRequest->ioRequestCode. See Related Definitions for - a definition of UGA_IO_REQUEST_CODE s and their associated data - structures. - - @return UGA_STATUS - -**/ -typedef UGA_STATUS -(EFIAPI *PUGA_FW_SERVICE_DISPATCH)( - IN PUGA_DEVICE pDevice, - IN OUT PUGA_IO_REQUEST pIoRequest - ); - -/// -/// Provides a basic abstraction to send I/O requests to the graphics device and any of its children. -/// -struct _EFI_UGA_IO_PROTOCOL { - EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice; - EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice; - PUGA_FW_SERVICE_DISPATCH DispatchService; -}; - -extern EFI_GUID gEfiUgaIoProtocolGuid; - -// -// Data structure that is stored in the EFI Configuration Table with the -// EFI_UGA_IO_PROTOCOL_GUID. The option ROMs listed in this table may have -// EBC UGA drivers. -// -typedef struct { - UINT32 Version; - UINT32 HeaderSize; - UINT32 SizeOfEntries; - UINT32 NumberOfEntries; -} EFI_DRIVER_OS_HANDOFF_HEADER; - -typedef enum { - EfiUgaDriverFromPciRom, - EfiUgaDriverFromSystem, - EfiDriverHandoffMax -} EFI_DRIVER_HANOFF_ENUM; - -typedef struct { - EFI_DRIVER_HANOFF_ENUM Type; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - VOID *PciRomImage; - UINT64 PciRomSize; -} EFI_DRIVER_OS_HANDOFF; - -#endif diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h index 4365282cf213..b98f66e110c9 100644 --- a/MdePkg/Library/UefiLib/UefiLibInternal.h +++ b/MdePkg/Library/UefiLib/UefiLibInternal.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c index 39edeb7283dd..2189ef87b4f0 100644 --- a/MdePkg/Library/UefiLib/UefiLibPrint.c +++ b/MdePkg/Library/UefiLib/UefiLibPrint.c @@ -344,20 +344,14 @@ InternalPrintGraphic ( EFI_STATUS Status; UINT32 HorizontalResolution; UINT32 VerticalResolution; - UINT32 ColorDepth; - UINT32 RefreshRate; EFI_HII_FONT_PROTOCOL *HiiFont; EFI_IMAGE_OUTPUT *Blt; EFI_FONT_DISPLAY_INFO FontInfo; EFI_HII_ROW_INFO *RowInfoArray; UINTN RowInfoArraySize; EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto; EFI_HANDLE ConsoleHandle; - UINTN Width; - UINTN Height; - UINTN Delta; HorizontalResolution = 0; VerticalResolution = 0; @@ -374,20 +368,6 @@ InternalPrintGraphic ( (VOID **)&GraphicsOutput ); - UgaDraw = NULL; - if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) { - // - // If no GOP available, try to open UGA Draw protocol if supported. - // - GraphicsOutput = NULL; - - Status = gBS->HandleProtocol ( - ConsoleHandle, - &gEfiUgaDrawProtocolGuid, - (VOID **)&UgaDraw - ); - } - if (EFI_ERROR (Status)) { goto Error; } @@ -405,8 +385,6 @@ InternalPrintGraphic ( if (GraphicsOutput != NULL) { HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution; VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution; - } else if ((UgaDraw != NULL) && FeaturePcdGet (PcdUgaConsumeSupport)) { - UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate); } else { goto Error; } @@ -466,73 +444,6 @@ InternalPrintGraphic ( if (EFI_ERROR (Status)) { goto Error; } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - ASSERT (UgaDraw != NULL); - - // - // Ensure Width * Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) doesn't overflow. - // - if (Blt->Width > DivU64x32 (MAX_UINTN, Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))) { - goto Error; - } - - Blt->Image.Bitmap = AllocateZeroPool ((UINT32)Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); - ASSERT (Blt->Image.Bitmap != NULL); - - // - // StringToImage only support blt'ing image to device using GOP protocol. If GOP is not supported in this platform, - // we ask StringToImage to print the string to blt buffer, then blt to device using UgaDraw. - // - Status = HiiFont->StringToImage ( - HiiFont, - EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLIP | - EFI_HII_OUT_FLAG_CLIP_CLEAN_X | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y | - EFI_HII_IGNORE_LINE_BREAK, - Buffer, - &FontInfo, - &Blt, - PointX, - PointY, - &RowInfoArray, - &RowInfoArraySize, - NULL - ); - - if (!EFI_ERROR (Status)) { - ASSERT (RowInfoArray != NULL); - // - // Explicit Line break characters are ignored, so the updated parameter RowInfoArraySize by StringToImage will - // always be 1 or 0 (if there is no valid Unicode Char can be printed). ASSERT here to make sure. - // - ASSERT (RowInfoArraySize <= 1); - - if (RowInfoArraySize != 0) { - Width = RowInfoArray[0].LineWidth; - Height = RowInfoArray[0].LineHeight; - Delta = Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); - } else { - Width = 0; - Height = 0; - Delta = 0; - } - - Status = UgaDraw->Blt ( - UgaDraw, - (EFI_UGA_PIXEL *)Blt->Image.Bitmap, - EfiUgaBltBufferToVideo, - PointX, - PointY, - PointX, - PointY, - Width, - Height, - Delta - ); - } else { - goto Error; - } - - FreePool (Blt->Image.Bitmap); } else { goto Error; } diff --git a/MdePkg/MdePkg.uni b/MdePkg/MdePkg.uni index 5c1fa24065c7..7b00a396848c 100644 --- a/MdePkg/MdePkg.uni +++ b/MdePkg/MdePkg.uni @@ -373,12 +373,6 @@ "TRUE - Deprecate global variable LangCodes.
\n" "FALSE - Does not deprecate global variable LangCodes.
" -#string STR_gEfiMdePkgTokenSpaceGuid_PcdUgaConsumeSupport_PROMPT #language en-US "Consume UGA Draw Protocol" - -#string STR_gEfiMdePkgTokenSpaceGuid_PcdUgaConsumeSupport_HELP #language en-US "Indicates if UGA Draw Protocol is still consumed.

\n" - "TRUE - Consume UGA Draw protocol.
\n" - "FALSE - Does not consume UGA Draw protocol.
" - #string STR_gEfiMdePkgTokenSpaceGuid_PcdVerifyNodeInList_PROMPT #language en-US "Verify Node In List" #string STR_gEfiMdePkgTokenSpaceGuid_PcdVerifyNodeInList_HELP #language en-US "Indicates if a check will be made to see if a specified node is a member of linked list in the following BaseLib functions: GetNextNode(), IsNull(), IsNodeAtEnd(), SwapListEntries().

\n" -- 2.30.0.windows.2