From nobody Mon Feb 9 12:15:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58854+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58854+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588927131; cv=none; d=zohomail.com; s=zohoarc; b=SI/0/Km0lJ/hUdH3sPTL2TSNDO4aFHs1CDVDp7TZhoinuRH6AP9fIfyms68roKhr09dKXC80mv8kkRh5Sg+FMt7XneqJPbCnoD7+E9+/UK1lfFyIIpBe2RF/CVr+T51YShoKbx88hmnYoVk9rGJImrGjmPpEMO/q+6NVO9zvhjU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588927131; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=9lyz+L2DXCq5ViGajpHhjtsdRAD3tCBNzl+oqV1BbSw=; b=e6w65RfGjgR2CHO8juSBZ4n+mx/VVEAuKYyuQWD0BdHxT8paYcfCwDmgvO4UgmvjnaccvMFgFhZc9l38IIm2Au+LUgsE8rWZiz7KjxATbX0K8f5GZB7Cf7uj/8liHXP+kbtNpR5DQsDmvJtLMPL0fKmIak7iZPZC9HvVIa6/E7w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58854+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588927131885517.6059710780848; Fri, 8 May 2020 01:38:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id q68CYY1788612x5PrBUlfbzX; Fri, 08 May 2020 01:38:51 -0700 X-Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web12.6878.1588927126653624329 for ; Fri, 08 May 2020 01:38:49 -0700 IronPort-SDR: bz6kfng31E5fiu5yd0ggtYxztajfF8Sv5NMsyqh0p5E0jXoI9qzlE4djR8t7nPtteADlIKKkNe v/dKxVRzd0wg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-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:44 -0700 IronPort-SDR: YNRLYpCWgyBF7Pn5XcSJjb7wNG14cxY62iys1j38+3WnnEQM5P9x3X633rCqYI78BLARNjlOnO Z0yu/hgwmeiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,367,1583222400"; d="scan'208";a="305366621" X-Received: from guominji-mobl.ccr.corp.intel.com ([10.238.4.95]) by FMSMGA003.fm.intel.com with ESMTP; 08 May 2020 01:38:43 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: GuoMinJ , Michael D Kinney , Liming Gao Subject: [edk2-devel] [PATCH 11/18] MdePkg: Remove All UGA Support Date: Fri, 8 May 2020 16:38:17 +0800 Message-Id: <20200508083824.1785-12-guomin.jiang@intel.com> In-Reply-To: <20200508083824.1785-1-guomin.jiang@intel.com> References: <20200508083824.1785-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: brQLLntCRwJSjB20xg5r9hx8x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588927131; bh=p16qnpWNNbj0MQW3Yggxhgjt1JcZ1VYkYxpGb5ABjik=; h=Cc:Date:From:Reply-To:Subject:To; b=fwbuqdDSc6LMSdQuPfQTOHmBiWgBA8JvbKYJFsNQm3e8R/OAGHR2p+kgho/rjdHMEAw M6mUsadgXrAeI+zY39C53uVb8lA3M57B9EBrzjKrhbPiuqJFQVnU7wu8lYvxgTITFT5mE 9zQqXeUC/Sqv6zbc/yq9TatlObdeBMsHIU4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: GuoMinJ REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2368 Remove All UGA Support in MdePkg. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Guomin Jiang --- MdePkg/Include/Protocol/UgaDraw.h | 160 ------------------- MdePkg/Include/Protocol/UgaIo.h | 191 ----------------------- MdePkg/Library/UefiLib/UefiLib.inf | 2 - MdePkg/Library/UefiLib/UefiLibInternal.h | 1 - MdePkg/Library/UefiLib/UefiLibPrint.c | 88 ----------- MdePkg/MdePkg.dec | 12 -- MdePkg/MdePkg.dsc | 3 - MdePkg/MdePkg.uni | 6 - 8 files changed, 463 deletions(-) delete mode 100644 MdePkg/Include/Protocol/UgaDraw.h delete mode 100644 MdePkg/Include/Protocol/UgaIo.h diff --git a/MdePkg/Include/Protocol/UgaDraw.h b/MdePkg/Include/Protocol/Ug= aDraw.h deleted file mode 100644 index 3d423be052c5..000000000000 --- a/MdePkg/Include/Protocol/UgaDraw.h +++ /dev/null @@ -1,160 +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 define= d 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 Set= Mode () - @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 SetM= ode () - -**/ -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 (Sou= rceX, SourceY) - ///< directly to every pixel of the video disp= lay rectangle - ///< (DestinationX, DestinationY) (Destination= X + Width, DestinationY + Height). - ///< Only one pixel will be used from the BltB= uffer. Delta is NOT used. - - EfiUgaVideoToBltBuffer, ///< Read data from the video display rectangle - ///< (SourceX, SourceY) (SourceX + Width, Sour= ceY + Height) and place it in - ///< the BltBuffer rectangle (DestinationX, De= stinationY ) - ///< (DestinationX + Width, DestinationY + Hei= ght). 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, Sour= ceY + Height) directly to the - ///< video display rectangle (DestinationX, De= stinationY) - ///< (DestinationX + Width, DestinationY + Hei= ght). If SourceX or SourceY is - ///< not zero then Delta must be set to the le= ngth in bytes of a row in the - ///< BltBuffer. - - EfiUgaVideoToVideo, ///< Copy from the video display rectangle (So= urceX, SourceY) - ///< (SourceX + Width, SourceY + Height) .to t= he video display rectangle - ///< (DestinationX, DestinationY) (Destination= X + Width, DestinationY + Height). - ///< The BltBuffer and Delta are not used in = this mode. - - EfiUgaBltMax ///< Maxmimum value for enumration value of Bl= t 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 b= uffer. This - buffer has a size of Width*Height*sizeof(EF= I_UGA_PIXEL) - @param[in] BltOperation - Operation to perform on BlitBuffer and vide= o 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 BltBuff= er. - @param[in] DestinationY - Y coordinate of destination for the BltBuff= er. - @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 occured writting to t= he 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/UgaI= o.h deleted file mode 100644 index 67a6abd226c9..000000000000 --- a/MdePkg/Include/Protocol/UgaIo.h +++ /dev/null @@ -1,191 +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 =3D 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 =3D 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 p= arent device of Device. - @param[in] DeviceData A pointer to UGA_DEVICE_DATA returned fro= m a call to DispatchService() - with a UGA_DEVICE of Parent and an IoRequ= est of type UgaIoGetChildDevice. - @param[in] RunTimeContext Context to associate with Device. - @param[out] Device The Device returns a dynamically allocate= d child UGA_DEVICE object - for ParentDevice. The caller is responsib= le 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 com= plete 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 allocate= d via CreateDevice(). - - @param[in] This The EFI_UGA_IO_PROTOCOL instance. Type EF= I_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 CreateDe= vice(). - -**/ -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_P= ROTOCOL - is represented by pDevice being set to NULL. - - @param pIoRequest - pIoRequest points to a caller allocated buffer that conta= ins data - defined by pIoRequest->ioRequestCode. See Related Definit= ions for - a definition of UGA_IO_REQUEST_CODE s and their associate= d 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 devi= ce 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/UefiLib.inf b/MdePkg/Library/UefiLib/Ue= fiLib.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 gEfiGraphicsOutputProto= colGuid uninstalled gEfiComponentNameProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdCompone= ntNameDisable ## SOMETIMES_PRODUCES # User chooses to produce it gEfiComponentName2ProtocolGuid | NOT gEfiMdePkgTokenSpaceGuid.PcdCompone= ntName2Disable ## SOMETIMES_PRODUCES # User chooses to produce it gEfiDriverConfigurationProtocolGuid ## SOMETI= MES_PRODUCES # User chooses to produce it @@ -84,5 +83,4 @@ [FeaturePcd] gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable ## CONSUMES gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable ## CONSUMES - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport ## CONSUMES =20 diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/Uefi= Lib/UefiLibInternal.h index 60b5297c7516..ed6b69030361 100644 --- a/MdePkg/Library/UefiLib/UefiLibInternal.h +++ b/MdePkg/Library/UefiLib/UefiLibInternal.h @@ -19,7 +19,6 @@ #include #include #include -#include #include =20 #include diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib= /UefiLibPrint.c index ae3a94eb0ca0..90dde0778e81 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; =20 HorizontalResolution =3D 0; VerticalResolution =3D 0; @@ -373,20 +367,6 @@ InternalPrintGraphic ( &gEfiGraphicsOutputProtocolGuid, (VOID **) &GraphicsOutput ); - - UgaDraw =3D NULL; - if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) { - // - // If no GOP available, try to open UGA Draw protocol if supported. - // - GraphicsOutput =3D NULL; - - Status =3D gBS->HandleProtocol ( - ConsoleHandle, - &gEfiUgaDrawProtocolGuid, - (VOID **) &UgaDraw - ); - } if (EFI_ERROR (Status)) { goto Error; } @@ -404,8 +384,6 @@ InternalPrintGraphic ( if (GraphicsOutput !=3D NULL) { HorizontalResolution =3D GraphicsOutput->Mode->Info->HorizontalResolut= ion; VerticalResolution =3D GraphicsOutput->Mode->Info->VerticalResolution; - } else if (UgaDraw !=3D NULL && FeaturePcdGet (PcdUgaConsumeSupport)) { - UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution,= &ColorDepth, &RefreshRate); } else { goto Error; } @@ -464,72 +442,6 @@ InternalPrintGraphic ( if (EFI_ERROR (Status)) { goto Error; } - - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - ASSERT (UgaDraw!=3D NULL); - - // - // Ensure Width * Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) does= n't overflow. - // - if (Blt->Width > DivU64x32 (MAX_UINTN, Blt->Height * sizeof (EFI_GRAPH= ICS_OUTPUT_BLT_PIXEL))) { - goto Error; - } - - Blt->Image.Bitmap =3D AllocateZeroPool ((UINT32) Blt->Width * Blt->Hei= ght * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); - ASSERT (Blt->Image.Bitmap !=3D NULL); - - // - // StringToImage only support blt'ing image to device using GOP proto= col. If GOP is not supported in this platform, - // we ask StringToImage to print the string to blt buffer, then blt t= o device using UgaDraw. - // - Status =3D HiiFont->StringToImage ( - HiiFont, - EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLI= P | - 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 !=3D NULL); - // - // Explicit Line break characters are ignored, so the updated parame= ter RowInfoArraySize by StringToImage will - // always be 1 or 0 (if there is no valid Unicode Char can be printe= d). ASSERT here to make sure. - // - ASSERT (RowInfoArraySize <=3D 1); - - if (RowInfoArraySize !=3D 0) { - Width =3D RowInfoArray[0].LineWidth; - Height =3D RowInfoArray[0].LineHeight; - Delta =3D Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL); - } else { - Width =3D 0; - Height =3D 0; - Delta =3D 0; - } - Status =3D 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.dec b/MdePkg/MdePkg.dec index 0b9c4bc40ace..5d19b1182c85 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1374,12 +1374,6 @@ [Protocols] ## Include/Protocol/EdidOverride.h gEfiEdidOverrideProtocolGuid =3D { 0x48ECB431, 0xFB72, 0x45C0, { 0xA9,= 0x22, 0xF4, 0x58, 0xFE, 0x04, 0x0B, 0xD5 }} =20 - ## Include/Protocol/UgaIo.h - gEfiUgaIoProtocolGuid =3D { 0x61A4D49E, 0x6F68, 0x4F1B, { 0xB9,= 0x22, 0xA8, 0x6E, 0xED, 0x0B, 0x07, 0xA2 }} - - ## Include/Protocol/UgaDraw.h - gEfiUgaDrawProtocolGuid =3D { 0x982C298B, 0xF4FA, 0x41CB, { 0xB8,= 0x38, 0x77, 0xAA, 0x68, 0x8F, 0xB8, 0x39 }} - ## Include/Protocol/LoadedImage.h gEfiLoadedImageProtocolGuid =3D { 0x5B1B31A1, 0x9562, 0x11D2, { 0x8E,= 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }} =20 @@ -1857,12 +1851,6 @@ [PcdsFeatureFlag] # @Prompt Deprecate Global Variable LangCodes. gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultLangDeprecate|FALSE|BOOLE= AN|0x00000012 =20 - ## 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 mem= ber of linked list # in the following BaseLib functions: GetNextNode(), IsNull(), IsNodeAt= End(), SwapListEntries().

# TRUE - Verify a specified node is a member of linked list.
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index 6cd38e7ec3c9..3c2420cba29c 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -21,9 +21,6 @@ [Defines] =20 !include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc =20 -[PcdsFeatureFlag] - gEfiMdePkgTokenSpaceGuid.PcdUgaConsumeSupport|TRUE - [PcdsFixedAtBuild] gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000 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.=
" =20 -#string STR_gEfiMdePkgTokenSpaceGuid_PcdUgaConsumeSupport_PROMPT #languag= e 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" =20 #string STR_gEfiMdePkgTokenSpaceGuid_PcdVerifyNodeInList_HELP #language e= n-US "Indicates if a check will be made to see if a specified node is a mem= ber of linked list in the following BaseLib functions: GetNextNode(), IsNul= l(), IsNodeAtEnd(), SwapListEntries().

\n" --=20 2.25.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58854): https://edk2.groups.io/g/devel/message/58854 Mute This Topic: https://groups.io/mt/74068787/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-