From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web11.10432.1576766885039626457 for ; Thu, 19 Dec 2019 06:48:05 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=02562c19b1=abner.chang@hpe.com) Received: from pps.filterd (m0134423.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBJEXThe021243; Thu, 19 Dec 2019 14:48:04 GMT Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2x0a0m0k3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Dec 2019 14:48:04 +0000 Received: from G4W9120.americas.hpqcorp.net (g4w9120.houston.hp.com [16.210.21.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3427.houston.hpe.com (Postfix) with ESMTPS id 14CA36F; Thu, 19 Dec 2019 14:48:03 +0000 (UTC) Received: from G2W6309.americas.hpqcorp.net (2002:10c5:4033::10c5:4033) by G4W9120.americas.hpqcorp.net (2002:10d2:150f::10d2:150f) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 19 Dec 2019 14:48:02 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (15.241.52.11) by G2W6309.americas.hpqcorp.net (16.197.64.51) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 19 Dec 2019 14:48:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mln2pf7iIRt35SenAEM1gdo9GhrUklWU3ddN79EMjeuPQUH/F6VpInGUQ4xYKk4qWYO3YyUV6sLfb7ktmeUk2+6KFHbWh2dPWDtKxIsZwi7ZETtGT06e6YucMhm1fpH4/37xHAcRIYiUuekXKemYAI9WL0P9GrDWfHcw7Grad6zc/jgs9LeCegC7YQumQi1LvQTOT3jUvW3zS3CKC0h5mSr38V2Igieg0EFCcF3xH0NMOULXy951QikQhXsz2nXACNXKuCeWmK2NqE+k8gswDHFl7gSeoRUm9E87lj4nljDCZqzOq/am1Jk+MdrOuWPD9gG+HSm8I2gv5UdX7WJe8Q== 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=5RMFY/HrJcjgUgkYawzCvzVHr/wHbZ9kXr7a7I6fmTM=; b=ERVvN7miU6Vgp+Kf6XvLSTmJ1bjR4+qbKEaBHlZZIZFcO0L1yBn6bOGBL0G4Q+wPGvV0GAfIF+r2jX0aCqqCFkirj/mTtYjPKxGqfCK3H01szAs7C4ozTvRRfKsnvikldsT9cd+050YBGcJwvrce2y4I1RXTZLxcx1czyh8lNZMBdu3DEx3erZERX95o6WWLSKFJdEJfG0hzU4JRaghzfrvu/Af16701p3YA2P+bWK7veG0G2cj7Drz+pqoAXK1i+mPxbrQ5B6m8z+K1fmGTXNGk48W9Kh/YAGXZTOdXtAtB7xCxoXBDHrR1x9bQ+UKKJ6rchoEgl+9BgBVjzeBa8w== 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 TU4PR8401MB0495.NAMPRD84.PROD.OUTLOOK.COM (10.169.43.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.14; Thu, 19 Dec 2019 14:48:00 +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; Thu, 19 Dec 2019 14:48:00 +0000 From: "Abner Chang" 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 Thread-Topic: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support Thread-Index: AQHVjTfJa4rNPSnzMUmbDlf31G3UAqeV9dsAgCswxyCAAJ1oAIAAFagA Date: Thu, 19 Dec 2019 14:48:00 +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> In-Reply-To: <20191219132136.GU7359@bivouac.eciton.net> 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: 54913310-4204-4a4c-d798-08d7849271c4 x-ms-traffictypediagnostic: TU4PR8401MB0495: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0256C18696 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(39860400002)(396003)(376002)(136003)(199004)(189003)(51444003)(13464003)(86362001)(2906002)(9686003)(478600001)(7696005)(52536014)(71200400001)(76116006)(53546011)(66446008)(66556008)(64756008)(26005)(66476007)(6506007)(66946007)(5660300002)(54906003)(316002)(33656002)(110136005)(8936002)(55016002)(4326008)(186003)(81166006)(81156014)(8676002);DIR:OUT;SFP:1102;SCL:1;SRVR:TU4PR8401MB0495;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: Ybqfb4CL4URIV7AfFfjhvbwa92KD2yHG5D6xmbObhzk5JmZop94SIhN6RxMmYnvysSdmBZYrqh4GSdSu3Zm6UuI74jScLD+c2HTmlK770A0J7C+4C73Y42PpLyruzt8XuV/tt6Oj1+Gz9B7b/rVo+eSsqqPkSEicWcARw527UMkhLFjyutg1hTEV1rZq0iuVvHQdy4wpJ9dW9aOGjM+ucrodCdjp54lb0W00sK+9kvkRrhkg7TuIvV35MiEqh++stv3B7aaaXKbAwbpZ3hQR5r9ViRiEavcu0taAIyL5/8AEQYXHWxZGF6oesZAYopPe2GmgsnEIEdKki1/U6x92tt/y1tT9WioQn1AHVHiCBD6eB40DJQUe+7HArckCVsx3K1goZm5JF7V/ZgHbigvNm7hw47YQWTNrfkZZxZiBZLwpq0vFSYR+F9L0XGoPfc4ejhhxZA0vMK2sgRj9nUf1XZXz61caHX7ZPbggnRqLeHI2AtOcI+HUzuLp7jhTuXZWDP/eysu3GnDGpO7i5/d7cA== X-MS-Exchange-CrossTenant-Network-Message-Id: 54913310-4204-4a4c-d798-08d7849271c4 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2019 14:48:00.3252 (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: sS0X52HDL2xf0pIISI8WW8q/Cn6tnvybZpyofedONdv242VZ9yHn7LLnBbR2YXxjrDqxMhz1sMX9+R0YWWwOpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TU4PR8401MB0495 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_01:2019-12-17,2019-12-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912190123 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----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 >=20 > 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 -staging. > > > (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. >=20 > That sounds good to me. >=20 > > 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. >=20 > 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 befo= re > merging Risc-V to edk2 master. I am not sure this one. That may take some time to fix that in opensbi. I w= ould rather merge our code to edk2 master first and deal with opensbi in pa= rallel. Some people they approach to me and ask for edk2 RISC-V port. Curr= ently 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 earlier. > I think the proper fix for sbi_types.h also involves a change to opensbi. This has to ask opensbi to have binging mechanism for different frameworks,= 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/In= clude/IndustryStandard just a separate file. > - 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 ont= o a > staging branch. sure >=20 > Regards, >=20 > Leif