From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.72]) by mx.groups.io with SMTP id smtpd.web11.12400.1584625223837055100 for ; Thu, 19 Mar 2020 06:40:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=G6bHMNY+; spf=pass (domain: arm.com, ip: 40.107.6.72, mailfrom: samer.el-haj-mahmoud@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u3fSqxHvDsQLfk1pyIOjl/GEuT4D97cArfFj9asz/kY=; b=G6bHMNY+IEJVYTh5Cl4fCwfksTCk4AjJg/JW+i98DGJPCaB8E3qx7LCKB/vvb8kIazRs7eTtO1ZMn6YTOpYK1Rd8dRkI3++46ljSE0MD5AzAZiIGy76bSeXxZZSyvLK2MQxNrWj/6zUhupj/RInbpogWjsveMdKfbkbD2lSPvH0= Received: from AM0P190CA0015.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::25) by DB8PR08MB5116.eurprd08.prod.outlook.com (2603:10a6:10:e5::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.19; Thu, 19 Mar 2020 13:40:20 +0000 Received: from AM5EUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:190:cafe::3e) by AM0P190CA0015.outlook.office365.com (2603:10a6:208:190::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Thu, 19 Mar 2020 13:40:20 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT062.mail.protection.outlook.com (10.152.17.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Thu, 19 Mar 2020 13:40:19 +0000 Received: ("Tessian outbound 0e34ea672d09:v48"); Thu, 19 Mar 2020 13:40:19 +0000 X-CR-MTA-TID: 64aa7808 Received: from 20216dab7d9f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 888691FC-710E-4DCC-A3D4-AE5E4358472D.1; Thu, 19 Mar 2020 13:40:14 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 20216dab7d9f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 19 Mar 2020 13:40:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tz3xJLKyftYQjD1gFX6KXIL5dNj9Qz7vCiaFYbaUZeffSOoqLYQsk+ioNUFmtVvKt3PMDoUD49+OOZIifi2FeETaNNGvh7i2GwUaaebgdK+84eECy9INP+mFLXuAmS5XNDKdyf+R3C8wg+fWjsLL8sjRkhgvHMtEi3kiF/DQjgtBymAMW2ed8gSQh1Of4Rug98ISnPgLLzpP29SGcffby185Z2obHg9lnVt8vydaPfX8UBBQEiD7weMSJaIQwsG/2Gh1a0r8M4Z/aNjl8xBKRk0oZhtu7RJvFZPiO5AEKPrbER8XPm6IDkkNFnaoI+QmLmm6jnXASq3xqxs4CM27lg== 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=u3fSqxHvDsQLfk1pyIOjl/GEuT4D97cArfFj9asz/kY=; b=NZwPf/CNpDr00bdgIXEJaeMnRcT+TQ96h+unR1jN4lKtdsOYMd5xTtSt0JGmARLXbDSWZ2hJ7hiIMGiJUZcCG0q9L8DNH6wVqrF+2HLKsqY7OhM/p9g3HE162ZOS5HcEU+NffPvwfhsoHorVmSO23r+wqjcB6aHoU1T4/ygPFPgol8y5p5j5bITjEdodv3OrbzhRjhWuJJq6t0reAcuWgTuh33F8tj94JyqpXEio5YYiMwNXLOyFk84mCBYMHWrT5cKTU/plO5nvH1CJHloGBDJR0w5no+ERrkffRoKzN5gieuEFYYvlkrjskSJ53tkU3V7/oy4ar8geb/8IhXm51w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u3fSqxHvDsQLfk1pyIOjl/GEuT4D97cArfFj9asz/kY=; b=G6bHMNY+IEJVYTh5Cl4fCwfksTCk4AjJg/JW+i98DGJPCaB8E3qx7LCKB/vvb8kIazRs7eTtO1ZMn6YTOpYK1Rd8dRkI3++46ljSE0MD5AzAZiIGy76bSeXxZZSyvLK2MQxNrWj/6zUhupj/RInbpogWjsveMdKfbkbD2lSPvH0= Received: from VE1PR08MB4830.eurprd08.prod.outlook.com (10.255.113.19) by VE1PR08MB5165.eurprd08.prod.outlook.com (20.179.31.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19; Thu, 19 Mar 2020 13:40:12 +0000 Received: from VE1PR08MB4830.eurprd08.prod.outlook.com ([fe80::f01b:f10f:d03f:e9c7]) by VE1PR08MB4830.eurprd08.prod.outlook.com ([fe80::f01b:f10f:d03f:e9c7%6]) with mapi id 15.20.2835.017; Thu, 19 Mar 2020 13:40:12 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , "pankaj.bansal@oss.nxp.com" , Jian J Wang , Hao A Wu , Ray Ni , Maurice Ma , Guo Dong , Benjamin You , Leif Lindholm , "Meenakshi Aggarwal (meenakshi.aggarwal@nxp.com)" , "V Sethi (v.sethi@nxp.com)" CC: Pankaj Bansal , 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: AQHV5xo+iexlBZiafUK+UzKtPSiuIahQGWng Date: Thu, 19 Mar 2020 13:40:11 +0000 Message-ID: References: <20200219133135.10407-1-pankaj.bansal@oss.nxp.com> <20200219133135.10407-2-pankaj.bansal@oss.nxp.com> In-Reply-To: <20200219133135.10407-2-pankaj.bansal@oss.nxp.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: eeb78ec7-b259-47ff-b952-bd019cd585b1.1 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Samer.El-Haj-Mahmoud@arm.com; x-originating-ip: [99.132.126.10] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5a246bf8-ba1f-4128-602f-08d7cc0b10f4 x-ms-traffictypediagnostic: VE1PR08MB5165:|VE1PR08MB5165:|DB8PR08MB5116: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:127;OLM:7219; x-forefront-prvs: 0347410860 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4636009)(366004)(376002)(136003)(39860400002)(346002)(396003)(199004)(71200400001)(19627235002)(81156014)(186003)(86362001)(4326008)(966005)(81166006)(8676002)(6506007)(7416002)(2906002)(7696005)(110136005)(26005)(9686003)(53546011)(55016002)(8936002)(54906003)(478600001)(33656002)(30864003)(52536014)(316002)(5660300002)(66476007)(64756008)(66446008)(66556008)(66946007)(76116006)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR08MB5165;H:VE1PR08MB4830.eurprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: KFYBM6UwSmIHB6IKloTLvjVHFvCFgyk8kEoBr0WUBQThWV0K43BjAgQIaO7h0QFtRiU4FZciY5UBIWrh7x3JBT6zm2MDX0KBZmCbOapmCnRmDrejA0E9/ZTAT4wFUiWyP3U6K7kYkv70pfGEfWgpu+5PpY0Iq5vGdaTE/4Imf2TFuruWN/SWqXfBudu+utj209AgtiQVDByeWpx9w3QUNv4A08o80VPemN006xbOXkAhKk2GTGSptaQH5qKT8nqBzEAD1a5/tnYFs0YWF1WKPNo1aVfz+FKxJmR45admiNO5f8eMWkMy18uaZ3vZAkYEmofGphtkTLowKhyMXcw3QA4RdjzSZ+Ds/O64kjRd369H6PSCPUxaDvBHiopUR1KovrtSKDNLq4qyG2f6h8Fij262zcFkTQY67KhGqHF/LcNk668ZR8KzDxVGvyzSz+Cl88XpI5l1bR050pBc94ZVLSAIZMO9wc4zE8Ytkrbo75xuTpaDszoZQAO38c47Rgme7Z/nYBZLQOUSnyJg0fljs8ErrL5NQGgobqDvz3mAY3idiMBn+TioaC/kq+Cn62OPTnL7fOZ5hvtskwWu72sR6A== x-ms-exchange-antispam-messagedata: 2tjEq0w0TADTQfvv6AMKV4bHxrTHas+anvSBonMFa+jWBwOOW5FRKctmRQdPC2bhqOCRjU6TXvW2jxsYI0wkpdSeAe6z10OXOem+uPrB1qP48+XlKX0P2PHaJFuLjQHB59f9xNb70ffbvcft1hk15g== MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5165 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Samer.El-Haj-Mahmoud@arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT062.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(376002)(346002)(136003)(199004)(46966005)(81156014)(70206006)(70586007)(110136005)(356004)(2906002)(5660300002)(52536014)(54906003)(316002)(53546011)(7696005)(6506007)(30864003)(86362001)(19627235002)(36906005)(478600001)(966005)(33656002)(81166006)(8936002)(8676002)(26826003)(47076004)(26005)(186003)(4326008)(9686003)(336012)(55016002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB5116;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:Pass;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: ea205e5f-2a30-417b-a692-08d7cc0b0c6b X-Forefront-PRVS: 0347410860 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CC0d1OiTfBOvzyjPfUNcOodEoPN9q5sxVJlFtZvh8IVukbHNYiWpEV9G9YRp4tZtZBJ7KZ4cdXAuvyQAwJX7Eo0sF87uW8WfqJ1Uk4YFeHT2sfUsXo+tGbTVvlsjYUNKlO3g64TAXFqAfK5zfNSMHDfSgl917NGwqhdHV5/qMpdLBP1L5MhPSYkB854PwJX3jIL+9kYQQkc3rB/xTim9BVFi5WHL6WUGvvumIIjbPh+/ysqZgIiNl/qF02o5ZtWpH7eiMtBlscHYRgtngAEkhxKNgoqyGMwxRCR+6bTjrC7l0YaxAYCUO1V/5soQXzLBpOB/MuqH7wHpsYkPDixfRFjnZ7FT4FPrcpDjk2APnZOuGFBvVhuH8acpQpDcT9q13FdZRDJ0FTzJoHwvnv1dZ/omjBQgDrC+T+Mu8HpLfuGWpaS4Snns6BYZeCwcNqOJDkw0IZocZQSP3JGwAokj4CUELuld7hwPpMsFwzYwSiSiT2xa+dwxQsPdA+w6uTIKx/GNgD1cAc/KPRQ8AOK6HKhz3jC4HjPq8jQP/q1PkuipVEGPbycMYgyj75Tzg9kPTwXugljr9BDzkc4gCB5+KRj6MSSynHnmXu8osDtS93UHICljdZpgsxn87Pdui+qO X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 13:40:19.6551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a246bf8-ba1f-4128-602f-08d7cc0b10f4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5116 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Any help from maintainers in reviewing this MdeModulePkg patch please? Thanks, --Samer -----Original Message----- From: devel@edk2.groups.io On Behalf Of Pankaj Bans= al via Groups.Io Sent: Wednesday, February 19, 2020 8:32 AM To: Jian J Wang ; Hao A Wu ; Ra= y Ni ; Maurice Ma ; Guo Dong ; Benjamin You ; Leif Lindholm ; Meenakshi Aggarwal (meenakshi.aggarwal@nxp.com) ; V Sethi (v.sethi@nxp.com) Cc: devel@edk2.groups.io; Pankaj Bansal Subject: [edk2-devel] [PATCH 1/1] MdeModulePkg: UART Dynamic clock freq Su= pport From: Pankaj Bansal Some platform support dynamic clocking, which is controlled by some jumper= setting or hardware registers. Result of that is that PCD PcdSerialClockRa= te 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 need= s 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 Mde= ModulePkg/Include/Library/SerialUartClockLib.h create mode 100644 MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerial= UartClockLib.c create mode 100644 MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerial= UartClockLib.inf diff --git a/MdeModulePkg/Include/Library/SerialUartClockLib.h b/MdeModule= Pkg/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/BaseSerialPortLib= 16550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib1655= 0.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 (PcdSerialBaudRat= e) * 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 Serial= BaudRate * 8) { + Divisor =3D BaseSerialPortGetClock () / (SerialBaudRate * 16); if + ((BaseSerialPortGetClock () % (SerialBaudRate * 16)) >=3D SerialBaudRate + * 8) { Divisor++; } diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib= 16550.inf b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16= 550.inf index 8b4ae3f1d4ee..b4c16504f211 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.i= nf +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550 +++ .inf @@ -24,6 +24,7 @@ [LibraryClasses] IoLib PlatformHookLib PciLib + SerialUartClockLib [Sources] BaseSerialPortLib16550.c @@ -37,7 +38,6 @@ [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl ## CONS= UMES - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialPciDeviceInfo ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize ## CONS= UMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## CONS= UMES diff --git a/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClo= ckLib.c b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLi= b.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/BaseSerialUartClo= ckLib.inf b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClock= Lib.inf new file mode 100644 index 000000000000..91ba69436ed6 --- /dev/null +++ b/MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib +++ .inf @@ -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-994e9ccbaf11 + 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 ## CONS= UMES 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/DxeSecurityManagementLib/Dxe= SecurityManagementLib.inf TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTempla= te.inf + + SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer + ialUartClockLib.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNul= l.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf @@ -292,6 +293,7 @@ [Components] MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStat= usCodeLib.inf MdeModulePkg/Library/RuntimeResetSystemLib/RuntimeResetSystemLib.inf + + MdeModulePkg/Library/BaseSerialUartClockLib/BaseSerialUartClockLib.inf MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.in= f MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevel= Lib.inf diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc b/SourceLevelDebu= gPkg/SourceLevelDebugPkg.dsc index a1a1b81d03cb..c0ad88f26341 100644 --- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc +++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc @@ -33,6 +33,7 @@ [LibraryClasses.common] SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniz= ationLib.inf LocalApicLib|UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePe= CoffGetEntryPointLib.inf + + SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer + ialUartClockLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPor= tLib16550.inf PeCoffExtraActionLib|SourceLevelDebugPkg/Library/PeCoffExtraActionLibDe= bug/PeCoffExtraActionLibDebug.inf TimerLib|UefiCpuPkg/Library/SecPeiDxeTimerLibUefiCpu/SecPeiDxeTimerLibU= efiCpu.inf diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPa= yloadPkgIa32.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.inf + + SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer + ialUartClockLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPor= tLib16550.inf PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.= inf PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/Pl= atformBootManagerLib.inf diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc b/UefiPayloadPkg/Uef= iPayloadPkgIa32X64.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.inf + + SerialUartClockLib|MdeModulePkg/Library/BaseSerialUartClockLib/BaseSer + ialUartClockLib.inf SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPor= tLib16550.inf PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.= inf PlatformBootManagerLib|UefiPayloadPkg/Library/PlatformBootManagerLib/Pl= atformBootManagerLib.inf -- 2.17.1 IMPORTANT NOTICE: The contents of this email and any attachments are confi= dential and may also be privileged. If you are not the intended recipient, = please notify the sender immediately and do not disclose the contents to an= y other person, use it for any purpose, or store or copy the information in= any medium. Thank you.