From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.65.89; helo=eur01-he1-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065089.outbound.protection.outlook.com [40.92.65.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 37E6822283508 for ; Tue, 6 Mar 2018 05:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=aU3W6HW0Ym1/I5q2N8kSyLimAZy2IEL4W2cin6U7gzA=; b=njLIlBS0A7AlbqBB/BgIrGok5gMsLMkGC/nqW8qIVhurkURZfPetEL52wiET8gmt19zQK/wnZu2is/85r+0Q63Alu+IPjTRoCabM17OQQVI/zMHO22h6dz7C1yaDGztimaf77ZhlbWa3fuS7SjCh/TZENd2g4k30LHCE/mKFQdLAxyckOBSk4G0wdodSSH9tnHKLQZAFKOS6A6XfmdG1AeWVuupZ8bqRuVAmEH8esEH1tyz6poue2x563qbafW+81VvRXJuwbvno1oQYs5y/46oBXYafa5/azx8hurLDhnJPV8OOqQhr3h+h+zys881E+swsuymGG1T46+RZpi515Q== Received: from VE1EUR01FT058.eop-EUR01.prod.protection.outlook.com (10.152.2.55) by VE1EUR01HT053.eop-EUR01.prod.protection.outlook.com (10.152.3.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.22; Tue, 6 Mar 2018 13:32:14 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com (10.152.2.60) by VE1EUR01FT058.mail.protection.outlook.com (10.152.3.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.485.12 via Frontend Transport; Tue, 6 Mar 2018 13:32:14 +0000 Received: from AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::7d81:9d96:1051:d20d]) by AM4PR06MB1491.eurprd06.prod.outlook.com ([fe80::7d81:9d96:1051:d20d%14]) with mapi id 15.20.0548.016; Tue, 6 Mar 2018 13:32:13 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" , "Bi, Dandan" Thread-Topic: [PATCH 1/5] MdePkg/SPI: Change function definitions to match their descriptions. Thread-Index: AQHTr+ri4yU6uX2cBEWXaviTJcNtDqPA5f4AgAJYSFA= Date: Tue, 6 Mar 2018 13:32:13 +0000 Message-ID: References: <3C0D5C461C9E904E8F62152F6274C0BB3BA4B2C5@shsmsx102.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB3BA4B2C5@shsmsx102.ccr.corp.intel.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:F0C60221978653FFB747660ACADA9DD6595B86ABB574380F1AD2DC9993C9C402; UpperCasedChecksum:07E1603BC2FD36F2DC3CB8AB55E9553D93BE0B3944C93FA3D9771F013DEF988F; SizeAsReceived:7246; Count:45 x-tmn: [iGo5Q9JDmAHsb3tKD5ENMskPDxYg4VYI] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VE1EUR01HT053; 6:87IBnVOlyjXeQbG2B1SJTaA2yqLDT+l77Rhtcxhty14E9bDS427c1xWDNr+5AIelxTsd0ePmWIGB19dJ4GMlZcLYmlHvBQcA1I8eTYDi4aaJXUL+uogGBq6Qti1T9hDtbw257pc1HHSpgeb56BqrquD2G1EJqxLGYqpun8Qk2HIOQk5eqRnP0YK8NJzstWn83g7n4l3uLc4KPdiTHpp4DqmzrJtuDGoUwFuhvQ7gXZKXcF0ioo7teyVP4BY6pAxht6ZoSfZL9RpIuKyWgXl85NPT3uO/jdqx+6zcPGTbh7i7SHKvvlxHd9ZsahnqZBLeKNWGUsU8JMcyCcY+RskVpXR+rxlnJYPPjEWdu5O14Gw=; 5:c+IFRfLz4z4UXC6wPnQOh7v1zI2RIQaW7JtDdBU/L+0iQ7x0WeeveU87GR5ueeUaJpweUljt1eTFyabzVi40mnT1o8Ags+u9p07XE711TD9yte1gf5zA9BLiI12pEx36IIpvdNZCwTT/Guux+Eu8ErOizQAe3tyh7XSLKfwdxB8=; 24:yAskAyscPK7MUmfLK4zjyycBDD0Wx9G1ybDMUHMyvds1I01yf5CpTageWmw4IUrDnQfnqPvOsvixPlgr6cjnV/+qGMbOUrVjEyOwRpJUij0=; 7:V2L+rZTy7S7F4MmsJy3L7QD3JrXt6Qh3gwhx9q3BoNR+gmglQS2Rf9JQes3D1doPuyic484ARY3FrwcCPjC9DjX+MVES0ma07V/tkYmENt8rEVKajrUV7VJX93lMHBZbUw41ZpA3bISHxnMAPGKYlEZ/TyI57jkj6g32bLL6mO0NKsXgsUxX0Ib4DVSP44dRw1d+vYbB5a04277HivL8x+BH2JwSU5POBLOeen+QGBckqc6gPvg5JGmp95QsGg+y x-incomingheadercount: 45 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125374)(1701031045); SRVR:VE1EUR01HT053; x-ms-traffictypediagnostic: VE1EUR01HT053: x-ms-office365-filtering-correlation-id: d0e63f87-51db-4466-fd54-08d58366ac0d x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:VE1EUR01HT053; BCL:0; PCL:0; RULEID:; SRVR:VE1EUR01HT053; x-forefront-prvs: 06036BD506 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(98901004); DIR:OUT; SFP:1901; SCL:1; SRVR:VE1EUR01HT053; H:AM4PR06MB1491.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:; x-microsoft-antispam-message-info: FtVGTjqXgKotLAlhC3X4hdo3pfcldl9ij2H3O/PagcMB51//Axcm4aiDD0//ON9vCeaKuQtd/aC5XpTwEmq8+vvbiQnFExb3v5PJ2uWKccWyyT8VGx+Ja6f0lZaIufVVLAwq81+o3pOQjI+kizm7r7FLATWyBHKkWvu4e/rMWbVYxPQjBjqE0RiPk1ZEdXkC spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0e63f87-51db-4466-fd54-08d58366ac0d X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2018 13:32:13.8200 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT053 Subject: Re: [PATCH 1/5] MdePkg/SPI: Change function definitions to match their descriptions. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 13:26:05 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey Dandan, Thanks for your reply. I issued updates for the current headers because I saw activity in edk2-pla= tforms to implement these incomplete protocols and because I haven't heard = back for discussed changes in the specification for some time. Sure I could help submitting the ECR, however I'm not sure how. I'm not an = UEFI Contributor and neither did I find any design flaws, just typos and mi= ssing definitions, which obviously must be bit values due to their non-excl= usive nature. If you need me to do something concrete, I will try to do my best. Regards, Marvin. > -----Original Message----- > From: Bi, Dandan > Sent: Monday, March 5, 2018 3:15 AM > To: Marvin H=E4user ; edk2- > devel@lists.01.org > Cc: Kinney, Michael D ; Gao, Liming > ; Bi, Dandan > Subject: RE: [PATCH 1/5] MdePkg/SPI: Change function definitions to match > their descriptions. >=20 > Hi Marvin, >=20 > Thank you very much for your contribution. Could you hold this patch seri= es? > Since current SPI header files follow PI1.6 spec. > For this case, we should submit an ECR to update the PI spec firstly. Aft= er the > ECR has been approved by PIWG, then we can send patch to update them. > Since you have found a lot of missing/incorrect parts in the SPI part of = PI > Spec. Could you help to submit an ECR to update them? >=20 >=20 > Thanks, > Dandan >=20 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Marvin H=E4user > Sent: Wednesday, February 28, 2018 12:49 AM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Gao, Liming > > Subject: [edk2] [PATCH 1/5] MdePkg/SPI: Change function definitions to > match their descriptions. >=20 > The PI specification is not continuous with function headers and descript= ions > for the SPI protocols. Correct and comment these mistakes. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > MdePkg/Include/Protocol/SpiConfiguration.h | 12 ++++++++---- > MdePkg/Include/Protocol/SpiHc.h | 14 +++++++++----- > MdePkg/Include/Protocol/SpiIo.h | 15 ++++++++++----- > 3 files changed, 27 insertions(+), 14 deletions(-) >=20 > diff --git a/MdePkg/Include/Protocol/SpiConfiguration.h > b/MdePkg/Include/Protocol/SpiConfiguration.h > index c0df183ec7f0..c36a809f4232 100644 > --- a/MdePkg/Include/Protocol/SpiConfiguration.h > +++ b/MdePkg/Include/Protocol/SpiConfiguration.h > @@ -1,7 +1,7 @@ > /** @file > This file defines the SPI Configuration Protocol. >=20 > - Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2017 - 2018, Intel Corporation. All rights > + reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License which accompanies this distribution. The full text of the lice= nse may > @@ -65,6 +65,10 @@ EFI_STATUS > IN BOOLEAN PinValue > ); >=20 > +// > +// Note: In the PI specification, ClockHz is decorated as only 'IN', whi= ch is > +// not conforming to the parameter description. > +// > /** > Set up the clock generator to produce the correct clock frequency, pha= se > and > polarity for a SPI chip. > @@ -78,7 +82,7 @@ EFI_STATUS > ClockPhase and ClockPolarity fields. The rou= tine > also has access to the names for the SPI bus= and > chip which can be used during debugging. > - @param[in] ClockHz Pointer to the requested clock frequency. Th= e > clock > + @param[in,out] ClockHz Pointer to the requested clock frequency. Th= e > clock > generator will choose a supported clock freq= uency > which is less then or equal to this value. > Specify zero to turn the clock generator off= . > @@ -92,8 +96,8 @@ EFI_STATUS > **/ > typedef EFI_STATUS > (EFIAPI *EFI_SPI_CLOCK) ( > - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, > - IN UINT32 *ClockHz > + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, > + IN OUT UINT32 *ClockHz > ); >=20 > /// > diff --git a/MdePkg/Include/Protocol/SpiHc.h > b/MdePkg/Include/Protocol/SpiHc.h index 12fe5d2dce0a..71c75431e4e8 > 100644 > --- a/MdePkg/Include/Protocol/SpiHc.h > +++ b/MdePkg/Include/Protocol/SpiHc.h > @@ -1,7 +1,7 @@ > /** @file > This file defines the SPI Host Controller Protocol. >=20 > - Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2017 - 2018, Intel Corporation. All rights > + reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License which accompanies this distribution. The full text of the lice= nse may > @@ -66,6 +66,10 @@ typedef EFI_STATUS > IN BOOLEAN PinValue > ); >=20 > +// > +// Note: In the PI specification, ClockHz is decorated as only 'IN', whi= ch is > +// not conforming to the parameter description. > +// > /** > Set up the clock generator to produce the correct clock frequency, pha= se > and > polarity for a SPI chip. > @@ -80,7 +84,7 @@ typedef EFI_STATUS > ClockPhase and ClockPolarity fields. The rou= tine > also has access to the names for the SPI bus= and > chip which can be used during debugging. > - @param[in] ClockHz Pointer to the requested clock frequency. Th= e SPI > + @param[in,out] ClockHz Pointer to the requested clock frequency. Th= e > SPI > host controller will choose a supported cloc= k > frequency which is less then or equal to thi= s > value. Specify zero to turn the clock genera= tor @@ -94,9 +98,9 > @@ typedef EFI_STATUS **/ typedef EFI_STATUS (EFIAPI > *EFI_SPI_HC_PROTOCOL_CLOCK) ( > - IN CONST EFI_SPI_HC_PROTOCOL *This, > - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, > - IN UINT32 *ClockHz > + IN CONST EFI_SPI_HC_PROTOCOL *This, > + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, > + IN OUT UINT32 *ClockHz > ); >=20 > /** > diff --git a/MdePkg/Include/Protocol/SpiIo.h > b/MdePkg/Include/Protocol/SpiIo.h index 43e804518f8b..8c5d96bb04b2 > 100644 > --- a/MdePkg/Include/Protocol/SpiIo.h > +++ b/MdePkg/Include/Protocol/SpiIo.h > @@ -1,7 +1,7 @@ > /** @file > This file defines the SPI I/O Protocol. >=20 > - Copyright (c) 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2017 - 2018, Intel Corporation. All rights > + reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD > License which accompanies this distribution. The full text of the lice= nse may > @@ -144,6 +144,11 @@ EFI_STATUS > OUT UINT8 *ReadBuffer > ); >=20 > +// > +// Note: In the PI specification, 'This' is decorated with 'IN' and 'CON= ST'. > +// However, 'This' needs to be updated in order to reflect the > +// Peripheral update. > +// > /** > Update the SPI peripheral associated with this SPI 10 instance. >=20 > @@ -152,8 +157,8 @@ EFI_STATUS > SPI NOR flash parts, where the size and parameters change depending > upon > device is in the socket. >=20 > - @param[in] This Pointer to an EFI_SPI_IO_PROTOCOL structure. > - @param[in] SpiPeripheral Pointer to an EFI_SPI_PERIPHERAL structure. > + @param[in,out] This Pointer to an EFI_SPI_IO_PROTOCOL struct= ure. > + @param[in] SpiPeripheral Pointer to an EFI_SPI_PERIPHERAL structu= re. >=20 > @retval EFI_SUCCESS The SPI peripheral was updated successf= ully > @retval EFI_INVALID_PARAMETER The SpiPeripheral value is NULL, @@ - > 165,8 +170,8 @@ EFI_STATUS **/ typedef EFI_STATUS (EFIAPI > *EFI_SPI_IO_PROTOCOL_UPDATE_SPI_PERIPHERAL) ( > - IN CONST EFI_SPI_IO_PROTOCOL *This, > - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral > + IN OUT EFI_SPI_IO_PROTOCOL *This, > + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral > ); >=20 > /// > -- > 2.16.0.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel