From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.519.1662764966016374097 for ; Fri, 09 Sep 2022 16:09:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=oGCbA1A2; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: nathaniel.l.desimone@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662764966; x=1694300966; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=HFmmRV8biq52cZEuQ37N/xRMLSnRkterYKtX1g7aqmA=; b=oGCbA1A2xbbxVmbMzOjXUYENB0G6Q2X4hmfRb1F75CeR6nGBq3GglNgv 1h45K0xHQK+6XtRa9ObMllYw5YAVsfe54kN7hykVdHA0QWkEGyFQLUzsG 2Q8P6O8BCvBNy/X0zXkxpgtTXg/CAyEHXNz1RTXXfh1cJ4hZ8kpi3lSRs NLbsTiK6l5uiTjCh80k4Z+MiDGaKXJOVCeZsOlopjZW74Catf6qiGcJfB 7cVDCtK4jS4KQEKHtBf9hQ65D4wxMB2g1PEliXNWE+651qrMXokKRyq67 PpFFDqviuHnsKLEJ73kLliHOS64JrYRK0D4s+RoiyBVVAndQ1sVT2bpou w==; X-IronPort-AV: E=McAfee;i="6500,9779,10465"; a="297588180" X-IronPort-AV: E=Sophos;i="5.93,304,1654585200"; d="scan'208";a="297588180" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 16:09:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,304,1654585200"; d="scan'208";a="741207857" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP; 09 Sep 2022 16:09:24 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) 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.2375.31; Fri, 9 Sep 2022 16:09:23 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Fri, 9 Sep 2022 16:09:23 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) 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.2375.31; Fri, 9 Sep 2022 16:09:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=li8Sh+S4pmEkQUO6Ye35Y2nCM9J9yBq3KRYiPm2NbbTubgaFPnTdEVZjhlqPzvrlDERYRniFPPgjcEch/Zq4YCsbjQtIplxvMsJVrHAJ/W18WZz4u15FoWqPhPsWqh/aiGwTo2w71eCqFgAZNfaN2r/h2pi8Uhm5FTNzqijFY8zjsYLb8zEiaQD6cax44SJfc6Gq8iqinqsbIEct5W44XaD9ULjH0esUMuu8OY+/0x4MXyul70sadWWHuN771cr+YB25SNZI/LgjTebmMnmnigWKPU2S/qKrRv87l223tD5UuJizO+sfcNlOt7To5ZiN77nz3s4DEAZtrRr9UY5uRA== 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=cSBMY+yWotMYv8dua7/W7Qg9DuZ2tEi3e+pHcr4rfqM=; b=Uj+RjMGCbYCJBtiK5omcfOCpWuLYVqz+GE/OUrWD/4ZrpJt6qQnfLsz2cGCXFD3X5dURKw0E4DQeGHMstUSZmh30FVUo6qErZ8M+/9jXA08Htokb030SX3+fakBOkxGPnDc3PymI8pb7HknXurUButMz2pMDJffSsfj5y/CJWh9tBFMpUY2oBdUEhrB/f9zIjqqBOWYyYDHGrQ6IWgEHpL8+i55oAMfkdKPaOdGvlfprjpOXKx2/u88VOC+SBPWeN/BWeN5JTb63C1nkak3xsABJh0nI8DOU6CZ/5O99GGmbWMhlJKgHB3FBKUHgo99oMQODLK3q9bBRCi57L2GQrQ== 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 MW4PR11MB5821.namprd11.prod.outlook.com (2603:10b6:303:184::5) by BL1PR11MB5367.namprd11.prod.outlook.com (2603:10b6:208:318::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Fri, 9 Sep 2022 23:09:19 +0000 Received: from MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::2c94:f950:2ac4:d92f]) by MW4PR11MB5821.namprd11.prod.outlook.com ([fe80::2c94:f950:2ac4:d92f%8]) with mapi id 15.20.5588.014; Fri, 9 Sep 2022 23:09:19 +0000 From: "Nate DeSimone" To: Benjamin Doron , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" , "Oram, Isaac W" , "Sinha, Ankit" , "Chiu, Chasel" Subject: Re: [edk2-devel][edk2-platforms][PATCH v1 2/3] [WIP] KabylakeOpenBoardPkg/I2cHdmiDebugSerialPortLib: Commit local Thread-Topic: [edk2-devel][edk2-platforms][PATCH v1 2/3] [WIP] KabylakeOpenBoardPkg/I2cHdmiDebugSerialPortLib: Commit local Thread-Index: AQHYwhX3gkj/SHPxgUmNPNYGhrREva3XsBAQ Date: Fri, 9 Sep 2022 23:09:19 +0000 Message-ID: References: <667ed46bd371079c17fef615fb46d1fa933f7e0c.1662484082.git.benjamin.doron00@gmail.com> In-Reply-To: <667ed46bd371079c17fef615fb46d1fa933f7e0c.1662484082.git.benjamin.doron00@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 5adca4d2-d575-4391-a414-08da92b8536e x-ms-traffictypediagnostic: BL1PR11MB5367:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 13g+LLDziEpeT/PUfejm9lryR+gvOJ0twrZTK42XjKTvNvrzyfp61iHwWVlxlhL1oFa+w+PCpl04gxFj2fx496cJ8dQ0ekxNb2N8moAK4vrCNcrv0wVIezoyiHUQmffaY0m/3Hzkfou0DUYdNM95mzdkint6kkUQEOSrkl9kAgwlv/a51yuql5aWwyUpAkJ16EBH0mLucYE/U3M6OBIP1qBF1kCXgOGLId+HOcgDr/vAO2EyKU0YcKM+Sak3CmfVyHMUeW8uICrwyKLUq/3q8w+y4SJNpbp60NoiGFChxUtVYmZElI0Bn55W9vUoC1qXos3PkG1sz1qT54fQhIYlUtNZGBKxMKx3jaHN2A3LD1BsCkAvFNWYOnqJDk4/34MB5nkd5YppzafeFQEoCU42/xxOn6f+i/25De0ybPp4LdjtcgzNpn99DGlVnnuqQdyGdrJ5dJy5d4ouNTTfjCFdaeTxzToIH1hQcmmGbZi7Pfj0ltrJc/hVmipG9+6zySLfZFSeNOBFpuONhQzw+Gfj74QmphkmYxTGBPToZIBIWdNYOmvyTXfQsRlOiD5DAbu1t3RG7YhK/TaNnO2WnJfgwhmd0yemmhadgl7EB9vVJgQoDRyhPO/oe+wEIJTgZkFz6EbmAw1BoQZw5nU0stqt9bGuPk3m5ce/EUR0DEVpuiRdDPgjl7F1kaMPz1qbpzGJ8Hrqa4Vtq9CkLo/XBM4PHWDnL51X7f0lefI+QRaThsodyz2noeo/ZRzFsfoa7GRg7xp+yrcuqCfdfsHvyEJqqZHxg+zasCfrskl0FRZqpvI= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5821.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(39860400002)(376002)(366004)(346002)(136003)(54906003)(26005)(83380400001)(110136005)(53546011)(7696005)(107886003)(478600001)(9686003)(19627235002)(316002)(186003)(33656002)(6506007)(76116006)(86362001)(4326008)(66446008)(66946007)(66556008)(64756008)(8676002)(66476007)(55016003)(52536014)(2906002)(5660300002)(30864003)(8936002)(71200400001)(38070700005)(82960400001)(41300700001)(122000001)(38100700002)(213903007)(579004)(559001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KNf3v9ZQ+quc1L5hRCJTxkD8zT/yVrUZnlUqBpoClABYcDszNDeW9Y9EJk6k?= =?us-ascii?Q?rd2TRg1LbkoWIPnAW0a2kMwfnbYJxHZKseSOGbPRCKi9ogLx4GdmCHAF7GlC?= =?us-ascii?Q?asufW4M7//Uc1M91qqLJ3dXqPUJ/J+mSCkpM57LBbZBmaYFWZ4FdM9zdxWxH?= =?us-ascii?Q?MejXlL158DaN0eAPsQeL8bRd/rjhILXB3zGrPRFbGieI5ZMw90BLgJ8YtVNg?= =?us-ascii?Q?/nSx1uTc7bXWfqlyUjlJJfyovFEOMwvCDg+U9z6awgYFMUbTnuK86ItgeJ1r?= =?us-ascii?Q?9jB6zdQHJ40Q+qkMazGfTVCoj7YFr+oVUst0Ec6hdYDFDPc+xIK7Z2wtbPrW?= =?us-ascii?Q?OYBFfBaeu8qPrnb88W2EAG/RLBfDz6USf7e36hUNh5IuO9SpujKjgkvE3Ihr?= =?us-ascii?Q?Ts+IXs/Iu8DulflLdy1mLMaizW8grbA8yjOVwTVzCwmC39dOjkQVLXL+Pe+m?= =?us-ascii?Q?rlUzVHQasPgZqJEV7puA6MuP20wLhPe9XfEopnaIpkYp7ri/bPxro3vjbLy3?= =?us-ascii?Q?+QCpjm5X1hnO+JLbra98lOqnA3pvNbNjz8lzVeWVQ5xuso/SISxii6EZAE5X?= =?us-ascii?Q?1pBZLR/6Zpwn0sYwKx1VsrgxRKay1eQXcrecWeXO6JOLMFbjvL1FeqoMzBTa?= =?us-ascii?Q?Pz8OvyZ/jdjHBxPurXZX4Bf3otlBf51RI91iGHq8hclIUOSKyrSAwTx9jvi0?= =?us-ascii?Q?/2KuzlySRtjHpdT2go76OWeTJDbdW78jiSdDR6osE8clIi91gR5Lj7fLWwkS?= =?us-ascii?Q?gun94AdZ1/+MWqHw4LvfjFFypXoyqEaXOsr5xkwynmKC+lf2WgaKHCbJWLzO?= =?us-ascii?Q?Dc/m4ECeGx/ihYCbnpI+ixHuiUUTs/W3ZeVi1BgGWSQfnLQJus1GKU23FX4A?= =?us-ascii?Q?VPlUvM4SHoLrc9UXnCMAYFcGbAEfnhT4YZGtgIlE+a3UgIenEYjuVmCMt+O8?= =?us-ascii?Q?A5S87xtReoPpPjeJ7e3xRH5VrREUK+ZHZk5AM2g/LHi+4LM9knwzahcr8m0k?= =?us-ascii?Q?YLL8s+iLBZcmxWiR1nGnfa74gHDdC0W6E4Uycmjw902EY9JbUbH2aAw3a1TU?= =?us-ascii?Q?GO52FqA3nO0F1QUvNHpqgVHlCXasUDKjuZuZsdrLcW3CBs09XZzd3Is1H/oJ?= =?us-ascii?Q?1cDibxR4uSg5b6aKpXpzxamqLyLSZHqiqfVT0UdcOdonD5kLq0eVHU8i3HNz?= =?us-ascii?Q?dC99lR3m/sIJtl85cDwlvt5dbi4ODBZdRyg86yaNdgM1pun183Hmo+BZYTfE?= =?us-ascii?Q?oqwNFq5NsjV6fiYWqXDucrT1l9QeQJiBrZCdfEGV9q8TdqzH6hNuld61DuW9?= =?us-ascii?Q?rUGxqnun5aVAANwPA8dNQIw3eRr0tbTno//LFz06Ia6S8p5IPXSDHz8S0rPi?= =?us-ascii?Q?aITBQYn2oPaYL4WW62MCGxBVBQQ9Aj3qNIIU8UOK+rMgwEe8Y/vUM+5Pkdtu?= =?us-ascii?Q?0LakzQKTL5ChTSmpNPQecckYkw3FPkogLDMD81MwNpnychImvKcM9LRJraVC?= =?us-ascii?Q?HAOw6nRToI5TpXJjyR/GlPAqxSqX7kFxUFwDHzMQlmeXo+Cz3lb6HNxIqVdJ?= =?us-ascii?Q?912CeCzXqeL6R6VlkFtvbPQKnkBO9QIz51qVxskkT+lxqLX69OM5bQXdRsdC?= =?us-ascii?Q?sQ=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5821.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5adca4d2-d575-4391-a414-08da92b8536e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Sep 2022 23:09:19.0701 (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: vF6RUP/3GTNtabBvMDgBlat0Go5NSVn6rc7f6aLCKvGRwa/VVRec1OaxEmjqfJpfTBPP0/j2Gg9jYj4CnhoTOUagIuqotjpF/6ITlJ/dSNk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5367 Return-Path: nathaniel.l.desimone@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Benjamin Doron > Sent: Tuesday, September 6, 2022 10:27 AM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Oram, Isaac W > ; Desimone, Nathaniel L > ; Sinha, Ankit ; > Chiu, Chasel > Subject: [edk2-devel][edk2-platforms][PATCH v1 2/3] [WIP] > KabylakeOpenBoardPkg/I2cHdmiDebugSerialPortLib: Commit local >=20 > While the key patches here should probably be merged into the initial > patches for this library, it appears it isn't being merged soon. > Therefore, commit the patches that improve the library for S3 use. >=20 > Other than edits to INF LibraryClasses and header `#include`s, the primar= y > patch here assists runtime by creating events to toggle a boolean such th= at > gBS is not used after end-of-BS. This is necessary for DebugLibSerialPort= , but > not RSC, which uninstalls the serial port handler at end-of-BS. >=20 > For S3 resume, a key finding was that this is still insufficient. The ima= ge is > copied into the lockbox for its own security at DxeSmmReadyToLock, so > toggling booleans in the data section is ineffective. Early DXE is fairly= single- > threaded and testing indicates that simply consuming ..TplNull.c is worka= ble. >=20 > Also, GCC 12 requires a patch to a `switch` block that improved flow > coherency. >=20 > Cc: Sai Chaganty > Cc: Isaac Oram > Cc: Nate DeSimone > Cc: Ankit Sinha > Cc: Chasel Chiu > Signed-off-by: Benjamin Doron > --- > ...ptExecutorDxeI2cHdmiDebugSerialPortLib.inf | 48 ++++++++++ > .../DxeI2cHdmiDebugSerialPortLib.inf | 8 +- > .../DxeSmmI2cHdmiDebugSerialPortLib.c | 2 - > .../Library/I2cHdmiDebugSerialPortLib/Gmbus.c | 39 ++++---- > .../I2cDebugPortProtocol.c | 2 - > .../I2cDebugPortTplDxe.c | 9 ++ > .../I2cDebugPortTplRuntimeDxe.c | 93 +++++++++++++++++++ > .../I2cHdmiDebugSerialPortLib.c | 3 - > .../I2cHdmiDebugSerialPortLib/IgfxI2c.c | 9 +- > .../PeiI2cHdmiDebugSerialPortLib.c | 1 - > .../PeiI2cHdmiDebugSerialPortLib.inf | 5 +- > .../RuntimeDxeI2cHdmiDebugSerialPortLib.inf | 51 ++++++++++ > .../SecI2cHdmiDebugSerialPortLib.c | 1 - > .../SecI2cHdmiDebugSerialPortLib.inf | 7 +- > .../SmmI2cHdmiDebugSerialPortLib.inf | 6 +- > 15 files changed, 231 insertions(+), 53 deletions(-) > create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDe= bugSerialPortLib/BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf > create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDe= bugSerialPortLib/I2cDebugPortTplRuntimeDxe.c > create mode 100644 Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDe= bugSerialPortLib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf >=20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf b/Platform/Int= el/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/BootScriptExecuto= rDxeI2cHdmiDebugSerialPortLib.inf > new file mode 100644 > index 000000000000..995e67bde7d4 > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/BootScriptExecutorDxeI2cHdmiDebugSerialPortLib.inf > @@ -0,0 +1,48 @@ > +### @file > +# Component description file for Serial I/O Port library for the HDMI I2= C Debug Port > +# > +# Copyright (c) 2022, Intel Corporation. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D RuntimeDxeI2cHdmiDebugSerialPortLib > + FILE_GUID =3D 7E514680-470B-409C-8FC4-2FE62BF010B= C > + VERSION_STRING =3D 1.0 > + MODULE_TYPE =3D DXE_DRIVER > + LIBRARY_CLASS =3D SerialPortLib|DXE_CORE DXE_DRIVER D= XE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE > +# > +# The following information is for reference only and not required by th= e build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[LibraryClasses] > + BaseMemoryLib > + PcdLib > + TimerLib > + IoLib > + PciLib > + UefiLib > + > +[Packages] > + MdePkg/MdePkg.dec > + KabylakeOpenBoardPkg/OpenBoardPkg.dec > + > +[Sources] > + DxeSmmI2cHdmiDebugSerialPortLib.c > + Gmbus.c > + Gmbus.h > + I2cDebugPortProtocol.c > + I2cDebugPortProtocol.h > + I2cDebugPortTplNull.c > + I2cHdmiDebugSerialPortLib.c > + IgfxI2c.c > + IgfxI2c.h > + > +[Pcd] > + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES > + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/DxeI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoa= rdPkg/Library/I2cHdmiDebugSerialPortLib/DxeI2cHdmiDebugSerialPortLib.inf > index 5403d8ae0fd7..5eeee504c7ec 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/DxeI2cHdmiDebugSerialPortLib.inf > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/DxeI2cHdmiDebugSerialPortLib.inf > @@ -21,11 +21,13 @@ > # > =20 > [LibraryClasses] > - BaseLib > BaseMemoryLib > PcdLib > TimerLib > + IoLib > PciLib > + UefiBootServicesTableLib > + UefiLib > =20 > [Packages] > MdePkg/MdePkg.dec > @@ -42,10 +44,6 @@ > IgfxI2c.c > IgfxI2c.h > =20 > -[Ppis] > - > -[Guids] > - > [Pcd] > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/DxeSmmI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBo= ardPkg/Library/I2cHdmiDebugSerialPortLib/DxeSmmI2cHdmiDebugSerialPortLib.c > index 5556e09a7419..46827c6cefae 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/DxeSmmI2cHdmiDebugSerialPortLib.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/DxeSmmI2cHdmiDebugSerialPortLib.c > @@ -8,10 +8,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > =20 > #include > -#include > #include > #include > -#include > =20 > #include > #include > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/Gmbus.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebu= gSerialPortLib/Gmbus.c > index c04bcd285060..df5dfd70a5f2 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/Gmbus.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/Gmbus.c > @@ -7,8 +7,7 @@ > **/ > =20 > #include > -#include > -#include > +//#include > #include > #include > #include > @@ -33,6 +32,7 @@ GmbusGetGttMmAdr ( > // Check if GTT Memory Mapped BAR has been already assigned, initializ= e if not > // > GttMmPciAddress =3D PCI_LIB_ADDRESS (SA_IGD_BUS, SA_IGD_DEV, SA_IGD_FU= N_0, R_SA_IGD_GTTMMADR); > + // TODO(benjamindoron): TigerLake has 64-bit BAR Please delete this comment. It lacks relevance to the scope of the current = patch series. If you would like to port this to Tiger Lake at some point in= the future, I would recommend filing a Bugzilla, assigning it to yourself,= and making a note of the 64-bit BAR being one of the issues to be addresse= d when porting to newer silicon. > GttMmAdr =3D PciRead32 (GttMmPciAddress) & 0xFFFFFFF0; > //DEBUG ((DEBUG_INFO, "GttMmPciAddress =3D %x\n", (UINTN) GttMmPciAddr= ess)); //@TODO > //DEBUG ((DEBUG_INFO, "GttMmAdr =3D %x\n", (UINTN) GttMmAdr)); //@TODO > @@ -361,6 +361,7 @@ GmbusPrepare ( > } > // > // Wait for GMBUS to complete any pending commands > + // - TODO(benjamindoron): GmbusRecoverError() Please remove the TODO and either put the call to GmbusRecoverError() in...= or not. I think it is a good idea to add a call to GmbusRecoverError() in = the case of GmbusWaitForReady() returning EFI_TIMEOUT. > // > Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_INUSE, FALSE); > if (EFI_ERROR (Status)) { > @@ -488,28 +489,28 @@ GmbusRead ( > // Input Validation > // > if ((*ByteCount) <=3D 0) { > - DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is 0, no bytes to read.= \n", __FUNCTION__)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is 0, no bytes to rea= d.\n", __FUNCTION__)); > return EFI_INVALID_PARAMETER; > } > if ((*ByteCount) > GMBUS_MAX_BYTES) { > - DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is greater than GMBUS_M= AX_BYTES[%d].\n", __FUNCTION__, GMBUS_MAX_BYTES)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - ByteCount is greater than GMBUS= _MAX_BYTES[%d].\n", __FUNCTION__, GMBUS_MAX_BYTES)); > return EFI_INVALID_PARAMETER; > } > if (ReadBuffer =3D=3D NULL) { > - DEBUG ((DEBUG_INFO, "Error: %a() - ReadBuffer is NULL.\n", __FUNCTIO= N__)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - ReadBuffer is NULL.\n", __FUNCT= ION__)); > return EFI_INVALID_PARAMETER; > } > if ((SlaveAddress & BIT0) !=3D BIT0) { > - DEBUG ((DEBUG_INFO, "Error: %a() - BIT0 of SlaveAddress should be se= t for an I2C read.\n", __FUNCTION__)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - BIT0 of SlaveAddress should be = set for an I2C read.\n", __FUNCTION__)); > return EFI_INVALID_PARAMETER; > } > =20 > // > // Configure Gmbus port and clock speed > - // > + //GMBUS_CLOCK_RATE_100K @todo > Status =3D GmbusPrepare (GMBUS_CLOCK_RATE_50K, (DdcBusPinPair & B_SA_G= TTMMADR_GMBUS0_PIN_PAIR_MASK)); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusPrepare() failed - %r\n", __= FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusPrepare() failed - %r\n", = __FUNCTION__, Status)); > goto Done; > } > =20 > @@ -534,7 +535,7 @@ GmbusRead ( > // > Status =3D SetGmbus1Command (GmbusCmdSts); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - SetGmbus1Command() failed - %r\n"= , __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - SetGmbus1Command() failed - %r\= n", __FUNCTION__, Status)); > goto Done; > } > =20 > @@ -556,7 +557,7 @@ GmbusRead ( > // > Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_HW_RDY, TRUE); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r= \n", __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - = %r\n", __FUNCTION__, Status)); > } > // > // Check the GMBUS2 register for error conditions (NACK or Slave Sta= ll Timeout) > @@ -564,13 +565,13 @@ GmbusRead ( > Status2 =3D GetGmbus2Status (&GmbusStatus); > if (EFI_ERROR (Status2)) { > Status =3D Status2; > - DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus2Status() failed - %r\n= ", __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus2Status() failed - %r= \n", __FUNCTION__, Status)); > goto Done; > } > if (EFI_ERROR (Status) && ((GmbusStatus & B_SA_GTTMMADR_GMBUS2_NACK_= INDICATOR) =3D=3D 0)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - Unexpected behavior detected!\n= ", __FUNCTION__)); > - DEBUG ((DEBUG_INFO, "The GMBUS controller did not encounter a NACK= and it did not set the HW_RDY bit.\n")); > - DEBUG ((DEBUG_INFO, "Status =3D %r\n", Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - Unexpected behavior detected!= \n", __FUNCTION__)); > + //DEBUG ((DEBUG_INFO, "The GMBUS controller did not encounter a NA= CK and it did not set the HW_RDY bit.\n")); > + //DEBUG ((DEBUG_INFO, "Status =3D %r\n", Status)); > Status =3D EFI_DEVICE_ERROR; > goto Done; > } > @@ -580,10 +581,10 @@ GmbusRead ( > // If a NACK or Slave Stall Timeout occurs, then a bus error has o= ccurred. > // In the event of a bus error, one must reset the GMBUS controlle= r to resume normal operation. > // > - DEBUG ((DEBUG_INFO, "Error: %a() - NACK occurred during read opera= tion.\n", __FUNCTION__)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - NACK occurred during read ope= ration.\n", __FUNCTION__)); > Status =3D GmbusRecoverError (); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRecoverError() failed - = %r\n", __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRecoverError() failed = - %r\n", __FUNCTION__, Status)); > goto Done; > } > Status =3D EFI_DEVICE_ERROR; > @@ -594,7 +595,7 @@ GmbusRead ( > // > Status =3D GetGmbus3Data (&GmbusData); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus3Data() failed - %r\n",= __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GetGmbus3Data() failed - %r\n= ", __FUNCTION__, Status)); > goto Done; > } > for (Index =3D 0; (Index < sizeof (UINT32)) && (BytesRead < (*ByteCo= unt)); Index++) { > @@ -608,7 +609,7 @@ GmbusRead ( > // > Status =3D GmbusWaitForReady (B_SA_GTTMMADR_GMBUS2_BUS_ACTIVE, FALSE); > if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r\n= ", __FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusWaitForReady() failed - %r= \n", __FUNCTION__, Status)); > return Status; > } > =20 > @@ -616,7 +617,7 @@ Done: > Status2 =3D GmbusRelease (); > if (EFI_ERROR (Status2)) { > Status =3D Status2; > - DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRelease() failed - %r\n", __= FUNCTION__, Status)); > + //DEBUG ((DEBUG_INFO, "Error: %a() - GmbusRelease() failed - %r\n", = __FUNCTION__, Status)); > } > GmbusResetBusMaster (); > =20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/I2cDebugPortProtocol.c b/Platform/Intel/KabylakeOpenBoardPkg/Libr= ary/I2cHdmiDebugSerialPortLib/I2cDebugPortProtocol.c > index 1a31c98347db..51eeadd75af9 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cDebugPortProtocol.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cDebugPortProtocol.c > @@ -7,9 +7,7 @@ > **/ > =20 > #include > -#include > #include > -#include > #include > =20 > #include > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/I2cDebugPortTplDxe.c b/Platform/Intel/KabylakeOpenBoardPkg/Librar= y/I2cHdmiDebugSerialPortLib/I2cDebugPortTplDxe.c > index 9d69c0365795..d92b8d262793 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cDebugPortTplDxe.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cDebugPortTplDxe.c > @@ -22,6 +22,11 @@ RaiseTplForI2cDebugPortAccess ( > VOID > ) > { > + // DebugLibSerialPort exposes potential DEBUG bugs, such as early asse= rtions > + if (gBS =3D=3D NULL) { > + return; > + } > + > if (EfiGetCurrentTpl () < TPL_NOTIFY) { > mPreviousTpl =3D gBS->RaiseTPL (TPL_NOTIFY); > } > @@ -37,6 +42,10 @@ RestoreTplAfterI2cDebugPortAccess ( > VOID > ) > { > + if (gBS =3D=3D NULL) { > + return; > + } > + > if (mPreviousTpl > 0) { > gBS->RestoreTPL (mPreviousTpl); > mPreviousTpl =3D 0; > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/I2cDebugPortTplRuntimeDxe.c b/Platform/Intel/KabylakeOpenBoardPkg= /Library/I2cHdmiDebugSerialPortLib/I2cDebugPortTplRuntimeDxe.c > new file mode 100644 > index 000000000000..7aa95157d734 > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cDebugPortTplRuntimeDxe.c > @@ -0,0 +1,93 @@ > +/** @file > + Serial I/O Port library implementation for the HDMI I2C Debug Port > + DXE Library implementation > + > +Copyright (c) 2022, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > +#include > +#include > + > +STATIC EFI_TPL mPreviousTpl =3D 0; > +STATIC EFI_EVENT mEvent =3D NULL; > +STATIC UINT8 mEndOfBootServices =3D 0; > + > +/** > + Exit Boot Services Event notification handler. > + > + @param[in] Event Event whose notification function is being invok= ed > + @param[in] Context Pointer to the notification function's context > + > +**/ > +VOID > +EFIAPI > +OnExitBootServices ( > + IN EFI_EVENT Event, > + IN VOID *Context > + ) > +{ > + mEndOfBootServices =3D 1; > + > + gBS->CloseEvent (Event); > +} > + > +/** > + For boot phases that utilize task priority levels (TPLs), this functio= n raises > + the TPL to the appriopriate level needed to execute I/O to the I2C Deb= ug Port > +**/ > +VOID > +RaiseTplForI2cDebugPortAccess ( > + VOID > + ) > +{ > + // DebugLibSerialPort exposes potential DEBUG bugs, such as early asse= rtions > + if (gBS =3D=3D NULL || mEndOfBootServices =3D=3D 1) { > + return; > + } > + > + // An event is required for a boolean to bypass TPL modification after > + // exit-BS. RSC obviates this, requiring it for runtime DebugLibSerial= Port. > + // - Consider creating a TplRuntimeDxe, although UefiRuntimeLib uses g= ST? > + // - BootScriptExecutorDxe is a special-case, where booleans are ineff= ective > + // > + // A constructor would cycle, SerialPortInitialize() takes no argument= s, > + // and no BootServicesTableLib can be called by AutoGen early enough. > + // Therefore, we generate the event here. > + if (mEvent =3D=3D NULL) { > + gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_NOTIFY, > + OnExitBootServices, > + NULL, > + &gEfiEventExitBootServicesGuid, > + &mEvent > + ); > + } > + > + if (EfiGetCurrentTpl () < TPL_NOTIFY) { > + mPreviousTpl =3D gBS->RaiseTPL (TPL_NOTIFY); > + } > +} > + > +/** > + For boot phases that utilize task priority levels (TPLs), this functio= n > + restores the TPL to the previous level after I/O to the I2C Debug Port= is > + complete > +**/ > +VOID > +RestoreTplAfterI2cDebugPortAccess ( > + VOID > + ) > +{ > + if (gBS =3D=3D NULL || mEndOfBootServices =3D=3D 1) { > + return; > + } > + > + if (mPreviousTpl > 0) { > + gBS->RestoreTPL (mPreviousTpl); > + mPreviousTpl =3D 0; > + } > +} > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/I2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoardPkg= /Library/I2cHdmiDebugSerialPortLib/I2cHdmiDebugSerialPortLib.c > index 89a01b868da3..402b5a3033a9 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cHdmiDebugSerialPortLib.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/I2cHdmiDebugSerialPortLib.c > @@ -7,10 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > =20 > #include > -#include > #include > -#include > -#include > =20 > #include > #include > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/IgfxI2c.c b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDe= bugSerialPortLib/IgfxI2c.c > index b1273c7a5d10..886351ad4297 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/IgfxI2c.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/IgfxI2c.c > @@ -7,8 +7,6 @@ > **/ > =20 > #include > -#include > -#include > #include > #include > =20 > @@ -84,7 +82,6 @@ GetGmbusBusPinPair ( > default: > return EFI_INVALID_PARAMETER; > } > - break; I realize that the break is redundant because all possible paths above here= return. Still, it is best practice to keep it just in case someone adds a = new case to the nested switch statement in the future that does not contain= a return. > // The PCH design lineage from newer CoffeeLake & WhiskeyLake > case PchTypeCnlLp: > case PchTypeCnlH: > @@ -105,8 +102,8 @@ GetGmbusBusPinPair ( > default: > return EFI_INVALID_PARAMETER; > } > - break; I realize that the break is redundant because all possible paths above here= return. Still, it is best practice to keep it just in case someone adds a = new case to the nested switch statement in the future that does not contain= a return. > - } > =20 > - return EFI_UNSUPPORTED; > + default: > + return EFI_UNSUPPORTED; > + } > } > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/PeiI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.c > index c99821367354..05b2d31bbfc2 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/PeiI2cHdmiDebugSerialPortLib.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/PeiI2cHdmiDebugSerialPortLib.c > @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > =20 > -#include > #include > #include > #include > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/PeiI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoa= rdPkg/Library/I2cHdmiDebugSerialPortLib/PeiI2cHdmiDebugSerialPortLib.inf > index 62b3cd3e1e49..64d8f682b786 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/PeiI2cHdmiDebugSerialPortLib.inf > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/PeiI2cHdmiDebugSerialPortLib.inf > @@ -21,10 +21,11 @@ > # > =20 > [LibraryClasses] > - BaseLib > BaseMemoryLib > PcdLib > + HobLib > TimerLib > + IoLib > PciLib > =20 > [Packages] > @@ -42,8 +43,6 @@ > IgfxI2c.c > IgfxI2c.h > =20 > -[Ppis] > - > [Guids] > gI2cHdmiDebugHobGuid > =20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/Kabylake= OpenBoardPkg/Library/I2cHdmiDebugSerialPortLib/RuntimeDxeI2cHdmiDebugSerial= PortLib.inf > new file mode 100644 > index 000000000000..eefe85f2814c > --- /dev/null > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/RuntimeDxeI2cHdmiDebugSerialPortLib.inf > @@ -0,0 +1,51 @@ > +### @file > +# Component description file for Serial I/O Port library for the HDMI I2= C Debug Port > +# > +# Copyright (c) 2022, Intel Corporation. All rights reserved.
> +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION =3D 0x00010005 > + BASE_NAME =3D RuntimeDxeI2cHdmiDebugSerialPortLib > + FILE_GUID =3D 08891D97-994C-48E9-9983-E99D622D32C= 8 > + VERSION_STRING =3D 1.0 > + MODULE_TYPE =3D DXE_DRIVER > + LIBRARY_CLASS =3D SerialPortLib|DXE_CORE DXE_DRIVER D= XE_RUNTIME_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER SMM_CORE > +# > +# The following information is for reference only and not required by th= e build tools. > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[LibraryClasses] > + BaseMemoryLib > + PcdLib > + TimerLib > + IoLib > + PciLib > + UefiLib > + > +[Packages] > + MdePkg/MdePkg.dec > + KabylakeOpenBoardPkg/OpenBoardPkg.dec > + > +[Sources] > + DxeSmmI2cHdmiDebugSerialPortLib.c > + Gmbus.c > + Gmbus.h > + I2cDebugPortProtocol.c > + I2cDebugPortProtocol.h > + I2cDebugPortTplRuntimeDxe.c > + I2cHdmiDebugSerialPortLib.c > + IgfxI2c.c > + IgfxI2c.h > + > +[Guids] > + gEfiEventExitBootServicesGuid = ## CONSUMES ## Event > + > +[Pcd] > + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES > + gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/SecI2cHdmiDebugSerialPortLib.c b/Platform/Intel/KabylakeOpenBoard= Pkg/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.c > index 416114d4363c..e4a65a66d9c1 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SecI2cHdmiDebugSerialPortLib.c > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SecI2cHdmiDebugSerialPortLib.c > @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > =20 > #include > -#include > #include > #include > =20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/SecI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoa= rdPkg/Library/I2cHdmiDebugSerialPortLib/SecI2cHdmiDebugSerialPortLib.inf > index 3ae724926fdd..a9780decd1a7 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SecI2cHdmiDebugSerialPortLib.inf > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SecI2cHdmiDebugSerialPortLib.inf > @@ -21,10 +21,9 @@ > # > =20 > [LibraryClasses] > - BaseLib > BaseMemoryLib > - PcdLib > TimerLib > + IoLib > PciLib > =20 > [Packages] > @@ -42,10 +41,6 @@ > IgfxI2c.h > SecI2cHdmiDebugSerialPortLib.c > =20 > -[Ppis] > - > -[Guids] > - > [Pcd] > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSeri= alPortLib/SmmI2cHdmiDebugSerialPortLib.inf b/Platform/Intel/KabylakeOpenBoa= rdPkg/Library/I2cHdmiDebugSerialPortLib/SmmI2cHdmiDebugSerialPortLib.inf > index dcbf43b886c1..65f2b4f5f731 100644 > --- a/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SmmI2cHdmiDebugSerialPortLib.inf > +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/I2cHdmiDebugSerialPortL= ib/SmmI2cHdmiDebugSerialPortLib.inf > @@ -21,10 +21,10 @@ > # > =20 > [LibraryClasses] > - BaseLib > BaseMemoryLib > PcdLib > TimerLib > + IoLib > PciLib > =20 > [Packages] > @@ -42,10 +42,6 @@ > IgfxI2c.c > IgfxI2c.h > =20 > -[Ppis] > - > -[Guids] > - > [Pcd] > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdI2cHdmiDebugPortDdcI2cChannel = ## CONSUMES > gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGttMmAddress = ## CONSUMES > --=20 > 2.37.2