From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.53]) by mx.groups.io with SMTP id smtpd.web10.4720.1585399009348211460 for ; Sat, 28 Mar 2020 05:36:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=I9ZBqy3R; spf=pass (domain: oss.nxp.com, ip: 40.107.21.53, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7mBnA/JVkW/j13p6kMZVD1QndL/w4G+aWVIVQZ18rjmKJ1htUu8EffJOBl9hICs74G9nv4g3mNrxPVvvkLmnEUIKHsD5WaGJq4ZnjtgS9aeRkFhCBp0tyicX3xp0H3NFKKO1der+ESbykbkwc9c6i+UfeLdTHL3NMXsmlQrJR31tl/BGGFTUsSpcCrNqed6zBAWUqY+2WG/x7GtojCgaCUTWTftuyztngSWBOvrNRWZZudG8Tv3oPo3YZhIyfFgT+vGXBdrRZWScurQpDCCJ4N9Ad4jNXkByeVSG5SyK08hM8iVykuaHzg0OaDgPhREx1DElh1afj4nV1+E/58N+Q== 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-SenderADCheck; bh=rLqwkDXrMv1zuR8KQoJU8eb53eo2G4/ab4E44LO/ZlE=; b=kHwNKYfrnZBDKrnI60zFNewqaYSpo7Wvt0yIdqWUYbMo8b4Maa6CsjUIC+Eg31CwKPBPPoiaOdIcm0dxdHBy9YKCMP4RzQuxq+pvFZ84+spSMqokCWBALtAR1g3HV/gBAtfynQh55Fl9kfKQsPnIMPJlzqMkbk3MY+dmv2W4Nu8IyFKc8PAP2drMo3ztcGviN98yOOR1OeD2HwSIVd5XsGnb9zgbgu5xHPrHNa153BEAXFkS0pV0EZvCzouKkGF5cvXSrDGfYIPmx2f2Q+p08uoXdJ9+AznGhKQHb9Fgkb+0LRkxHrYcEKfj8hjTJP9rfWaVixr2pWWdMQJveEBvQQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rLqwkDXrMv1zuR8KQoJU8eb53eo2G4/ab4E44LO/ZlE=; b=I9ZBqy3RrOKGrnlOJRfbSp5Z+Oef7gFI3oCiGL4Ekdsfs7yeHTWD6dHU8arZV3PKcvbQWYKJM2muTyq8qK5/jVZ50H2IXGWRyElbVUAKPUJ71TthsubsTOQ5RTaCvLtBRJxepCvovyuE9izK2m/AFEUGbvpHZygZ+qA31wbYI0k= Received: from VI1PR04MB5135.eurprd04.prod.outlook.com (20.177.52.139) by VI1PR04MB5198.eurprd04.prod.outlook.com (20.177.49.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Sat, 28 Mar 2020 12:36:45 +0000 Received: from VI1PR04MB5135.eurprd04.prod.outlook.com ([fe80::e51b:b40c:9a6d:fbf]) by VI1PR04MB5135.eurprd04.prod.outlook.com ([fe80::e51b:b40c:9a6d:fbf%5]) with mapi id 15.20.2835.023; Sat, 28 Mar 2020 12:36:45 +0000 From: "Pankaj Bansal" To: "Jiang, Guomin" , "devel@edk2.groups.io" , Pankaj Bansal , Leif Lindholm , "Ni, Ray" , Ard Biesheuvel CC: "Wang, Jian J" , "Wu, Hao A" , "Ma, Maurice" , "Dong, Guo" , "You, Benjamin" , Meenakshi Aggarwal , Varun Sethi , Samer El-Haj-Mahmoud Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq Support Thread-Topic: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq Support Thread-Index: AQHV5vxVx5e5cJiHTUaCl0MH5dIVsKhQMn8AgAAGTYCABaHUgIAFSOsAgAMBgoA= Date: Sat, 28 Mar 2020 12:36:45 +0000 Message-ID: References: <20200219133135.10407-1-pankaj.bansal@oss.nxp.com> <20200219133135.10407-2-pankaj.bansal@oss.nxp.com> <734D49CCEBEEF84792F5B80ED585239D5C4A0C2C@SHSMSX104.ccr.corp.intel.com> <20200319153057.GV23627@bivouac.eciton.net> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@oss.nxp.com; x-originating-ip: [49.36.133.247] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a4026abb-bc6c-4f8d-a60d-08d7d314ad35 x-ms-traffictypediagnostic: VI1PR04MB5198:|VI1PR04MB5198: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 03569407CC x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5135.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(136003)(396003)(8676002)(478600001)(6506007)(71200400001)(7416002)(966005)(81156014)(81166006)(30864003)(7696005)(86362001)(9686003)(4326008)(53546011)(5660300002)(52536014)(76116006)(66946007)(66446008)(64756008)(66556008)(66476007)(19627235002)(110136005)(55016002)(54906003)(8936002)(26005)(2906002)(316002)(33656002)(186003)(579004);DIR:OUT;SFP:1101; received-spf: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H2LkVM9FkKZRwCEejaaY1WHMoVPcvQlS0Sbgef0REXYED5VXyJkNffdbt5rpDS0jN6euLnewVa5u2cvWq6XLxP2ENpq7Qw0Xk7HDLt1cHFCxnQPQXTMl3ROyvEdLSVHZ/0U+72nWNsSDRFAGSFEquJ1NafWpsSq3BzwcN3c+71zCsOb8Uqy93RZgi0a8uIiS1L19C3Hj5eUbsnf9vBGHh6va9ejzYQ6pEBIKXFuzZzbbLt8u5B00OEFPyZ2MwhxLpgSnIEC3FZeCLAGSW9chqlmLGw/AHHc83L6duiFZKhSIj89D7OVU2YA/E8hy3LxV7PFz8PbTMgdHvDxaRJEOvy3L/BwVc8m3vRsvRDT587duicqrLXuj4100jCP5+XtAGDOb/dkH3/splIbpHx1Ezs10NR2CaeEh5BS0FxyXU1sGLsalNPvzipZCkvjP/V3NMp7++nExHGAnQbNsJKRkfwDqVvJ+C+GL7B9IacNHMgMCcneW+IZ792gemnBzKyCFvsrcmDsivA4T2N0hIo4mKw== x-ms-exchange-antispam-messagedata: QFQx7rx76o/EF60U4SG57dg7W3IpGl6Uys02bDViAvYKjf653GaVpVnJVfpCUz6FC+ZHqqiIeVXnDZ3hk3CzlDDhfMGeYWCCcSXBHMTLf1isMMr1TS1v11WF7id8M1S90vd5FZnHXFZ87J4vbtRItA== MIME-Version: 1.0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4026abb-bc6c-4f8d-a60d-08d7d314ad35 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2020 12:36:45.3006 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: k9ITjMyFnX+S1hu8qngz2zYoWaN4blCrgsX3ZMawkEUr0rnVPSzAOoyumvn5TrhJTqkQDHrLj7sHYBaG7Jhw4uZRTdvgXa3PD9NvY0JruktkcSUgzXzhZxCYP2wwlR2c X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5198 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Jiang, > -----Original Message----- > From: Jiang, Guomin > Sent: Thursday, March 26, 2020 7:44 PM > To: devel@edk2.groups.io; Pankaj Bansal ; Leif > Lindholm ; Ni, Ray > Cc: Pankaj Bansal (OSS) ; Wang, Jian J > ; Wu, Hao A ; Ma, Maurice > ; Dong, Guo ; You, Benjamin > ; Meenakshi Aggarwal > ; Varun Sethi > Subject: RE: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock f= req > Support >=20 > It is a good idea, >=20 > I have a question: > 1. When can detect the jumper signal or register? -> This depends on platform. Ideally as early as possible in boot process= (in SEC phase), because PEI Core and onwards, all modules start making cal= l to DebugLib constructor. > 2. If the jumper use GPIO, SerialUartClockLib will depend on GpioLib? -> Yes, SerialUartClockLib can depend on other libraries as well. E.g. in= https://edk2.groups.io/g/devel/message/56009, SerialUartClockLib depends o= n ArmPlatformLib > 3. If the register is inside SIO, how to dispose the dependence? -> I did not understand term SIO. Quick google search throws up Intel Ser= ial IO host controller driver. Intel Serial IO driver is required if you pl= an to use the I2C, UART, or GPIO host controllers. Is that what you are referring to ? I assume you mean that what happe= ns if the SerialUartClockLib, tries to read registers that require SerialPo= rtLib ? i.e. circular dependency i.e deadlock ? In that case, some kind of intervention is required on Platform owner= part. May be implement a version of SerialUartClockLib for SEC phase that = doesn't depend on SerialPortLib, which lets the serial port to initialize. For all other module types, implement = another version of SerialUartClockLib. >=20 > If it is too complex to implement the SerialUartClockLib, the project ow= ner will > choose use BaseSerialUartClockLib rather implement it. and in this case= , it make > no sense after import complexity. Complexity is platform specific. We have implemented BaseSerialUartClockLi= b in https://edk2.groups.io/g/devel/message/56009. >=20 > I have also reviewed the ArmPlatformPkg/Library/PL011UartClockLib code, = it > still use the fixed data rather than dynamically detect clock. Right. As I said, making PcdSerialClockRate as Dynamic PCD, we cannot use = this in modules for which PcdLib is BasePcdLibNull. It results in ASSERT. >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Pankaj > > Bansal > > Sent: Monday, March 23, 2020 1:31 PM > > To: Leif Lindholm ; Ni, Ray > > Cc: Pankaj Bansal (OSS) ; Wang, Jian J > > ; Wu, Hao A ; Ma, Maurice > > ; Dong, Guo ; You, > > Benjamin ; Meenakshi Aggarwal > > ; Varun Sethi ; > > devel@edk2.groups.io > > Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock > > freq Support > > > > Hi Ray, > > > > I had thought of making PcdSerialClockRate as Dynamic PCD I had made > > changes for it too. > > But it doesn't work. > > SerialPortInitalize, which uses PcdSerialClockRate, gets called from D= ebugLib > > constructor. > > DebugLib is used by every module to print any info onto console. > > For DxeCore and PcdDxe, for which PcdLib instance is NULL, this result= s in > > Assert : > > > > https://github.com/tianocore/edk2/blob/master/MdePkg/Library/BasePcdLi > > bNull/PcdLib.c#L123 > > > > The other approach that I thought of was, to copy BaseSerialPortLib165= 50 for > > our platform and simply return EFI_SUCCESS from SerialPortInitalize. > > But as Leif pointed out, this results in code duplication. > > > > Regards, > > Pankaj Bansal > > > > > -----Original Message----- > > > From: Leif Lindholm > > > Sent: Thursday, March 19, 2020 9:01 PM > > > To: Ni, Ray > > > Cc: Pankaj Bansal (OSS) ; Wang, Jian J > > > ; Wu, Hao A ; Ma, Maurice > > > ; Dong, Guo ; You, > > Benjamin > > > ; Meenakshi Aggarwal > > > ; Varun Sethi ; > > > devel@edk2.groups.io; Pankaj Bansal > > > Subject: Re: [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq > > Support > > > > > > Hi Ray, > > > > > > I agree it would be nice, but if not - this lets us get rid of > > > otherwise needless driver duplication. To me, that makes it worth a > > > little trivial churn. > > > > > > / > > > Leif > > > > > > On Thu, Mar 19, 2020 at 15:09:19 +0000, Ni, Ray wrote: > > > > It seems this change requires all platforms DSC to include the new > > > > library > > > class/instance. > > > > > > > > Is there a way that can avoid the platform impact? > > > > > > > > Thanks, > > > > Ray > > > > > > > > > -----Original Message----- > > > > > From: Pankaj Bansal > > > > > Sent: Wednesday, February 19, 2020 9:32 PM > > > > > To: Wang, Jian J ; Wu, Hao A > > > ; Ni, Ray ; Ma, Maurice > > > > > ; Dong, Guo ; You, > > > Benjamin ; Leif Lindholm > > > > > ; Meenakshi Aggarwal > > > ; Varun Sethi > > > > > Cc: devel@edk2.groups.io; Pankaj Bansal > > > > > Subject: [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq > > Support > > > > > > > > > > From: Pankaj Bansal > > > > > > > > > > Some platform support dynamic clocking, which is controlled by > > > > > some jumper setting or hardware registers. Result of that is tha= t > > > > > PCD PcdSerialClockRate would need to be updated for frequency > > change. > > > > > > > > > > This patch implements support for dynamic frequency for Uart. > > > > > > > > > > This patch implements default lib, which is using Pcd. Platform > > > > > which needs dynamic clocking needs implement SerialUartClockLib > > > > > > > > > > This patch is based on ArmPlatformPkg/Library/PL011UartClockLib > > > > > > > > > > Signed-off-by: Pankaj Bansal > > > > > --- > > > > > .../Include/Library/SerialUartClockLib.h | 21 ++++++++++++= +++ > > > > > .../BaseSerialPortLib16550.c | 9 ++++--- > > > > > .../BaseSerialPortLib16550.inf | 2 +- > > > > > .../BaseSerialUartClockLib.c | 24 ++++++++++++= +++++ > > > > > .../BaseSerialUartClockLib.inf | 27 ++++++++++++= +++++++ > > > > > MdeModulePkg/MdeModulePkg.dsc | 2 ++ > > > > > SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 1 + > > > > > UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 1 + > > > > > UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 1 + > > > > > 9 files changed, 83 insertions(+), 5 deletions(-) create mode > > > > > 100644 MdeModulePkg/Include/Library/SerialUartClockLib.h > > > > > create mode 100644 > > > MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib.c > > > > > create mode 100644 > > > MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib.i= nf > > > > > > > > > > diff --git a/MdeModulePkg/Include/Library/SerialUartClockLib.h > > > b/MdeModulePkg/Include/Library/SerialUartClockLib.h > > > > > new file mode 100644 > > > > > index 000000000000..b6b16f71d4cf > > > > > --- /dev/null > > > > > +++ b/MdeModulePkg/Include/Library/SerialUartClockLib.h > > > > > @@ -0,0 +1,21 @@ > > > > > +/** @file > > > > > +* > > > > > +* Copyright 2020 NXP > > > > > +* > > > > > +* SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > +* > > > > > +**/ > > > > > + > > > > > +#ifndef SERIAL_UART_CLOCK_LIB_H__ #define > > > > > +SERIAL_UART_CLOCK_LIB_H__ > > > > > + > > > > > +/** > > > > > + Return clock in for Uart IP > > > > > +**/ > > > > > +UINT32 > > > > > +EFIAPI > > > > > +BaseSerialPortGetClock ( > > > > > + VOID > > > > > + ); > > > > > + > > > > > +#endif > > > > > diff --git > > > > > a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c > > > > > > > b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib165 > > > > > 50.c index 9cb50dd80d56..2e0c05d5789e 100644 > > > > > --- > > > > > a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c > > > > > +++ > > > > > b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c > > > > > @@ -16,6 +16,7 @@ > > > > > #include > > > > > #include > > > > > #include > > > > > +#include > > > > > #include > > > > > > > > > > // > > > > > @@ -501,8 +502,8 @@ SerialPortInitialize ( > > > > > // Calculate divisor for baud generator > > > > > // Ref_Clk_Rate / Baud_Rate / 16 > > > > > // > > > > > - Divisor =3D PcdGet32 (PcdSerialClockRate) / (PcdGet32 > > > > > (PcdSerialBaudRate) * > > > 16); > > > > > - if ((PcdGet32 (PcdSerialClockRate) % (PcdGet32 > > > > > (PcdSerialBaudRate) * > > > 16)) >=3D PcdGet32 (PcdSerialBaudRate) * 8) { > > > > > + Divisor =3D BaseSerialPortGetClock () / (PcdGet32 > > > > > + (PcdSerialBaudRate) * 16); if ((BaseSerialPortGetClock () % > > > > > + (PcdGet32 (PcdSerialBaudRate) * 16)) >=3D > > > PcdGet32 (PcdSerialBaudRate) * 8) { > > > > > Divisor++; > > > > > } > > > > > > > > > > @@ -1080,8 +1081,8 @@ SerialPortSetAttributes ( > > > > > // Calculate divisor for baud generator > > > > > // Ref_Clk_Rate / Baud_Rate / 16 > > > > > // > > > > > - Divisor =3D PcdGet32 (PcdSerialClockRate) / (SerialBaudRate * > > > > > 16); > > > > > - if ((PcdGet32 (PcdSerialClockRate) % (SerialBaudRate * 16)) >= = =3D > > > SerialBaudRate * 8) { > > > > > + Divisor =3D BaseSerialPortGetClock () / (SerialBaudRate * 16)= ; > > > > > + if ((BaseSerialPortGetClock () % (SerialBaudRate * 16)) >=3D > > > > > + SerialBaudRate * > > > 8) { > > > > > Divisor++; > > > > > } > > > > > > > > > > diff --git > > > a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .i > > > nf > > > > > > > > b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .i > > > nf > > > > > index 8b4ae3f1d4ee..b4c16504f211 100644 > > > > > --- > > > a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .i > > > nf > > > > > +++ > > > b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550= .i > > > nf > > > > > @@ -24,6 +24,7 @@ [LibraryClasses] > > > > > IoLib > > > > > PlatformHookLib > > > > > PciLib > > > > > + SerialUartClockLib > > > > > > > > > > [Sources] > > > > > BaseSerialPortLib16550.c > > > > > @@ -37,7 +38,6 @@ [Pcd] > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate = ## > > > CONSUMES > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl = ## > > > CONSUMES > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl = ## > > > CONSUMES > > > > > - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate = ## > > > CONSUMES > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo = ## > > > CONSUMES > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize > > ## > > > CONSUMES > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride = ## > > > CONSUMES > > > > > diff --git > > > a/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib= .c > > > > > b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartCloc= kL > > > > > ib.c > > > > > new file mode 100644 > > > > > index 000000000000..7a0d0427cc4e > > > > > --- /dev/null > > > > > +++ > > > b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib= .c > > > > > @@ -0,0 +1,24 @@ > > > > > +/** @file > > > > > +* > > > > > +* Copyright 2020 NXP > > > > > +* > > > > > +* SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > +* > > > > > +**/ > > > > > + > > > > > +#include > > > > > +#include > > > > > + > > > > > +/** > > > > > + Return clock in for Uart IP > > > > > + > > > > > + @return Pcd PcdSerialClockRate > > > > > +**/ > > > > > +UINT32 > > > > > +EFIAPI > > > > > +BaseSerialPortGetClock ( > > > > > + VOID > > > > > + ) > > > > > +{ > > > > > + return PcdGet32 (PcdSerialClockRate); } > > > > > diff --git > > > a/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib= .i > > > nf > > > > > > > > b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib= .i > > > nf > > > > > new file mode 100644 > > > > > index 000000000000..91ba69436ed6 > > > > > --- /dev/null > > > > > +++ > > > b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib= .i > > > nf > > > > > @@ -0,0 +1,27 @@ > > > > > +#/* @file > > > > > +# Copyright 2020 NXP > > > > > +# > > > > > +# SPDX-License-Identifier: BSD-2-Clause-Patent # #*/ > > > > > + > > > > > +[Defines] > > > > > + INF_VERSION =3D 0x0001001A > > > > > + BASE_NAME =3D BaseSerialUartClockLib > > > > > + FILE_GUID =3D fa65495e-d3c8-4ea3-9737-99= 4e9ccbaf11 > > > > > + MODULE_TYPE =3D BASE > > > > > + VERSION_STRING =3D 1.0 > > > > > + LIBRARY_CLASS =3D SerialUartClockLib > > > > > + > > > > > +[Packages] > > > > > + MdePkg/MdePkg.dec > > > > > + MdeModulePkg/MdeModulePkg.dec > > > > > + > > > > > +[Sources.common] > > > > > + BaseSerialUartClockLib.c > > > > > + > > > > > +[LibraryClasses] > > > > > + PcdLib > > > > > + > > > > > +[Pcd] > > > > > + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate = ## > > > CONSUMES > > > > > diff --git a/MdeModulePkg/MdeModulePkg.dsc > > > b/MdeModulePkg/MdeModulePkg.dsc > > > > > index f7dbb27ce25d..d581ca797b3b 100644 > > > > > --- a/MdeModulePkg/MdeModulePkg.dsc > > > > > +++ b/MdeModulePkg/MdeModulePkg.dsc > > > > > @@ -65,6 +65,7 @@ [LibraryClasses] > > > > > UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf > > > > > > > > > > SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementL > > ib/D > > > xeSecurityManagementLib.inf > > > > > > > > > > TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTem > > pl > > > TimerLib|at > > > e.inf > > > > > + > > > > > SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer > > > SerialUartClockLib|ialU > > > artClockLib.inf > > > > > > > > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLib= Nu > > > SerialPortLib|ll.inf > > > > > > > > > > CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.i > > n > > > CapsuleLib|f > > > > > PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > > > > > @@ -292,6 +293,7 @@ [Components] > > > > > > > > > > MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib. > > inf > > > > > > > > > > MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeRep > > ortSt > > > atusCodeLib.inf > > > > > > > > > > MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.i > > nf > > > > > + > > > MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib.i= nf > > > > > > > > MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.i= nf > > > > > > > > > > MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull > > .i > > > nf > > > > > > > > > > MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLe > > ve > > > lLi > > > b.inf > > > > > diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc > > > b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc > > > > > index a1a1b81d03cb..c0ad88f26341 100644 > > > > > --- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc > > > > > +++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc > > > > > @@ -33,6 +33,7 @@ [LibraryClasses.common] > > > > > > > > > > SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroni > > > SynchronizationLib|zati > > > onLib.inf > > > > > LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf > > > > > > > > > > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base > > P > > > PeCoffGetEntryPointLib|eC > > > offGetEntryPointLib.inf > > > > > + > > > > > SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer > > > SerialUartClockLib|ialU > > > artClockLib.inf > > > > > > > > SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= Po > > > SerialPortLib|rtLib > > > 16550.inf > > > > > > > > > > PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibD > > > PeCoffExtraActionLib|ebu > > > g/PeCoffExtraActionLibDebug.inf > > > > > > > > > > TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLi > > b > > > TimerLib|Ue > > > fiCpu.inf > > > > > diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > > > b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > > > > > index d52945442e0e..a556a32b272c 100644 > > > > > --- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > > > > > +++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > > > > > @@ -174,6 +174,7 @@ [LibraryClasses] > > > > > # > > > > > TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf > > > > > > > > > > ResetSystemLib|UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.in > > > ResetSystemLib|f > > > > > + > > > > > SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer > > > SerialUartClockLib|ialU > > > artClockLib.inf > > > > > > > > SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= Po > > > SerialPortLib|rtLib > > > 16550.inf > > > > > > > > > > PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib > > > PlatformHookLib|.in > > > f > > > > > > > > > > PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/ > > P > > > PlatformBootManagerLib|l > > > atformBootManagerLib.inf > > > > > diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc > > > b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc > > > > > index 0736cd995476..7e86375fe57d 100644 > > > > > --- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc > > > > > +++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc > > > > > @@ -175,6 +175,7 @@ [LibraryClasses] > > > > > # > > > > > TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf > > > > > > > > > > ResetSystemLib|UefiPayloadPkg/Library/ResetSystemLib/ResetSystemLib.in > > > ResetSystemLib|f > > > > > + > > > > > SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer > > > SerialUartClockLib|ialU > > > artClockLib.inf > > > > > > > > SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerial= Po > > > SerialPortLib|rtLib > > > 16550.inf > > > > > > > > > > PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib > > > PlatformHookLib|.in > > > f > > > > > > > > > > PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/ > > P > > > PlatformBootManagerLib|l > > > atformBootManagerLib.inf > > > > > -- > > > > > 2.17.1 > > > > > > > >=20