From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web08.19540.1657698591100399283 for ; Wed, 13 Jul 2022 00:49:51 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Y4pQThlJ; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657698591; x=1689234591; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=COyV9IqGT2zOF2v6zB3bfMb++moO3vyOIDDi7M3NxvI=; b=Y4pQThlJ7tKD+2SZuf9SrohEcczH137gRRXt7bNYAOuCJvWNrvg6JPnE 8hzetXmR87d3TlkX/xkaGcOXVDY3P3a2bHQgbsd99M7y3F3da/BZlUBpJ wr3lnUl7xelYAQldlsygk392QOgWjIaBcM+Gd6IHUSDk+0V9H6bdjfR+w kr3r9ZoFE9KIiucNtygMOhiEHoTHJZDFNqkF8xhQVvfm6fMWnjuh3p7JC 07gOGDI/h+P0928liGTS51qOaMm/UyUW3Rtq07LsI4gWLcjhPRFyzMxC2 fBm9qS8V2AMaYhVcEAT0CzdA5SzHxDmgM8NFx5qwsPHTO8zFL6rrZTKSL Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10406"; a="265551870" X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="265551870" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 00:49:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="545745510" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 13 Jul 2022 00:49:49 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Jul 2022 00:49:49 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Jul 2022 00:49:48 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 13 Jul 2022 00:49:48 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.44) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 13 Jul 2022 00:49:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SbmRkDo+SFAAqwRuTg6b0us/5wvNt2+8GFpggMq6hXXGreKpD8cNS+DWu4LZVIxXBKdYmQX/IaxzKEEOLdDwDTmiU4Otl67hcRpA43+ErQyQrfQrCnUO8cbxRBimnNM25hAiQsdo04JLjIjVQLLbpYNoS+XTI7HoiexJ+xA5dL4KVMMD0jkbmuf/Ggg8v6WBOcKY7aBTtKWiKTCmrSJqHGip9TaFZD0tgfQOuE58JR8Zs7a1zKj33fLMbIvhmRsl1/DEvCvvCo8I416LOBPRG1lmzF14Srg08PcTLTPgZuMEwmmor3DvmJ6Y2ubv526LdkiEhHy0pRKvwDSw1ufPIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cI+Jh4tOlWKk+ehRzyANLgK0quwkHGCKKH99ZzvQMtg=; b=H207O/E2EQEMmTMtFVFssup9BmHj1x/8jegXkz/HjwOGwVm2Xx228xrg3uxfdse39ivjdPD6MRnMc6UXGLr9ugtO019zB7m7G+Omy8uQrUNtCxE2eCNhZ3Vtix3syD+Eke30OtlCJWWLe2i75F0USiF/cpSD2VggOCKlJIP0v1YsV/qFCc4AxuRaSffJ8C2dAXvA3Goe4cTvMvp4VN0C/0mXkoi8vJyBOmL6uoKeduWWCsmzHUKw5wVWVc6eYP4AZfziCimYqSnr7UGGPCpuVMM8/ZoCh0ft7q+5VG+V46lwPUsDY14b7T6weJZzZm8U4PvCvgVwWoole+M5f2kjCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by DM4PR11MB5487.namprd11.prod.outlook.com (2603:10b6:5:39f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20; Wed, 13 Jul 2022 07:49:46 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174%10]) with mapi id 15.20.5417.026; Wed, 13 Jul 2022 07:49:46 +0000 From: "Ni, Ray" To: "Jiang, Guomin" , "devel@edk2.groups.io" Subject: Re: [edk2-platforms Patch v2 3/3] OptionRomPkg: Remove all UGA support Thread-Topic: [edk2-platforms Patch v2 3/3] OptionRomPkg: Remove all UGA support Thread-Index: AQHYloq8PHO7OvAGtkalOGU+F+W9+a177RYw Date: Wed, 13 Jul 2022 07:49:46 +0000 Message-ID: References: <20220713073200.1710-1-guomin.jiang@intel.com> <20220713073200.1710-4-guomin.jiang@intel.com> In-Reply-To: <20220713073200.1710-4-guomin.jiang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 29dc1adf-f535-49c2-b0ba-08da64a441c1 x-ms-traffictypediagnostic: DM4PR11MB5487:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Um20x9e8oWL5vcYXkgCIXnPSBBzQdWwrqWABBgZmm7bM1XBxeVwedu9UstwGRlfwg5Ac3nWoCZbcq6kTEKO+B5hKYHyloL8ZzE4euZ5KFXQCpgjJyvpV4Tvn+HX07DnV8Hzb0FQKruCrd2CGLUiU9sApG8CYoTDtcCxaJJRtWp0VQGg+xq3drLaSe8jyYbzgI3SRdrJ5Qnm5WSSNA+fHs7/NWrKTytrGL2YMV+IpCoyVyA4X24iJWvsI2zpY4b/fRhSdLDrzN15+JGQsAb+26mqvFf0kLIcnFzZHKhUz8Y6obX6fHi95OxbTjMfK2Lysigv6MSMzpl82zXAkimWCJOPx4OHYULLXWlkIORGf4om/8eRUXVXhlqFJD6qLDBl9YhboyCy8igrYQOL9v6yw/IaF68bxb5Krn5JO3cvr6qyzTJ6+iFKR0pm113IPENPIVglxbNWTmeyN3+jUHgkTanamhGhGwybJMXVo9f/Q63matWFOTmO8rDyCcXq0D1gY1dlCaBGj8g/qzyWuym0Ekl8eEzQpgHCNVrgmxiIPya0572qQpp6jPHqTQwU6JL91xt9SNrUnCsEfMgThYJEwaGLrOB282aaXNhELC+h8SM6CLD6Ztdc+dY2i+FvTFZLQcRvafVUxJ16HpxGJ68xrd/nmBEjiwEU9mZ4ZeJdLHdP1PNDbAWdxizctgL12Pbfj+lLsMFuZSGhAK6SaKPy4eaKxaqCR4I79X/Dbyi5Mm0oVh6btfM4euNPgnHjk5CtIPTR8Em2FGak/TzrHlvteFCEDAgUFx/HQcnwbki4tZTcmJS7ewQHcvVVZnROCSAYAqVu+uLMCCuLcnb6v2cWZUnwgJrukWxzxIsyC8v/bZ5Ns0DjvOuA4sG41XZTg4IMy x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(136003)(346002)(39860400002)(396003)(376002)(5660300002)(53546011)(6506007)(52536014)(30864003)(26005)(8936002)(38070700005)(83380400001)(9686003)(2906002)(82960400001)(55016003)(38100700002)(122000001)(478600001)(110136005)(966005)(71200400001)(33656002)(45080400002)(66446008)(66476007)(41300700001)(19627235002)(86362001)(316002)(8676002)(66556008)(66946007)(76116006)(186003)(64756008)(7696005)(579004)(559001)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7dXx9m4mGFrF/an3NWu7GgIOyAgAfSrlTWKyUNg6FK5oWfbjg25816bYSDTL?= =?us-ascii?Q?CAIrwl6ConN9/HCIy4l51qJGbRBfOOY97/hLInzqQ6Fyi41F+dqH9Pa6zX80?= =?us-ascii?Q?8aPQFVsvnwd6jljFpBOkMwEukJnnDKOr+SMB7pZaLG89Z09Qz9uIaj6WTabW?= =?us-ascii?Q?HPTgqIvt/NXlhrfD1GrSRodA/W7m0ttxoDJgrCAQqtp9oJk7oviiWVN6r8Lw?= =?us-ascii?Q?VvK5IM+ep0bgwZNK5LoKHgAzqIxR8K6srRDG6FN75L7Ytd2igjJwdz8jt22T?= =?us-ascii?Q?UHnzmip9apL8V5AowOF3y6hETbU8EIa59TB9rMqfkHdvgp5kjHfwuaPue5O1?= =?us-ascii?Q?VvIR7uJz0lfRg4YXUBbdX/qQWekIjcGyXfAK95aevHlByZHi4u1HkMFrMBDK?= =?us-ascii?Q?aX1rehu0RZGJAhiXdsI5SxYvR8W4pOlF39lPqikFHrGT7usstIZoS1p6oBml?= =?us-ascii?Q?vrF2E1L14PwPcR0WWcZ+MTf6eMBf0ZCF4SbtXJvNehtO2jxVFEXVZmdOaOaX?= =?us-ascii?Q?U6h7DFep0nz7JnQdUYheRcyL8qEA4M0Un7YZvVG8vERh1lSrfj66fwbhPKUD?= =?us-ascii?Q?izxnxTfwpOK0NhX2Gk7YGk4/Jg++GLqzQ/hcg9LZ7qzzk+yrjnessWPnwZEM?= =?us-ascii?Q?nRtBdaMbuu0ypfpsehK7jqIyBQ2GU5mOv37GdkmZW5vgeFIyhPOyLLQm53kq?= =?us-ascii?Q?XaH7W2g57KuT2rwlN496DA0gG2w4VRIIGDaMQ9nGA9IyKjjX3gmJjiiuviaF?= =?us-ascii?Q?KZ+Qye9wN8Jqbso9INJ/Eh1hqftX881f9Pa1DCGHop07MACmJfpJo2SZpRBz?= =?us-ascii?Q?RHregKCWzFSI+cbJEhwsAcAl7MkyoU1qT2cj30/TX/SHR17AEjJ7Q43eAcDn?= =?us-ascii?Q?ORzd4NqO4scV555ldnN5KUNFDW2hxSYyhUimt8C9BWa8EZZLMVUO2iv2xWkm?= =?us-ascii?Q?zk3Xd7tpa+zfJLI/S0yVijXFCAV9942NtSb6UWQhIdj/j3Ptt6r5j63vfYTg?= =?us-ascii?Q?YIl3H7K4XpdFJCyBF5EbFxuS/qu4VdcZYPu/1gnqqA5Mpm7e29jRoZjr2DQf?= =?us-ascii?Q?KOC1Tnb+PhQV3lrbi2dY6o1ukqvWhFqS1g5otfWBi+4I5YFbxLl3t3yV3d6P?= =?us-ascii?Q?4/U4mG4nW9LiNloK5GtGayKTbw9YmUsRvUnqAUMVGM953GnJuHCnaJfIIhL3?= =?us-ascii?Q?ivYZo+ZJmhqOSln2/l3yKex7ta92lUFsaF4lvRI3ba+rId2dSyFcveP3HnIh?= =?us-ascii?Q?4vZ7GMPbG+37gytkc977X4vzbQ7+hXi+07s3UPNV3FAjidlHVhXEW/2XJJAn?= =?us-ascii?Q?jrCe1USQF59dHGyh2LXtZ5FSvjI7wTDz0Omhq5vNuhfei9ZHw0LBR2KI7Rul?= =?us-ascii?Q?LcLcnMAhjuvImwZJ+6yNfnuD6ECAsGx8KZuoM9CG94J/8b6qPw068hjoL2Cr?= =?us-ascii?Q?snw8COD9G5Ac3qq8VcJsdHtGAMfmrY8mcqMG/d5Trl6T6miNjLIL76tFBbvQ?= =?us-ascii?Q?kM3T8HHPUaMBdzRJpARl+nirODqM4MzV4r0SmNfdKJL6y5WWmdHRqSls0TYA?= =?us-ascii?Q?qkZK7PEztqGcHx1b10B9DekYGrgJMfgonSvcTO1V?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29dc1adf-f535-49c2-b0ba-08da64a441c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 07:49:46.6817 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AVUN0XPUv7hrkeG907wXe5MQvpKqAF2rnq8vhgj3CS4eLVJlXgLSuYCI4bb72H8ygzEkRcTTs2pthjRvmgW6Gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5487 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Jiang, Guomin > Sent: Wednesday, July 13, 2022 3:32 PM > To: devel@edk2.groups.io > Cc: Ni, Ray > Subject: [edk2-platforms Patch v2 3/3] OptionRomPkg: Remove all UGA suppo= rt >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2368 >=20 > Remove all UGA support >=20 > Cc: Ray Ni > Signed-off-by: Guomin Jiang > --- > .../CirrusLogic5430Dxe/CirrusLogic5430.c | 91 +--- > .../CirrusLogic5430Dxe/CirrusLogic5430.h | 21 +- > .../CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf | 9 +- > .../CirrusLogic5430UgaDraw.c | 412 ------------------ > Drivers/OptionRomPkg/OptionRomPkg.dec | 3 - > 5 files changed, 3 insertions(+), 533 deletions(-) > delete mode 100644 Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic54= 30UgaDraw.c >=20 > diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c > b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c > index 4e7830ea94b3..48e0c012957a 100644 > --- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c > +++ b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.c > @@ -11,7 +11,7 @@ > documentation on UGA for details on how to write a UGA driver that is = able > to function both in the EFI pre-boot environment and from the OS runti= me. >=20 > - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -316,7 +316,6 @@ CirrusLogic5430ControllerDriverStart ( > goto Error; > } >=20 > - if (FeaturePcdGet (PcdSupportGop)) { > // > // Set Gop Device Path > // > @@ -357,7 +356,6 @@ CirrusLogic5430ControllerDriverStart ( > NULL > ); > } > - } >=20 > // > // Construct video mode buffer > @@ -367,24 +365,6 @@ CirrusLogic5430ControllerDriverStart ( > goto Error; > } >=20 > - if (FeaturePcdGet (PcdSupportUga)) { > - // > - // Start the UGA Draw software stack. > - // > - Status =3D CirrusLogic5430UgaDrawConstructor (Private); > - ASSERT_EFI_ERROR (Status); > - > - Private->UgaDevicePath =3D ParentDevicePath; > - Status =3D gBS->InstallMultipleProtocolInterfaces ( > - &Controller, > - &gEfiUgaDrawProtocolGuid, > - &Private->UgaDraw, > - &gEfiDevicePathProtocolGuid, > - Private->UgaDevicePath, > - NULL > - ); > - > - } else if (FeaturePcdGet (PcdSupportGop)) { > if (Private->GopDevicePath =3D=3D NULL) { > // > // If RemainingDevicePath is the End of Device Path Node, > @@ -410,14 +390,6 @@ CirrusLogic5430ControllerDriverStart ( > NULL > ); > } > - } else { > - // > - // This driver must support eithor GOP or UGA or both. > - // > - ASSERT (FALSE); > - Status =3D EFI_UNSUPPORTED; > - } > - >=20 > Error: > if (EFI_ERROR (Status)) { > @@ -470,55 +442,11 @@ CirrusLogic5430ControllerDriverStop ( > IN EFI_HANDLE *ChildHandleBuffer > ) > { > - EFI_UGA_DRAW_PROTOCOL *UgaDraw; > EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; >=20 > EFI_STATUS Status; > CIRRUS_LOGIC_5430_PRIVATE_DATA *Private; >=20 > - if (FeaturePcdGet (PcdSupportUga)) { > - Status =3D gBS->OpenProtocol ( > - Controller, > - &gEfiUgaDrawProtocolGuid, > - (VOID **) &UgaDraw, > - This->DriverBindingHandle, > - Controller, > - EFI_OPEN_PROTOCOL_GET_PROTOCOL > - ); > - if (EFI_ERROR (Status)) { > - return Status; > - } > - // > - // Get our private context information > - // > - Private =3D CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (UgaDr= aw); > - CirrusLogic5430UgaDrawDestructor (Private); > - > - if (FeaturePcdGet (PcdSupportGop)) { > - CirrusLogic5430GraphicsOutputDestructor (Private); > - // > - // Remove the UGA and GOP protocol interface from the system > - // > - Status =3D gBS->UninstallMultipleProtocolInterfaces ( > - Private->Handle, > - &gEfiUgaDrawProtocolGuid, > - &Private->UgaDraw, > - &gEfiGraphicsOutputProtocolGuid, > - &Private->GraphicsOutput, > - NULL > - ); > - } else { > - // > - // Remove the UGA Draw interface from the system > - // > - Status =3D gBS->UninstallMultipleProtocolInterfaces ( > - Private->Handle, > - &gEfiUgaDrawProtocolGuid, > - &Private->UgaDraw, > - NULL > - ); > - } > - } else { > Status =3D gBS->OpenProtocol ( > Controller, > &gEfiGraphicsOutputProtocolGuid, > @@ -542,13 +470,10 @@ CirrusLogic5430ControllerDriverStop ( > // > Status =3D gBS->UninstallMultipleProtocolInterfaces ( > Private->Handle, > - &gEfiUgaDrawProtocolGuid, > - &Private->UgaDraw, > &gEfiGraphicsOutputProtocolGuid, > &Private->GraphicsOutput, > NULL > ); > - } >=20 > if (EFI_ERROR (Status)) { > return Status; > @@ -582,20 +507,6 @@ CirrusLogic5430ControllerDriverStop ( > return EFI_SUCCESS; > } >=20 > -/** > - CirrusLogic5430UgaDrawDestructor > - > - TODO: Private - add argument and description to function comment > - TODO: EFI_SUCCESS - add return value to function comment > -**/ > -EFI_STATUS > -CirrusLogic5430UgaDrawDestructor ( > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private > - ) > -{ > - return EFI_SUCCESS; > -} > - > /** > TODO: Add function description >=20 > diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h > b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h > index 355f0418b3b5..5ec6bcf0d27b 100644 > --- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h > +++ b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h > @@ -1,7 +1,7 @@ > /** @file > Cirrus Logic 5430 Controller Driver >=20 > - Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -15,7 +15,6 @@ >=20 >=20 > #include > -#include > #include > #include > #include > @@ -86,12 +85,10 @@ typedef struct { > EFI_HANDLE Handle; > EFI_PCI_IO_PROTOCOL *PciIo; > UINT64 OriginalPciAttributes; > - EFI_UGA_DRAW_PROTOCOL UgaDraw; > EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput; > EFI_EDID_DISCOVERED_PROTOCOL EdidDiscovered; > EFI_EDID_ACTIVE_PROTOCOL EdidActive; > EFI_DEVICE_PATH_PROTOCOL *GopDevicePath; > - EFI_DEVICE_PATH_PROTOCOL *UgaDevicePath; > UINTN CurrentMode; > UINTN MaxMode; > CIRRUS_LOGIC_5430_MODE_DATA ModeData[CIRRUS_LOGIC_5430_MODE_= COUNT]; > @@ -112,9 +109,6 @@ typedef struct { > UINT8 MiscSetting; > } CIRRUS_LOGIC_5430_VIDEO_MODES; >=20 > -#define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS(a) \ > - CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, UgaDraw, CIRRUS_LOGIC_5430_PRIVA= TE_DATA_SIGNATURE) > - > #define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS(a) \ > CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, GraphicsOutput, CIRRUS_LOGIC_543= 0_PRIVATE_DATA_SIGNATURE) >=20 > @@ -152,19 +146,6 @@ extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gC= irrusLogic5430DriverSupporte > #define PALETTE_INDEX_REGISTER 0x3c8 > #define PALETTE_DATA_REGISTER 0x3c9 >=20 > -// > -// UGA Draw Hardware abstraction internal worker functions > -// > -EFI_STATUS > -CirrusLogic5430UgaDrawConstructor ( > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private > - ); > - > -EFI_STATUS > -CirrusLogic5430UgaDrawDestructor ( > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private > - ); > - > // > // Graphics Output Hardware abstraction internal worker functions > // > diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.i= nf > b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf > index 3e8b7b087f11..359ce486e5ba 100644 > --- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf > +++ b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430Dxe.inf > @@ -9,7 +9,7 @@ > # requires both the UGA Draw and the UGA I/O Protocol. Please refer to = Microsoft's > # documentation on UGA for details on how to write a UGA driver that is= able > # to function both in the EFI pre-boot environment and from the OS runt= ime. > -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
> # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -43,7 +43,6 @@ > [Sources] > ComponentName.c > DriverSupportedEfiVersion.c > - CirrusLogic5430UgaDraw.c > CirrusLogic5430GraphicsOutput.c > CirrusLogic5430.c > CirrusLogic5430.h > @@ -67,7 +66,6 @@ >=20 > [Protocols] > gEfiDriverSupportedEfiVersionProtocolGuid # PROTOCOL ALWAYS_PRODUC= ED > - gEfiUgaDrawProtocolGuid # PROTOCOL BY_START > gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START > gEfiEdidDiscoveredProtocolGuid # PROTOCOL BY_START > gEfiEdidActiveProtocolGuid # PROTOCOL BY_START > @@ -75,10 +73,5 @@ > gEfiPciIoProtocolGuid # PROTOCOL TO_START > gEfiEdidOverrideProtocolGuid # PROTOCOL TO_START >=20 > - > -[FeaturePcd] > - gOptionRomPkgTokenSpaceGuid.PcdSupportGop > - gOptionRomPkgTokenSpaceGuid.PcdSupportUga > - > [Pcd] > gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion > diff --git a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDr= aw.c > b/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDraw.c > deleted file mode 100644 > index bdcbd3450c5f..000000000000 > --- a/Drivers/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDraw.c > +++ /dev/null > @@ -1,412 +0,0 @@ > -/** @file > - This file produces the graphics abstration of UGA Draw. It is called b= y > - CirrusLogic5430.c file which deals with the EFI 1.1 driver model. > - This file just does graphics. > - > - Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
> - SPDX-License-Identifier: BSD-2-Clause-Patent > - > -**/ > - > -#include "CirrusLogic5430.h" > - > -// > -// UGA Draw Protocol Member Functions > -// > -EFI_STATUS > -EFIAPI > -CirrusLogic5430UgaDrawGetMode ( > - IN EFI_UGA_DRAW_PROTOCOL *This, > - OUT UINT32 *HorizontalResolution, > - OUT UINT32 *VerticalResolution, > - OUT UINT32 *ColorDepth, > - OUT UINT32 *RefreshRate > - ) > -{ > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private; > - > - Private =3D CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (This); > - > - if (Private->HardwareNeedsStarting) { > - return EFI_NOT_STARTED; > - } > - > - if ((HorizontalResolution =3D=3D NULL) || > - (VerticalResolution =3D=3D NULL) || > - (ColorDepth =3D=3D NULL) || > - (RefreshRate =3D=3D NULL)) { > - return EFI_INVALID_PARAMETER; > - } > - > - *HorizontalResolution =3D Private->ModeData[Private->CurrentMode].Hori= zontalResolution; > - *VerticalResolution =3D Private->ModeData[Private->CurrentMode].Vert= icalResolution; > - *ColorDepth =3D Private->ModeData[Private->CurrentMode].Colo= rDepth; > - *RefreshRate =3D Private->ModeData[Private->CurrentMode].Refr= eshRate; > - > - return EFI_SUCCESS; > -} > - > -EFI_STATUS > -EFIAPI > -CirrusLogic5430UgaDrawSetMode ( > - IN EFI_UGA_DRAW_PROTOCOL *This, > - IN UINT32 HorizontalResolution, > - IN UINT32 VerticalResolution, > - IN UINT32 ColorDepth, > - IN UINT32 RefreshRate > - ) > -{ > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private; > - UINTN Index; > - > - Private =3D CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (This); > - > - for (Index =3D 0; Index < Private->MaxMode; Index++) { > - > - if (HorizontalResolution !=3D Private->ModeData[Index].HorizontalRes= olution) { > - continue; > - } > - > - if (VerticalResolution !=3D Private->ModeData[Index].VerticalResolut= ion) { > - continue; > - } > - > - if (ColorDepth !=3D Private->ModeData[Index].ColorDepth) { > - continue; > - } > - > - if (RefreshRate !=3D Private->ModeData[Index].RefreshRate) { > - continue; > - } > - > - if (Private->LineBuffer) { > - gBS->FreePool (Private->LineBuffer); > - } > - > - Private->LineBuffer =3D NULL; > - Private->LineBuffer =3D AllocatePool (HorizontalResolution); > - if (Private->LineBuffer =3D=3D NULL) { > - return EFI_OUT_OF_RESOURCES; > - } > - > - InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[Private-= >ModeData[Index].ModeNumber]); > - > - Private->CurrentMode =3D Index; > - > - Private->HardwareNeedsStarting =3D FALSE; > - > - return EFI_SUCCESS; > - } > - > - return EFI_NOT_FOUND; > -} > - > -EFI_STATUS > -EFIAPI > -CirrusLogic5430UgaDrawBlt ( > - 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 > - ) > -{ > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private; > - EFI_TPL OriginalTPL; > - UINTN DstY; > - UINTN SrcY; > - EFI_UGA_PIXEL *Blt; > - UINTN X; > - UINT8 Pixel; > - UINT32 WidePixel; > - UINTN ScreenWidth; > - UINTN Offset; > - UINTN SourceOffset; > - > - Private =3D CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (This); > - > - if ((UINT32)BltOperation >=3D EfiUgaBltMax) { > - return EFI_INVALID_PARAMETER; > - } > - > - if (Width =3D=3D 0 || Height =3D=3D 0) { > - return EFI_INVALID_PARAMETER; > - } > - > - // > - // If Delta is zero, then the entire BltBuffer is being used, so Delta > - // is the number of bytes in each row of BltBuffer. Since BltBuffer i= s Width pixels size, > - // the number of bytes in each row can be computed. > - // > - if (Delta =3D=3D 0) { > - Delta =3D Width * sizeof (EFI_UGA_PIXEL); > - } > - > - // > - // We need to fill the Virtual Screen buffer with the blt data. > - // The virtual screen is upside down, as the first row is the bootom r= ow of > - // the image. > - // > - > - // > - // Make sure the SourceX, SourceY, DestinationX, DestinationY, Width, = and Height parameters > - // are valid for the operation and the current screen geometry. > - // > - if (BltOperation =3D=3D EfiUgaVideoToBltBuffer) { > - // > - // Video to BltBuffer: Source is Video, destination is BltBuffer > - // > - if (SourceY + Height > Private->ModeData[Private->CurrentMode].Verti= calResolution) { > - return EFI_INVALID_PARAMETER; > - } > - > - if (SourceX + Width > Private->ModeData[Private->CurrentMode].Horizo= ntalResolution) { > - return EFI_INVALID_PARAMETER; > - } > - } else { > - // > - // BltBuffer to Video: Source is BltBuffer, destination is Video > - // > - if (DestinationY + Height > Private->ModeData[Private->CurrentMode].= VerticalResolution) { > - return EFI_INVALID_PARAMETER; > - } > - > - if (DestinationX + Width > Private->ModeData[Private->CurrentMode].H= orizontalResolution) { > - return EFI_INVALID_PARAMETER; > - } > - } > - // > - // We have to raise to TPL Notify, so we make an atomic write the fram= e buffer. > - // We would not want a timer based event (Cursor, ...) to come in whil= e we are > - // doing this operation. > - // > - OriginalTPL =3D gBS->RaiseTPL (TPL_NOTIFY); > - > - switch (BltOperation) { > - case EfiUgaVideoToBltBuffer: > - // > - // Video to BltBuffer: Source is Video, destination is BltBuffer > - // > - for (SrcY =3D SourceY, DstY =3D DestinationY; DstY < (Height + Desti= nationY); SrcY++, DstY++) { > - > - Offset =3D (SrcY * Private->ModeData[Private->CurrentMode].Horizon= talResolution) + SourceX; > - if (((Offset & 0x03) =3D=3D 0) && ((Width & 0x03) =3D=3D 0)) { > - Private->PciIo->Mem.Read ( > - Private->PciIo, > - EfiPciIoWidthUint32, > - 0, > - Offset, > - Width >> 2, > - Private->LineBuffer > - ); > - } else { > - Private->PciIo->Mem.Read ( > - Private->PciIo, > - EfiPciIoWidthUint8, > - 0, > - Offset, > - Width, > - Private->LineBuffer > - ); > - } > - > - for (X =3D 0; X < Width; X++) { > - Blt =3D (EFI_UGA_PIXEL *) ((UINT8 *) BltBuffer + (DstY *= Delta) + (DestinationX + X) * sizeof (EFI_UGA_PIXEL)); > - > - Blt->Red =3D (UINT8) (Private->LineBuffer[X] & 0xe0); > - Blt->Green =3D (UINT8) ((Private->LineBuffer[X] & 0x1c) << 3); > - Blt->Blue =3D (UINT8) ((Private->LineBuffer[X] & 0x03) << 6); > - } > - } > - break; > - > - case EfiUgaVideoToVideo: > - // > - // Perform hardware acceleration for Video to Video operations > - // > - ScreenWidth =3D Private->ModeData[Private->CurrentMode].Horizontal= Resolution; > - SourceOffset =3D (SourceY * Private->ModeData[Private->CurrentMode]= .HorizontalResolution) + (SourceX); > - Offset =3D (DestinationY * Private->ModeData[Private->Current= Mode].HorizontalResolution) + (DestinationX); > - > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0000); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0010); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0012); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0014); > - > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0001); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0011); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0013); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0015); > - > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) (((Width << 8) & 0xf= f00) | 0x20)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((Width & 0xff00) | = 0x21)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) (((Height << 8) & 0x= ff00) | 0x22)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((Height & 0xff00) |= 0x23)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) (((ScreenWidth << 8)= & 0xff00) | 0x24)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((ScreenWidth & 0xff= 00) | 0x25)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) (((ScreenWidth << 8)= & 0xff00) | 0x26)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((ScreenWidth & 0xff= 00) | 0x27)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((Offset) << 8) & = 0xff00) | 0x28)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((Offset) >> 0) & = 0xff00) | 0x29)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((Offset) >> 8) & = 0xff00) | 0x2a)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((SourceOffset) <<= 8) & 0xff00) | 0x2c)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((SourceOffset) >>= 0) & 0xff00) | 0x2d)); > - outw (Private, GRAPH_ADDRESS_REGISTER, (UINT16) ((((SourceOffset) >>= 8) & 0xff00) | 0x2e)); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x002f); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0030); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0d32); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0033); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0034); > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0035); > - > - outw (Private, GRAPH_ADDRESS_REGISTER, 0x0231); > - > - outb (Private, GRAPH_ADDRESS_REGISTER, 0x31); > - while ((inb (Private, GRAPH_DATA_REGISTER) & 0x01) =3D=3D 0x01) > - ; > - break; > - > - case EfiUgaVideoFill: > - Blt =3D BltBuffer; > - Pixel =3D (UINT8) ((Blt->Red & 0xe0) | ((Blt->Green >> 3) & 0x1c= ) | ((Blt->Blue >> 6) & 0x03)); > - WidePixel =3D (Pixel << 8) | Pixel; > - WidePixel =3D (WidePixel << 16) | WidePixel; > - > - if (DestinationX =3D=3D 0 && Width =3D=3D Private->ModeData[Private-= >CurrentMode].HorizontalResolution) { > - Offset =3D DestinationY * Private->ModeData[Private->CurrentMode].= HorizontalResolution; > - if (((Offset & 0x03) =3D=3D 0) && (((Width * Height) & 0x03) =3D= =3D 0)) { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthFillUint32, > - 0, > - Offset, > - (Width * Height) >> 2, > - &WidePixel > - ); > - } else { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthFillUint8, > - 0, > - Offset, > - Width * Height, > - &Pixel > - ); > - } > - } else { > - for (SrcY =3D SourceY, DstY =3D DestinationY; SrcY < (Height + Sou= rceY); SrcY++, DstY++) { > - Offset =3D (DstY * Private->ModeData[Private->CurrentMode].Horiz= ontalResolution) + DestinationX; > - if (((Offset & 0x03) =3D=3D 0) && ((Width & 0x03) =3D=3D 0)) { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthFillUint32, > - 0, > - Offset, > - Width >> 2, > - &WidePixel > - ); > - } else { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthFillUint8, > - 0, > - Offset, > - Width, > - &Pixel > - ); > - } > - } > - } > - break; > - > - case EfiUgaBltBufferToVideo: > - for (SrcY =3D SourceY, DstY =3D DestinationY; SrcY < (Height + Sourc= eY); SrcY++, DstY++) { > - > - for (X =3D 0; X < Width; X++) { > - Blt =3D (EFI_UGA_PIXEL *) ((UINT8 *) BltBuff= er + (SrcY * Delta) + (SourceX + X) * sizeof (EFI_UGA_PIXEL)); > - Private->LineBuffer[X] =3D (UINT8) ((Blt->Red & 0xe0) | ((Blt->= Green >> 3) & 0x1c) | ((Blt->Blue >> 6) & 0x03)); > - } > - > - Offset =3D (DstY * Private->ModeData[Private->CurrentMode].Horizon= talResolution) + DestinationX; > - > - if (((Offset & 0x03) =3D=3D 0) && ((Width & 0x03) =3D=3D 0)) { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthUint32, > - 0, > - Offset, > - Width >> 2, > - Private->LineBuffer > - ); > - } else { > - Private->PciIo->Mem.Write ( > - Private->PciIo, > - EfiPciIoWidthUint8, > - 0, > - Offset, > - Width, > - Private->LineBuffer > - ); > - } > - } > - break; > - > - default: > - break; > - } > - > - gBS->RestoreTPL (OriginalTPL); > - > - return EFI_SUCCESS; > -} > - > -// > -// Construction and Destruction functions > -// > -EFI_STATUS > -CirrusLogic5430UgaDrawConstructor ( > - CIRRUS_LOGIC_5430_PRIVATE_DATA *Private > - ) > -{ > - EFI_UGA_DRAW_PROTOCOL *UgaDraw; > - > - // > - // Fill in Private->UgaDraw protocol > - // > - UgaDraw =3D &Private->UgaDraw; > - > - UgaDraw->GetMode =3D CirrusLogic5430UgaDrawGetMode; > - UgaDraw->SetMode =3D CirrusLogic5430UgaDrawSetMode; > - UgaDraw->Blt =3D CirrusLogic5430UgaDrawBlt; > - > - // > - // Initialize the private data > - // > - Private->CurrentMode =3D 0; > - Private->HardwareNeedsStarting =3D TRUE; > - Private->LineBuffer =3D NULL; > - > - // > - // Initialize the hardware > - // > - UgaDraw->SetMode ( > - UgaDraw, > - Private->ModeData[Private->CurrentMode].HorizontalResolution= , > - Private->ModeData[Private->CurrentMode].VerticalResolution, > - Private->ModeData[Private->CurrentMode].ColorDepth, > - Private->ModeData[Private->CurrentMode].RefreshRate > - ); > - DrawLogo ( > - Private, > - Private->ModeData[Private->CurrentMode].HorizontalResolution, > - Private->ModeData[Private->CurrentMode].VerticalResolution > - ); > - > - return EFI_SUCCESS; > -} > - > diff --git a/Drivers/OptionRomPkg/OptionRomPkg.dec b/Drivers/OptionRomPkg= /OptionRomPkg.dec > index 6881f3648ede..14957349aab7 100644 > --- a/Drivers/OptionRomPkg/OptionRomPkg.dec > +++ b/Drivers/OptionRomPkg/OptionRomPkg.dec > @@ -33,9 +33,6 @@ > [PcdsFeatureFlag] > gOptionRomPkgTokenSpaceGuid.PcdSupportScsiPassThru|TRUE|BOOLEAN|0x0001= 0001 > gOptionRomPkgTokenSpaceGuid.PcdSupportExtScsiPassThru|TRUE|BOOLEAN|0x0= 0010002 > - gOptionRomPkgTokenSpaceGuid.PcdSupportGop|TRUE|BOOLEAN|0x00010004 > - gOptionRomPkgTokenSpaceGuid.PcdSupportUga|TRUE|BOOLEAN|0x00010005 >=20 > [PcdsFixedAtBuild, PcdsPatchableInModule] > gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion|0x0002000a|UI= NT32|0x00010003 > - > -- > 2.26.2.windows.1