From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by mx.groups.io with SMTP id smtpd.web10.957.1593670950858463485 for ; Wed, 01 Jul 2020 23:22:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=lQyn7PXP; spf=pass (domain: nvidia.com, ip: 203.18.50.4, mailfrom: ipark@nvidia.com) Received: from hkpgpgate101.nvidia.com (Not Verified[10.18.92.77]) by nat-hk.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 02 Jul 2020 14:22:24 +0800 Received: from HKMAIL103.nvidia.com ([10.18.16.12]) by hkpgpgate101.nvidia.com (PGP Universal service); Wed, 01 Jul 2020 23:22:24 -0700 X-PGP-Universal: processed; by hkpgpgate101.nvidia.com on Wed, 01 Jul 2020 23:22:24 -0700 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 2 Jul 2020 06:22:19 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 2 Jul 2020 06:22:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=msHQaFuok4VT8Qaxbb921UeAL8XZcEz/KZtf+zJMMBjo/haCgepl5aecu5pTVBPV2BIQOuUt0XdPgS6vgFlPwizDr5kbNHTgBvKstRpUtf7MWdYr/p1xf2WmYwwLzvhydNXvZCJpWDccMFRTqdHfqKNgbQNUNagLEYYLuRXs/uywf1bp9wUq+D2/Ko78U6rO9QnMVNmk5J57A2JfZzr05ZFelFBrupYI0/eObI+sdYj619SD8SWv5gA4K3kW33qs+pUVpyiZ0CPbc79KeEXOxMhCnVa8BSeqpH/lQvYxsNWlMwsCWrEgUV0kOwgpFy96ptCAI1OvJMoDKSh5DrwO1g== 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=RcuDK01V4MiD8uZfpNje0Z2mBqoMUhqtRcS2YRIBKm4=; b=DjvVU59BNZJBvX6WwXr8GpVsrVXfkxM21wtWeRhYaqjRj6jmZ8wwYjJ2TIKkVo348wKGl2luu0D7PnN/aPQ3uuJ4JsBJ8D6qY80/RIsNpJZVnrOzwuZri8G5alhBisj4tKurKFzZhZ3wtrFt98h0wUErrypCNBTWA+RIfBwSaUpPKpgnRcF05VHcC/laWbMbMbogjX3yOMki7F3GMbh4vV7u1BA/22VnK8fInheKcXwdVjxfrmMZrem6UAd8rfNmu8BWfMzAXTg8+6N7YaZqUVO9eQC/dGvuhfUhKxhFR31DBdUgSO7QcevphYTS8NQAKcQXiwnpwK+QAQ3R8epByw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from MN2PR12MB3469.namprd12.prod.outlook.com (2603:10b6:208:ca::29) by MN2PR12MB2896.namprd12.prod.outlook.com (2603:10b6:208:ab::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Thu, 2 Jul 2020 06:22:16 +0000 Received: from MN2PR12MB3469.namprd12.prod.outlook.com ([fe80::2cac:6041:726f:5db2]) by MN2PR12MB3469.namprd12.prod.outlook.com ([fe80::2cac:6041:726f:5db2%4]) with mapi id 15.20.3153.023; Thu, 2 Jul 2020 06:22:16 +0000 From: "Irene Park" To: "devel@edk2.groups.io" , Ard Biesheuvel CC: Samer El-Haj-Mahmoud 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: AQHWSNHD2r2jRm628ECbYabK/HzdqKjlHsGAgAO1+UCACwvZkA== Date: Thu, 2 Jul 2020 06:22:16 +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 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [12.22.141.131] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f29c025d-738e-40e7-d727-08d81e50448b x-ms-traffictypediagnostic: MN2PR12MB2896: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0452022BE1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JlprDlozyzwORF0x+vDDSUIyV7E3nPSBslateM90RjFGWi9h9OOoh44rHe2RSeb/gz8l/E6ADcil6qhC7ND/qlWxGUuG/UXCn1VTr4ynHA+DwQqW/WxhteN7ZRN5LEdJUuPhJVKtbvA/9rOE9dGSFYCpyJE5xCQGa/AcSAMJDLaOUoaxORlEw/xe4sY0WogkYmovaXov7j1wTWKP8bLk5Zw0QB5RiXxKTsq+08ql1G2KYNf04g91qHABXkVrQsLianr6r0gkLLrlcQWe6F511rbsaO6UXHmMcDVbz9603/M4IC8Yjcp9vCdrh8jfjnlyhH+vK69dBwy2m/ezHF/y9DlTOWYCnolZioDQ7E1rKyUKbWFJyZQlQ8CITE0LNGqMSxJ7PEG/9NYFi4k/s0JIhw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3469.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(136003)(39860400002)(396003)(346002)(366004)(376002)(966005)(86362001)(478600001)(55016002)(52536014)(5660300002)(9686003)(83380400001)(8936002)(71200400001)(19627235002)(8676002)(66476007)(66556008)(64756008)(66446008)(66946007)(76116006)(2906002)(7696005)(33656002)(110136005)(4326008)(316002)(186003)(6506007)(26005)(53546011);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: RdEoBj2FgQ3ZwNe+kOh7WV6LcO6+UGlXKii8TuLMIyFmXulBdzRdvWyJVGYlygv+GNK0qXHfbRk7St8KuEXceyAHKjdPjVuyQkU8azNMttljLOiUGkjPQ1IjxrfAvohXqOltg9UhseUo0IS0n7V8PIGfnexFpE/SBxq7/X2W/rSq1xR9GtykeXys9mLXuEIVO3N9nN4tI10VAaRmp8AoEVqMiQuInZ9MvK+2dwAXcCSt4/cRyyVjA+kgZjV53g8pUPGPdIIylRv16NdgFDOBnrBOsS+P3hk9kE6el0/wS3nTU1vgtojpr5ZDjnVnz5Q6RFEypvPl+O5Jij5AeShf78jSWg75e186VTchnCE0wkOJrSKUdCOdwEuExyCjkv+GI5DQudviFcyfGFtoSDGByiaXyu1feVPh7Pw7OKoxWMHaW/ri6X5d5JB+ENQaPkrSedk3OfR0TzgFLXJ4O03u5AjpycHJC+8LjLuvBdnTR+0= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3469.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f29c025d-738e-40e7-d727-08d81e50448b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2020 06:22:16.8078 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: piJy30OWmfhWfpda9X59SmP48AjD8JcLddpVWNiczqzORrblQwXWdtH2TnthHCRLpe+EfQ0Dg62i/I6DSAphbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB2896 Return-Path: ipark@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593670944; bh=RcuDK01V4MiD8uZfpNje0Z2mBqoMUhqtRcS2YRIBKm4=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator:msip_labels: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-forefront-prvs:x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: MIME-Version:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type:Content-Transfer-Encoding; b=lQyn7PXPo7dPpMp19IcIB8pMXoiPeWAOvb47DFPfmIqdZZAc0RuMbgSsgLUWjI3ci YJExlv/asRDhc92tpCqk/KMGv6vYwW3643wM0ZzPZr7NimJNdOgzzSzCkxE/zvYzBb 178dSvAMpE8zXPIL7kHMTGksxCRKa87B4OAWlkNc1NmYus9TEpRaa/ScbVzZnjlkxV jYwayzhsQhGzHIYBEnIHr2lyhq/eFS9DeOCg42ogyE8/n3E6WVg/RW4SZykhEFr9rs 3IU2+54nKjEe5SKL4rIbPlddB4dqyJ2X7t0yPE93NuIvJ5cYC0T+5/NRapuuh+BqoS krtzI6+1jtnGA== Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello Ard, Would you please kindly review this change? Thank you, Irene -----Original Message----- From: Samer El-Haj-Mahmoud Sent: Monday, June 22, 2020 5:01 PM To: devel@edk2.groups.io; Irene Park ; Ard Biesheuvel Subject: RE: [edk2-devel] [PATCH v2] ArmPlatformPkg/PL011UartLib: Check PI= D2 if FiFoDepth is zero External email: Use caution opening links or attachments 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=20 > 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:=20 > 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=20 > (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=20 > FiFoDepth is zero > > From: Irene Park > > PL011UartLib determines its FIFO depth based on the PID2 value but the= =20 > register PID2 is not mandatory as per the SBSA spec. > This change won't check PID2 if PcdUartDefaultReceiveFifoDepth is set=20 > 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);= = =20 > +#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=20 > can accept > // 1 char buffer as the minimum FIFO size. Because everything can=20 > 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.