From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.55]) by mx.groups.io with SMTP id smtpd.web10.4404.1592859656845055463 for ; Mon, 22 Jun 2020 14:00:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=mPXcdUM/; spf=pass (domain: arm.com, ip: 40.107.14.55, 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=1UYLnsJWI6FHoFiu73InFTss2UjzXkf23v6KTposk/w=; b=mPXcdUM/e9Ko2YbqvTxuORbY5dJV9MLtIarxLk6fBFBXHs8S5GXkEEOtBOZ8hhJIdfcWybH0czFQ2TM0oYmjeKMAUvAHoZPRXCnBZSP5HZR4mMjp2uf6bpif8if67isP2KcVRNxGEwIejupSDDQz6KNdK05EpAjvAr46wQAJtrA= Received: from AM6PR0502CA0065.eurprd05.prod.outlook.com (2603:10a6:20b:56::42) by AM0PR08MB5282.eurprd08.prod.outlook.com (2603:10a6:208:129::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Mon, 22 Jun 2020 21:00:54 +0000 Received: from VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::96) by AM6PR0502CA0065.outlook.office365.com (2603:10a6:20b:56::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Mon, 22 Jun 2020 21:00:54 +0000 X-MS-Exchange-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 VE1EUR03FT051.mail.protection.outlook.com (10.152.19.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Mon, 22 Jun 2020 21:00:53 +0000 Received: ("Tessian outbound 8fb20e43acb7:v59"); Mon, 22 Jun 2020 21:00:53 +0000 X-CR-MTA-TID: 64aa7808 Received: from 4013e27632e4.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8952F8A1-9A36-45E5-8C5B-C0EDC8518AC6.1; Mon, 22 Jun 2020 21:00:48 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 4013e27632e4.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 22 Jun 2020 21:00:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QY3NI63h5ZVCtSpjUMFa5aZ4VlgkV0YKZ4eCM+Lj9pFcZt7CdxLqXOT+945VZ/nuYbJYYOGYRwYWoIiXC63w+hzroazrKDbC9PRsE7sDEnK264RyBcSOGCzmXu8npuxM32wBVFmvTlV6nP+O28yDv9X8Q//9/g+OhxrMK1cDF608dccW6v5Q+DVx4dCJo1mO0Eb200T6PTSqNe4E9EHuEFGkOJ6HxLkykBlXzfey3jUONFN2ZCiUobSZUnrJ0we8QnA6z2nqE1/bGlOQFIT8ElONy1YNseZ+feDdQbu/jEvApv2PNNLZpBeFyGiPksh9mKnSHtNS2BZHQyoUvZU53A== 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=1UYLnsJWI6FHoFiu73InFTss2UjzXkf23v6KTposk/w=; b=VetAhCIqO0EHuww9dXIpbP3EqC6+Vwc5x2skmy2MGnPgoMk9T8vLBKqMNSovYFkG6g8p306OAgXsZ4irLrVp+EszYx3GPB18x1qZZZZGhdxgS6yufTiikN9r9cRT2WTy2jSCyKH6gPgHUaVxwzt4VwOkkV2XTkLaNkZlyF1y3tWmhbckzAzdInlDgEuYxu6YT+tzrhUyJevbqBvvG21NgPXmZU6PVRvIp1M/tlRb8TMDLcHNTaOC2ZXysFMwsdztndn9S4DOCuG9olMxqf4G0q/QSCIqVw54S1duFMJtcpAZrVtHoVgzAYx20j5R9mOFhLpIMVx0HFvMqOszBEvrDg== 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=1UYLnsJWI6FHoFiu73InFTss2UjzXkf23v6KTposk/w=; b=mPXcdUM/e9Ko2YbqvTxuORbY5dJV9MLtIarxLk6fBFBXHs8S5GXkEEOtBOZ8hhJIdfcWybH0czFQ2TM0oYmjeKMAUvAHoZPRXCnBZSP5HZR4mMjp2uf6bpif8if67isP2KcVRNxGEwIejupSDDQz6KNdK05EpAjvAr46wQAJtrA= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DB7PR08MB2972.eurprd08.prod.outlook.com (2603:10a6:5:1b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Mon, 22 Jun 2020 21:00:45 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::88ec:d703:3e32:4c6b]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::88ec:d703:3e32:4c6b%5]) with mapi id 15.20.3109.027; Mon, 22 Jun 2020 21:00:45 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , "ipark@nvidia.com" , Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH v2] ArmPlatformPkg/PL011UartLib: Check PID2 if FiFoDepth is zero Thread-Topic: [edk2-devel] [PATCH v2] ArmPlatformPkg/PL011UartLib: Check PID2 if FiFoDepth is zero Thread-Index: AQHWSNHdnoyZ7JJgEESiVjd3hWo62KjlHowA Date: Mon, 22 Jun 2020 21:00:45 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=ipark@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2020-06-22T20:14:39.1314960Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_ActionId=192ae5ab-a83e-4663-94d7-10711a9bba9d; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic x-ts-tracking-id: 21e55b01-5c9a-4049-972a-dd3c5e443553.1 x-checkrecipientchecked: true Authentication-Results-Original: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=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: a43a439b-6e05-4793-0513-08d816ef5a1b x-ms-traffictypediagnostic: DB7PR08MB2972:|AM0PR08MB5282: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; x-forefront-prvs: 0442E569BC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: l63AXzcoIvtYQ0A2W+hrL20a3w2aD/Rifrb74SAGWlbHKsUTvujABJV46d+8KKf9JJtnE1LTFQnrSiCi2vYWa21nf9bXBjPEAbGwlKJ3v+GxwqtCSUHQGw1JTVShbLWVIGU4/1Pm3LPP+77hFImn82wwTuNl/O+iuqdzVVDHr92Xw5X/H97z/AkKI23UgqR72NBLnN6lri79zpiYLcUlvm0ItXELREMteST/ExV1SHSp/me9VZnC30+SWhoPTeK7u53irMxHg/FqMuydlkMPZd8wI1uU7iZWRS9mHai3Ew333YoFclkhokz2XB0Pp5f1aX9lo3+f28FxuWOet8F+G2t0zqrv+GjYGmA38QnAdYgN0bsJIiwWQZB2p2afkg9zpym4XJbY97AJ0CwsoS12ZQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3260.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(396003)(39860400002)(136003)(376002)(366004)(346002)(5660300002)(478600001)(316002)(55016002)(9686003)(76116006)(19627235002)(110136005)(66946007)(186003)(66476007)(66556008)(64756008)(2906002)(66446008)(86362001)(26005)(6636002)(6506007)(53546011)(966005)(7696005)(33656002)(83380400001)(8936002)(71200400001)(8676002)(52536014);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: j1yplWOBkTLDJ2VK1J4QBQwoNYf/duI1iGqZNPeWb0h/mJuSWH7KsRtU7RIz3JJx6FtSa4APoB3G0YdIaiS7w7illAn9jZ3pGQqvWC9VCdgB+7tuhp2G+lJyRNORkdjTDBOLkVF1vR2CvL0W6aVpuqYWCRDj8LM32GvMQeJIZ+B+k81G0Dgq+U/gvJkO6BfK0ul70lPORtT/55GQLX2co9AyENPdrt3l5xuZvAqNlufiE74QL2U3RhE8GYvpTR8F9IsS6JHdPSUxW95sgeWAgtsDyTD+WYwPRK6YFOSoXCC/Y+4Jf67TgZlbfKvL5hr0EWQ+dZiAvyR4kpmTY8nUvx+UzCdU8wWINx9/IHh69Skwt+COs3nLSk/4i9R8sivh1M6SYZOJqZ7rILX2IicxZduNIxAdP3uJSI6shZV3aC8ZQ789eruZCb/G6Dooh1ixvNewloXwlmuxqklgpH9rllXa+89n9PcmlyFcNyxEx4rf6llnvuseMeoi/QIQBHmX MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB2972 Original-Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT051.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(346002)(136003)(376002)(396003)(39860400002)(46966005)(26005)(36906005)(33656002)(110136005)(9686003)(83380400001)(55016002)(70586007)(70206006)(82310400002)(6636002)(5660300002)(7696005)(86362001)(53546011)(6506007)(2906002)(186003)(316002)(336012)(52536014)(356005)(47076004)(478600001)(966005)(19627235002)(81166007)(82740400003)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 3aab600f-c778-4ca1-acf3-08d816ef5569 X-Forefront-PRVS: 0442E569BC X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bO9lBtmKrcpiwO2NCytEqeQi5kXuyrWrGK9mO7oiqGAfZLPh+eEbt4IkBN+N02m0NCU0CMekiKwauXYjPZqdon/fed9l3E28mvNjDj1V4WiThSDLizcE5LRd8m1VxaGwnQszwX0qnDyQoQIqarcMeMFVPrgGS/Hu/z6mNTpE9XF24SN7+sWj9zh4OAOUKf1HY6vgY37RGNYK3TfMlypD+nZAJaUGNc6No9TWiYtdLjJEry5O83TTUVbuSNQg3oRj65GHABtUPQsyx/nyxxC0uYZIvfSTDYJpei0dPFvJNjRDgKRlKFxkdKFKnQP09vGVtT+ULX9fbk1vMaeXyab773h3vpMguXrfvC1wRBnZYBCbCJqXFyqJ60N7ZrJSZtguhMr67cjaMJiZV1y6hqT6bgNP+Ic8k4uQFLCOkJ6Q+mkP1Ty39s7S7X4wI9zaljkoWM3uvNGUJ659y53bggULkZzN462LqYBMnxEjiqc3uHs= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2020 21:00:53.6550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a43a439b-6e05-4793-0513-08d816ef5a1b 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: AM0PR08MB5282 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Adding Ard's new Arm e-mail address, and removing the old Linaro e-mail. Thanks, --Samer > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Irene > Park via groups.io > Sent: Monday, June 22, 2020 4:15 PM > To: devel@edk2.groups.io; ard.biesheuvel@linaro.org > Subject: Re: [edk2-devel] [PATCH v2] ArmPlatformPkg/PL011UartLib: Check > PID2 if FiFoDepth is zero > > Hi Ard, > Would you please review this change ? > I also wonder what you think of the following. > > #if FixedPcdGet16 (PcdUartDefaultReceiveFifoDepth) =3D=3D 0 VS if > (FixedPcdGet16 (PcdUartDefaultReceiveFifoDepth) =3D=3D 0) or if > (HardwareFifoDepth =3D=3D 0) > > Thank you, > Irene > > -----Original Message----- > From: Irene Park > Sent: Tuesday, June 9, 2020 1:59 PM > To: devel@edk2.groups.io > Cc: Irene Park > Subject: [PATCH v2] ArmPlatformPkg/PL011UartLib: Check PID2 if FiFoDepth > is zero > > From: Irene Park > > PL011UartLib determines its FIFO depth based on the PID2 value but the > register PID2 is not mandatory as per the SBSA spec. > This change won't check PID2 if PcdUartDefaultReceiveFifoDepth is set to= a > value > 0. > > Signed-off-by: Irene Park > --- > ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 4 ++++ > ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf | 1 + > 2 files changed, 5 insertions(+) > > diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > index 801990d..05ad1ad 100644 > --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > @@ -79,9 +79,13 @@ PL011UartInitializePort ( > UINT32 Fractional; > UINT32 HardwareFifoDepth; > > + HardwareFifoDepth =3D FixedPcdGet16 (PcdUartDefaultReceiveFifoDepth); > +#if FixedPcdGet16 (PcdUartDefaultReceiveFifoDepth) =3D=3D 0 > HardwareFifoDepth =3D (PL011_UARTPID2_VER (MmioRead32 (UartBase + > UARTPID2)) \ > > PL011_VER_R1P4) \ > ? 32 : 16 ; > +#endif > + > // The PL011 supports a buffer of 1, 16 or 32 chars. Therefore we can > accept > // 1 char buffer as the minimum FIFO size. Because everything can be > rounded > // down, there is no maximum FIFO size. > diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf > b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf > index d99e89f..e3da507 100644 > --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf > +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf > @@ -30,6 +30,7 @@ > ArmPlatformPkg/ArmPlatformPkg.dec > > [FixedPcd] > + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth > gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate > > gArmPlatformTokenSpaceGuid.PL011UartInteger > -- > 2.7.4 > > >=20 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.