From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web09.4713.1576811052783053289 for ; Thu, 19 Dec 2019 19:04:13 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=02570e27ff=abner.chang@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBK33eWl013662; Fri, 20 Dec 2019 03:04:12 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2x0gdfhvnb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Dec 2019 03:04:11 +0000 Received: from G1W8106.americas.hpqcorp.net (g1w8106.austin.hp.com [16.193.72.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5009.houston.hpe.com (Postfix) with ESMTPS id E9F7E51; Fri, 20 Dec 2019 03:04:10 +0000 (UTC) Received: from G9W8670.americas.hpqcorp.net (16.220.49.29) by G1W8106.americas.hpqcorp.net (16.193.72.61) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 20 Dec 2019 03:04:10 +0000 Received: from G9W9209.americas.hpqcorp.net (2002:10dc:429c::10dc:429c) by G9W8670.americas.hpqcorp.net (2002:10dc:311d::10dc:311d) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 20 Dec 2019 03:04:10 +0000 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (15.241.52.10) by G9W9209.americas.hpqcorp.net (16.220.66.156) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 20 Dec 2019 03:04:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqiF0CXQaxFCHQ1yLWVVWNMwZUsiAFpzyMzKj9lrzGXY4ZBusXw4U4g8hdBG5hM389imZbTmjFAaGY6X456H8RkDgdHyKqLuT90prME5UgqdaeUcDLXD/S622o7VcgxDphipKZQjTfW8OZn8kOaqWhOcftOOFN3GP8maylIID4xjTa60S3SekpUiKmhyaRU7PMgtLN0HO19qquoslyL1CJ/IyhfweQHasFpzw6p8heJoNDgVLI35lZQMTNQNGPUXGwgi4PBlAP+0QLCbeXZYssCr6BBbHY/0+hHNrn+2u5cFo/1zqeD+cJ9G8MzKe1nawwVCvbJhTFFv7HgiIlTQwA== 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=Qr+yzmbr3Sz1y8mfyDPtXtNWdIVvc5zcHcmJsNz9waw=; b=MNMt4LhEAxGwnH0wxF9jNq21+IHEOpRzdtun1f3hqraDErCJS6lQmF6Wc0iZzGLQ5NBVjeXz2gT54txZmj9RCVPfjap3fxmb1+0F+Ja+lMQQ3kQk80LVaFmHj139bERU+2xJipNAjwTCo5aNHqegNtq48kHu650Ay8C/WRe/EdGPdMWMKHZugN3r/zoemEIh9fWBbxYpbumJhwhMP1OrtdTRDc61pXP0g80Lzy0FKNtAsvgWKkaII2xd2hE2kfnGZWT5i0dzePNL+NC9/jE90VNbDvuM3j/oA1YC6o82HCfLPYIZMVV8peLxLxiPS4RPj6AGB526wuOpHBn7sZtW6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from TU4PR8401MB1165.NAMPRD84.PROD.OUTLOOK.COM (10.169.48.139) by TU4PR8401MB0702.NAMPRD84.PROD.OUTLOOK.COM (10.169.46.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.16; Fri, 20 Dec 2019 03:04:08 +0000 Received: from TU4PR8401MB1165.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c89b:33c0:a706:374c]) by TU4PR8401MB1165.NAMPRD84.PROD.OUTLOOK.COM ([fe80::c89b:33c0:a706:374c%4]) with mapi id 15.20.2559.015; Fri, 20 Dec 2019 03:04:07 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "Chang, Abner (HPS SW/FW Technologist)" , Leif Lindholm CC: "Chen, Gilbert" , "Kinney, Michael D" Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support Thread-Topic: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support Thread-Index: AQHVjTfJa4rNPSnzMUmbDlf31G3UAqeV9dsAgCswxyCAAJ1oAIAAFagAgADMMDA= Date: Fri, 20 Dec 2019 03:04:07 +0000 Message-ID: References: <1572227957-13169-1-git-send-email-abner.chang@hpe.com> <1572227957-13169-4-git-send-email-abner.chang@hpe.com> <20191121162428.GJ7359@bivouac.eciton.net> <20191219132136.GU7359@bivouac.eciton.net> <15E1CD20DD2FE7F1.29030@groups.io> In-Reply-To: <15E1CD20DD2FE7F1.29030@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.242.247.131] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 3f231be9-7987-4f9a-ca36-08d784f947a0 x-ms-traffictypediagnostic: TU4PR8401MB0702: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 025796F161 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(136003)(376002)(396003)(39860400002)(366004)(13464003)(51444003)(199004)(189003)(52536014)(8936002)(71200400001)(19627235002)(86362001)(66476007)(5660300002)(66556008)(66946007)(76116006)(66446008)(64756008)(186003)(966005)(4326008)(478600001)(316002)(110136005)(54906003)(55016002)(53546011)(6506007)(26005)(7696005)(2906002)(8676002)(9686003)(81166006)(81156014)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR8401MB0702;H:TU4PR8401MB1165.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bAoFCI2nBk4L4mOYrGnnMnVdrb2lT6tR4X78uKVAzmo0Reprmk1wtg0nh+RBmAvcTOMyCwrS7+iP2qNmXk7pGVGjy2zuukb7IzbJj63QS6+6/WktoIYoIMqQ2Vj9YevLpet793pIkyI7CvMXA1FOJr7Ao7AzNultFGkWolwl9iNFR+ptqoL2ywlpc/KAQowszIX5lh6fnXDu6rZsQuere6plQG3t+/JHCJ2WGvDl/4+IPPN/vHW63M06vGCrd7hq04XQRypaNx4M3EhIfN8FXWb6tjnJDgar+oevvWJIskeax4v/xyEgczuLOf2sadKwfptqfqiHxcEV166jCsV9y0qjy+8yJcAACShfioi2xzLK3c9eexgeGsKhIVLe5KudK4Er5mjNB76NQwaTUIwlfH+V/5H8PEDNiNp0AoBML2iCq9WahfmAn+racJry2C2beSayuhzcUOMQp65P0Z1YvzMSoWsbTRdZqDtQfSfYQlMbeIZjSMXY5K0xLhvYkFxXkhd0oXol6MIuEh6KJa+BOWDiR7nAxROBnHC/qk6GzRUS1Si7Mv0ZFAilCGB+Wqz8 X-MS-Exchange-CrossTenant-Network-Message-Id: 3f231be9-7987-4f9a-ca36-08d784f947a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Dec 2019 03:04:07.8248 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iPcfjgqN7+nn0/iW74rare1EP61gJ7Xnt6v+NwQAjUe6+94UR8Y9N44cGoN/T4tOqEy+Z2KmbjjZS17OKs3S/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR8401MB0702 X-OriginatorOrg: hpe.com X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-19_08:2019-12-17,2019-12-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912200020 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Abner Chang > Sent: Thursday, December 19, 2019 10:48 PM > To: Leif Lindholm ; devel@edk2.groups.io > Cc: Chen, Gilbert ; Kinney, Michael D > > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] > RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support >=20 >=20 >=20 > > -----Original Message----- > > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > > Sent: Thursday, December 19, 2019 9:22 PM > > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) > > > > Cc: Chen, Gilbert ; Kinney, Michael D > > > > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] > > RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support > > > > On Thu, Dec 19, 2019 at 04:09:22 +0000, Abner Chang wrote: > > > > > diff --git a/RiscVPkg/Include/sbi/sbi.h > > > > > b/RiscVPkg/Include/sbi/sbi.h new file mode 100644 index > > > > > 0000000..04e7f18 > > > > > --- /dev/null > > > > > +++ b/RiscVPkg/Include/sbi/sbi.h > > > > > @@ -0,0 +1,52 @@ > > > > > +/** @file > > > > > + SBI inline function calls. > > > > > + > > > > > + Copyright (c) 2019, Hewlett Packard Enterprise Development LP= . > > > > > + All rights reserved.
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > + > > > > > +#ifndef EDK2_SBI_H_ > > > > > +#define EDK2_SBI_H_ > > > > > + > > > > > +#include // Reference to header file wrapper > > > > > +#include // Reference to header file > > > > > +in opensbi > > > > > > > > This whole sbi situation is too much of a hornets' nest, and > > > > really does need to get sorted before we even push this to -stagin= g. > > > > (But I do think is is one of the last things we need to address.) > > > > > > > > And I think the starting point to untangle it is to rename the > > > > wrapper include files in RiscVPkg/Include/sbi (and indeed the > > > > directory > > > > itself) to conform with the TianoCore standard. > > > > > > > > That means: > > > > > > > > RiscVPkg/Include/IndustryStandard/Sbi/Sbi.h > > > > RiscVPkg/Include/IndustryStandard/Sbi/SbiBits.h > > > > RiscVPkg/Include/IndustryStandard/Sbi/SbiTypes.h > > > > > > > > Unless all of the wrappers can be combined into a single > > > > RiscVPkg/Include/IndustryStandard/Sbi.h > > > > > > > > ...and then tested on a case-sensitive filesystem. > > > > > > > > For the record, doing that immediately results in the non-wrapper > > > > versions being pulled in and then the build failing. > > > > > > Leif, > > > We can't change the naming of those header files under > > > RiscVPkg/Include/sbi. We build opensbi source code in edk2 and those > > > source files refer to those header file. And we are not going to > > > change opensbi code as we discussed before. > > > > > > The only file we can change is sbi.h -> Sbi.h because this header > > > file is created for edk2 RISC-V related drivers. > > > > > > I think we can make it this way, > > > Rename sbi.h to RiscVOpensbi.h and move it to under > > > RiscVPkg/Include/IndustryStandard, no need "/Sbi" subdirectory. > > > > That sounds good to me. > > > > > Keep the naming of sbi_bits.h and sbi_types.h and still leave those > > > under RiscVPkg/Include/sbi. > > > > > > No naming changes in order to build opensbi source file. Can't even > > > change "/sbi" subdirectory to "/Sbi". sbi_bits.h and sbi_types.h are > > > the binding files for edk2 framework BTW. > > > > Sure, if we separate interface for EDK2 apps from binding, it becomes > > less bad. Plus sbi_bits.h needs to just go, but we'll fix that in > > opensbi before merging Risc-V to edk2 master. > I am not sure this one. That may take some time to fix that in opensbi. = I > would rather merge our code to edk2 master first and deal with opensbi i= n > parallel. Some people they approach to me and ask for edk2 RISC-V port. > Currently they can just go to our private Github to retrieve code. More > people will join edk2 RISC-V port if we can merge it to edk2 master earl= ier. >=20 >=20 > > I think the proper fix for sbi_types.h also involves a change to opens= bi. > This has to ask opensbi to have binging mechanism for different framewor= ks, > however I agree with you in this part. >=20 > > > > But if you can > > - do those changes > > - move/rename SbiFirmwareContext.h to live with RiscVOpensbi.h > Hehe already. I know you :). I already moved this file to under > RiscVPkg/Include/IndustryStandard just a separate file. Just merged SbiFirmwareContext.h to RiscVOpensbi.h. Now we only have two header files under Include/sbi/. I will start the co= nversation with opensbi people to fix the duplicate definitions issue when = other firmware frameworks leverage opensbi. This helps to remove sbi_bits.h= from edk2 RISC-V port. Also consult with them regard with the binding mechanism in opensbi for d= ifferent firmware frameworks. Lefi, most of comments for RISC-V edk2 port are done and I will clean up t= he commits on the private github repo we are working on. The next will be = edk2-platforms. Abner >=20 > > - add a (short) Readme.md to RiscVPkg/Include/sbi explaining what > > these files are and why > > I think that resolves my final reservations against bringing this set > > onto a staging branch. > sure >=20 > > > > Regards, > > > > Leif >=20 >=20