From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (EUR03-VE1-obe.outbound.protection.outlook.com [40.107.5.69]) by mx.groups.io with SMTP id smtpd.web12.3263.1609879612251571866 for ; Tue, 05 Jan 2021 12:46:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=NGc79Hrf; spf=pass (domain: arm.com, ip: 40.107.5.69, 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=0omkyqn61ZzdG5zSbtR/UgwmON/K2ECwXLGJk6pHjIo=; b=NGc79Hrfuz/YUq1A3Uam1JBJr7eJbM7M5CrjcRWTca9QJOMLMog5R8bXOi60VJjN3NrviSuVrgCZqp+3V+mD0K1MdJ7Np/67rpo2pv/CxSe1fFMRYYcuotou5SfeuflrXbn7fJxyRJ/vwQhTu/OWd+yMwrmUF0AcuZ6l2vwQQm8= Received: from DB9PR05CA0011.eurprd05.prod.outlook.com (2603:10a6:10:1da::16) by VE1PR08MB5117.eurprd08.prod.outlook.com (2603:10a6:803:109::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21; Tue, 5 Jan 2021 20:46:46 +0000 Received: from DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1da:cafe::b2) by DB9PR05CA0011.outlook.office365.com (2603:10a6:10:1da::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Tue, 5 Jan 2021 20:46:46 +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=pass 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 DB5EUR03FT057.mail.protection.outlook.com (10.152.20.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21 via Frontend Transport; Tue, 5 Jan 2021 20:46:46 +0000 Received: ("Tessian outbound 76bd5a04122f:v71"); Tue, 05 Jan 2021 20:46:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 28c8132deddd8124 X-CR-MTA-TID: 64aa7808 Received: from ed41a2b9673a.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 76C008C6-4121-421B-B51A-C4C0C4F85193.1; Tue, 05 Jan 2021 20:46:39 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ed41a2b9673a.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Jan 2021 20:46:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=evAt5z14Lupavynk7ZfpZYg52zp6KNIxXnt/gHzta1wAKPa7fCxpvXCqguqJ/PJHY8Tb/lOxFOmxOF6F1HnLvsoDs5Z9RZA8zZuN6Whzxxx0xj64LWZGP1YM9sBW30j6jxXysedvgXd5JIFkIGjz6/CtXxopR8SAdz7SDUj6vGkbY+u0I0XVg4afT+nxkNA7k+h0pko8nUE0NsLmFpfpDX1BhXQRBfM4GCYD36jiHgtlZdNzzR8o7f9jBFbCknRiMdDJEar3J2PlB7AnU19/0V7a2LP/MRRtt5wT3k08F0THvcKNyLcam1T35MfSYblWMQIsAqyXPXU5IsLfllVnvw== 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=0omkyqn61ZzdG5zSbtR/UgwmON/K2ECwXLGJk6pHjIo=; b=kX+Bqdd06mnnpT0v0MNXXQBFHCwiLrrs5k4B2VWX40iZzpcMhyjS/fR1BaRvZrKLI9BPqZyypYtbUTsvgeVdDQM3fn9XRGD5u9M1Cc4dOX6NpNr8+/It9mqYlOnMChIT4ymLvEYFf9PCqA2yRwnz0r1ZVJT/8OY8VtT1krxIKkqJIeMq73gO8HIUP+CSXtH7zxAyBSYrimTheWVmDMqlShZrC2tcFSKJq7JJ0x0p145cJfyjay0NptfZF7S7B30Wgv6LGwio29MNl1OMe3lWKqHFnFvvJxx7hoTSyWPpMYGEP9npyd1XeUo8wERSBlbVruH6anxsGlteeyF75JZn8Q== 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=0omkyqn61ZzdG5zSbtR/UgwmON/K2ECwXLGJk6pHjIo=; b=NGc79Hrfuz/YUq1A3Uam1JBJr7eJbM7M5CrjcRWTca9QJOMLMog5R8bXOi60VJjN3NrviSuVrgCZqp+3V+mD0K1MdJ7Np/67rpo2pv/CxSe1fFMRYYcuotou5SfeuflrXbn7fJxyRJ/vwQhTu/OWd+yMwrmUF0AcuZ6l2vwQQm8= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DBBPR08MB4361.eurprd08.prod.outlook.com (2603:10a6:10:c8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.23; Tue, 5 Jan 2021 20:46:37 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::a1f1:ccfd:b17f:a490%5]) with mapi id 15.20.3721.023; Tue, 5 Jan 2021 20:46:37 +0000 From: "Samer El-Haj-Mahmoud" To: "devel@edk2.groups.io" , Samer El-Haj-Mahmoud CC: Leif Lindholm , Ard Biesheuvel Subject: Re: [edk2-devel] [edk2-platform][PATCH v1 1/1] ArmPlatformPkg/PL011UartLib : Fix SetControl() SCT conformance Thread-Topic: [edk2-devel] [edk2-platform][PATCH v1 1/1] ArmPlatformPkg/PL011UartLib : Fix SetControl() SCT conformance Thread-Index: AQHW1wWU7m4ElyTAzk6c5rARRoeIO6oZmaFA Date: Tue, 5 Jan 2021 20:46:37 +0000 Message-ID: References: <16528319E8EDB840.11931@groups.io> In-Reply-To: <16528319E8EDB840.11931@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: 251e55b3-a12f-4ea4-e1fa-08d8b1bb0450 x-ms-traffictypediagnostic: DBBPR08MB4361:|VE1PR08MB5117: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:7219;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: v/a/sNBUb6yub61f1qYtA1kn0M4Hql+hur3bX+I1Asp74La464kv4E5V0aIFyfhahLweIySm+/ZDdoMS59oY/OaRTRa4sp3zHx04m1M+2bzSCw4slCTcN49YpBLd49n5SB7iZyJQwg7T+MaO1SvyVQk0yGkcwle8pjoXiQZ3LnmM7M3MOqfA7dWhjab4e5VJq24NDkzH/Dc2WD5LaLakerNnwlZopkyaIUPZKpYZVltmSto9dlVIU/nN5z8cRrdCBvnCR4hkOV2noNXHLLBWgBtiE1aZXFDoRzuiMpM0EcI3k2pBN4Vpjp7DL+KG/De2bwy8DDFR5snzn1uaTuPQwdgpfXAD5gWKNsGwzuF9KbNzAyAOnUdht8FYFAOEwBzFTHG//yQkxN4vLUVsSY+IgERhtbWm42y/pkSo7qaoiZ8heymNtItoXqSEtdDvDTEee3vtZxoPR0npLacV0+btFA== 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;SFS:(4636009)(366004)(396003)(376002)(346002)(136003)(39850400004)(7696005)(66556008)(2906002)(5660300002)(66476007)(64756008)(66446008)(76116006)(52536014)(83380400001)(66946007)(55016002)(8936002)(6506007)(966005)(33656002)(4326008)(71200400001)(53546011)(186003)(316002)(478600001)(8676002)(26005)(54906003)(9686003)(19627235002)(110136005)(86362001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?iHv/+uZngEmO/ImrS1Vtrnnvm1G4llNi31ntRv1tP15OKS+QlfbboaLt//kZ?= =?us-ascii?Q?jUIbJ8UoGC6c2yRvdFqlZ+VXlhmtBTXyUwCY+EC1y82H+NG8qHyU60UkjsGa?= =?us-ascii?Q?DcW0WtGHd4arArlHIkr7t/Z8yBYZXBNzC4vWUs2ruID+jXkqlaCSRLJom6xG?= =?us-ascii?Q?Cup6jr3iiTWfTSWrMfekrU9YcRenPRUdx2tcV/lKGNb59UOJyg4+R432TK0z?= =?us-ascii?Q?NPsr3IezMic2TsKnZkBkjkiVvqy85vzG8MaGavH3g6++5XfiJdNaKeijaEEl?= =?us-ascii?Q?kI+bB9xBYe23trRRQLGqg1ByQCQxXPKkF8lxHvETK6ZDdXqqOnlfukxZ+i7h?= =?us-ascii?Q?PP4TCyBy6IBoUgYcUb5s1QBn6pr5J9HoIegZTq9NhiLsYrCWYXq/IV96dTL4?= =?us-ascii?Q?Swm0/XARIE3r4z7duyB3QHesZhBGt/MIAgOZ6bsPr1lDq5+gF7wSmrjqNKqp?= =?us-ascii?Q?UD1EW2KL2iFlbJ1oKLgDPPBHgYxASqGIQib268ds0N9/OmO9dS6efZE8f1vL?= =?us-ascii?Q?ekWcf2S1iF1xI3wXaGPmDmCCmdjrD51WAgjDk8G7uaGnUmYAhe9FGghmKf87?= =?us-ascii?Q?a//Rlg1lvt1KVQ/Ogx6nR6X78IazSqjyO4mp07JPNg71IRLMqNgWzPiXP7z2?= =?us-ascii?Q?ycvjecaMkZ+K3xy8jU9f0ma5tuuylc9PvKf3lRAOTt4Xk4gI23/c55ajkwut?= =?us-ascii?Q?JEA3hZDYO2bj/MQPsdKd4cmtLdTdfsakFhCxu3xnFIErFf17UUjzX5acIY2k?= =?us-ascii?Q?Cy8kvzR1BT7KlQGYm5IrH6rAFBpdTe6bwYKtCQO2cKQQqpa3ujZ4R8iJbEo8?= =?us-ascii?Q?YlNlon+jETrMX0LANGbXWI/P+ZXiUEyuilohJjMya4QncqXwuRXTafjHApj+?= =?us-ascii?Q?Ob5EgmxkQEwLE61R5t5lBqyTCGCdqN4GMux79gOWyARKkJF6nnA93pMaRAoc?= =?us-ascii?Q?fp2NhqWk4rGjevK9Xlg7y4cPeBvNuRD1Djc4sBen1U0=3D?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4361 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: DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0e328895-7eaa-45d2-7cd7-08d8b1baff51 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lGi7hLbLvMqXOyrrDOt4FaJBpEgb5c2CTpEXRnJjO/QZiw2XLEDHYBw5bjqBOYtRer927fke1yaqSMrUAGBpn8/gA3BHcpoVr3ofn8E3l8SVPMDT4YSXqYqSCBQTjCWu+g4l8qxtLrVDkJKaUfA5S4PlSYcxl0ptWPxhqwtIcx2QYty+tWDiO1Gs3eBfDm7Tz9i8P/Krg8lZKjyBfEEcy7fLRz7iiTOUEfHiRfUq90Ib5u1jBDx872Ead8wANbBAPqhtyZZryJD0TJnEHb2mw49ILwz1OP80lKYSgffIhm+o9IcFKzED6j6k68htDKuFWC85KeZAiICfZCB27qlyzUV6beY+jUczxA7Lvg+Q8v8HXy2EzOkFMxmBbWemZ7lZoSOjdqrer4pQdyZXqZUJWpHh1LriTwjzNkzInLHnEXqRHkDS47fHBKdLBgsmwwCFuJrtIxdlxr1Mj7Kh+h1YdgbITIL9dFhPfU0s6BboqOU6l6OFtFonpvF/vdMi7GVc4Jeqln4gUoJ3B2ZPN44uwyGqRt8Eijbk77Yw/iGHt2w= 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;SFS:(4636009)(396003)(376002)(39850400004)(136003)(346002)(46966006)(70586007)(8676002)(316002)(82310400003)(19627235002)(110136005)(70206006)(5660300002)(6506007)(53546011)(356005)(26005)(7696005)(336012)(47076005)(54906003)(86362001)(55016002)(52536014)(9686003)(81166007)(2906002)(186003)(4326008)(33656002)(966005)(478600001)(83380400001)(82740400003)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2021 20:46:46.2200 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 251e55b3-a12f-4ea4-e1fa-08d8b1bb0450 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-AuthSource: DB5EUR03FT057.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5117 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gentle reminder > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Samer > El-Haj-Mahmoud via groups.io > Sent: Sunday, December 20, 2020 2:23 PM > To: devel@edk2.groups.io > Cc: Leif Lindholm ; Ard Biesheuvel > > Subject: [edk2-devel] [edk2-platform][PATCH v1 1/1] > ArmPlatformPkg/PL011UartLib : Fix SetControl() SCT conformance > > REF: https://github.com/pftf/RPi4/issues/87 > > The PL011UartLib SetControl() is failing the SCT test for > SerialIoBBTestConformance (00605CBC-3965-4B61-A254-2B2B723172EA), > which is trying to set bits that are not supported per UEFI spec. > > Add proper argument check for valid bits, and confirm that test passes. > > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Signed-off-by: Samer El-Haj-Mahmoud > --- > ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 15 > +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > index 3c58a0f39acb..ec6056f5fdfd 100644 > --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c > @@ -269,6 +269,21 @@ PL011UartSetControl ( > { > > UINT32 Bits; > > > > + > > + // > > + // Per UEFI spec, the control bits that can be set are : > > + // EFI_SERIAL_DATA_TERMINAL_READY > > + // EFI_SERIAL_REQUEST_TO_SEND > > + // EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE > > + // EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE > > + // EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE > > + // > > + if ((Control & (~(EFI_SERIAL_REQUEST_TO_SEND | > EFI_SERIAL_DATA_TERMINAL_READY | > > + EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | > EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | > > + EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE))) !=3D 0) { > > + return EFI_UNSUPPORTED; > > + } > > + > > if ((Control & mInvalidControlBits) !=3D 0) { > > return RETURN_UNSUPPORTED; > > } > > -- > 2.25.1 > > > > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#69271): https://edk2.groups.io/g/devel/message/69271 > Mute This Topic: https://groups.io/mt/79110273/1945644 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [samer.el-haj- > mahmoud@arm.com] > -=3D-=3D-=3D-=3D-=3D-=3D > IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.