From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=01658f8fdc=abner.chang@hpe.com) Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by groups.io with SMTP; Wed, 18 Sep 2019 23:58:28 -0700 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 x8J6qeSt024666; Thu, 19 Sep 2019 06:58:27 GMT Received: from g2t2354.austin.hpe.com (g2t2354.austin.hpe.com [15.233.44.27]) by mx0b-002e3701.pphosted.com with ESMTP id 2v3vanfcfb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Sep 2019 06:58:27 +0000 Received: from G1W8107.americas.hpqcorp.net (g1w8107.austin.hp.com [16.193.72.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2354.austin.hpe.com (Postfix) with ESMTPS id D527E9D; Thu, 19 Sep 2019 06:58:26 +0000 (UTC) Received: from G2W6309.americas.hpqcorp.net (2002:10c5:4033::10c5:4033) by G1W8107.americas.hpqcorp.net (2002:10c1:483b::10c1:483b) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 19 Sep 2019 06:58:26 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (15.241.52.12) by G2W6309.americas.hpqcorp.net (16.197.64.51) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 19 Sep 2019 06:58:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+wZSZBrLmhajFt9FsZK7U6zJI46wIrXdetRWz5I+FornKhCp5XSfHFVhReTX9j11KuZWktAs3h2qKkuE+OLFz/sUALjgDMN5IbScOzOO+v9VUdjhWW/j1fPSD9FLdsC9n2psUGeUv4QBPUiHJg+8Gmt1dkaAG3EjQgaAbOHIOurcb8cntdXdXVvJIPHEzhVu0ckqtOMBulzeOrIdDhtor1Kg9vq8eK1InjzRGKxKG2cHf2p7A8+tbZCtVhl/Hcq2AANcx9OjuZOw0JggKOiw1R5Xre/AOe6xYrM68Q35VVuG5AVSHJ5OIi4m9Ggc7mtnmoWduVaGFfq2K4REHrZoA== 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=UI6xzNhcNOJe1G8i+coQrttF2cxhknXSj0Fd8CLFB08=; b=mOJ7m5dtEQsvM+fHOcR/EaQpJbbWDlNx5NXl58f5TEapatdof7u4n9F21mgiT0QssfVhXPyog3wBbEDD9/nB1ocjuY0fxhMFHGamTOU6IG83f4+tY6wXe+0pfTx2NU0U+65r67yrXXHjyZDfsPGzxI+zch0wamth4Hy6Xk8UZjpY8MXdbdhzKRzQBl1O2BUrGfmDSd976UequlXua4LboY2pIOx9zL/9bLsBfu+MZCJ0xyZGS9k5dRMjoZZ0Qw78CSLkl8lf2qaAuKq50UTbe4QxsGHZI92CnWNsnHB7PMQU5Z3AO3ei3lmwvqciO4j6P3hGse1sa+gFDIkbYMMwLA== 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 CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM (10.169.12.151) by CS1PR8401MB0358.NAMPRD84.PROD.OUTLOOK.COM (10.169.16.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.21; Thu, 19 Sep 2019 06:58:25 +0000 Received: from CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4fb:84b9:76e6:1cde]) by CS1PR8401MB1192.NAMPRD84.PROD.OUTLOOK.COM ([fe80::4fb:84b9:76e6:1cde%8]) with mapi id 15.20.2263.023; Thu, 19 Sep 2019 06:58:25 +0000 From: "Abner Chang" To: Leif Lindholm CC: "devel@edk2.groups.io" Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 02/22]: RiscVPkg/Include: Add header files of RISC-V CPU package Thread-Topic: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 02/22]: RiscVPkg/Include: Add header files of RISC-V CPU package Thread-Index: AQHVYxHiQDGFiK+TQkuZ9g4/E5V95acb3ogAgBHCfQCAAleVAIACrs5w Date: Thu, 19 Sep 2019 06:58:24 +0000 Message-ID: References: <1567593797-26216-1-git-send-email-abner.chang@hpe.com> <1567593797-26216-3-git-send-email-abner.chang@hpe.com> <20190904185536.GP29255@bivouac.eciton.net> <20190917135406.GE28454@bivouac.eciton.net> In-Reply-To: <20190917135406.GE28454@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-correlation-id: 3ea0efa1-3e12-4da9-7c6d-08d73ccec45d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600167)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:CS1PR8401MB0358; x-ms-traffictypediagnostic: CS1PR8401MB0358: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 016572D96D x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(346002)(366004)(136003)(39860400002)(13464003)(199004)(189003)(86362001)(71190400001)(2906002)(6116002)(3846002)(6306002)(55016002)(66446008)(446003)(11346002)(52536014)(476003)(66476007)(66556008)(64756008)(66946007)(7736002)(9686003)(66066001)(14444005)(256004)(5660300002)(229853002)(478600001)(966005)(6436002)(71200400001)(14454004)(16799955002)(6246003)(81156014)(81166006)(8676002)(316002)(25786009)(4326008)(6916009)(8936002)(74316002)(305945005)(7696005)(99286004)(102836004)(53546011)(6506007)(76116006)(486006)(76176011)(26005)(33656002)(186003);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR8401MB0358;H:CS1PR8401MB1192.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-message-info: /Iy+QVWebOASDwEjK1eYirFUXrCVu9APGjrkh1GfcvOWn5j2+RtO8Zek0WiVnvFQDr8MMqM6DMIbk2Qq+9yW/ppH5Ru8YxoeeR10dkrNtc4WrvYGVWMhdSEVgAKsj3NwA7oQY3Kqyxj3eDaVat6l6Te4byjCaNQqdvfF4kVqdKhN1WbgbpPQD91N2WE2NpLKJXwy9fOcGXO3ejftBx3oFPuTWgTfKzX9pHKIPXR6dBKaLplyFkgssPAA4BMZ2vGRRBxKR1V6JkrGfLVl5H9TdklMilDdvJBEt79fboBF2Wt3bLD9+CyHNCBt+Hbc4FCYi7iIFr9yfM0xBXljTlb8x5wJXZtTglrC+0TYfmddwk/h+5O1Do/UiHswgMdJW9NAqGquSjNVtNiQGsHh21SuNWzDw9dHaxJ+28AeSD1aI9c= x-ms-exchange-transport-forked: True X-MS-Exchange-CrossTenant-Network-Message-Id: 3ea0efa1-3e12-4da9-7c6d-08d73ccec45d X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 06:58:24.9725 (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: VQeti1nEzjvz4EKq8uOqyoeX3W4TnutYFfXCF2V8qrNs6CzRTooF0cPEPsDpsKAlLSbaU1GxYWlnELLC1uZvNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0358 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.70,1.0.8 definitions=2019-09-19_02:2019-09-18,2019-09-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1909190064 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: Tuesday, September 17, 2019 9:54 PM > To: Chang, Abner (HPS SW/FW Technologist) > Cc: devel@edk2.groups.io > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 02/22]: > RiscVPkg/Include: Add header files of RISC-V CPU package >=20 > On Mon, Sep 16, 2019 at 04:02:10AM +0000, Chang, Abner (HPS SW/FW > Technologist) wrote: > > > -----Original Message----- > > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf > > > Of Leif Lindholm > > > Sent: Thursday, September 5, 2019 2:56 AM > > > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) > > > > > > Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 02/22]: > > > RiscVPkg/Include: Add header files of RISC-V CPU package > > > > > > On Wed, Sep 04, 2019 at 06:42:57PM +0800, Abner Chang wrote: > > > > RISC-V package library definitions. > > > > > > > > RiscV.h > > > > -Add RiscV.h which conform with RISC-V Privilege Spec v1.10. > > > > > > > > sbi.h > > > > sbi_bits.h > > > > sbi_types.h > > > > - Add definitions for RISC-V OpenSBI EDK2 port. > > > > > > A web search suggests this refers to the RISC-V Open Source > > > Supervisor Binary Interface. It would be helpful to expand it on firs= t use. > > > https://github.com/riscv/opensbi/? > > > Is this expected to fluctuate much? > > > > Yes it does change often, the community keeps adding new features to > openSBI. >=20 > OK. I got some more intro to this at Linux Plumbers Conference last week. >=20 > > > I ask for two reasons: > > > 1) Because if it is not, I would much prefer to see the > > > files/directories renamed to conform the the coding style. > > > If it is, I would like for us to consider implementing this as a > > > git submodule instead. > > > > Yes. Please use submodule. Don't touch the open source from openSBI to > avoid maintenance effort to edk2. >=20 > Sounds good. >=20 > ... >=20 > > > > diff --git a/RiscVPkg/Include/sbi/sbi_bits.h > > > b/RiscVPkg/Include/sbi/sbi_bits.h > > > > new file mode 100644 > > > > index 0000000..4116ee6 > > > > --- /dev/null > > > > +++ b/RiscVPkg/Include/sbi/sbi_bits.h > > > > @@ -0,0 +1,23 @@ > > > > +/** @file > > > > + RISC-V OpesbSBI header file reference. > > > > + > > > > + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. > > > > + 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 > > > > + license may be > > > found at > > > > + INVALID URI REMOVED > > > 3A__opensource.org_licenses_bsd- > > > > 2Dlicense.php&d=3DDwIBAg&c=3DC5b8zRQO1miGmBeVZ2LFWg&r=3D_SN6FZBN4V > > > > gi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=3DiwfkW8MQjzEkixp0gv3xsvh20ei > > > > odo7hGcTLXEL_I0o&s=3DmLKjYgrdQ6MuAN9UVYQeCDB0pNA44m9yBOylxW- > > > Koiw&e=3D > > > > + > > > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS > IS" > > > BASIS, > > > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > > > EXPRESS OR IMPLIED. > > > > + > > > > +**/ > > > > +#ifndef __EDK2_SBI_BITS_H__ > > > > +#define __EDK2_SBI_BITS_H__ > > > > + > > > > +#undef MAX > > > > +#undef MIN > > > > > > Why? > > OpebSBI sbi_bits.h has its own MAX/MIN definitions which are > > duplicated with edk2 ones. OpenSBI is the implementation of RISC-V > > sbi spec which is similar to edk2 for UEFI, the duplicate macros are > > expected. This is the wrapper file to OpenSBI because of we don't want > > to touch OpenSBI code. >=20 > I think we should look at refactoring this in OpenSBI instead. > Especially with us using this as effectively a library, we would need to = be > actively monitoring (well, on every update, but you suggested they may be > frequent) whether any new clashes developed. >=20 > The guys who attended Plumbers suggested thy would be quite flexible to > restructure code in ways that makes the project more consumable. >=20 > I am OK with this being here while it is on the edk2-staging branch. I am happy to see OpenSbi could be more flexible to adopt different firmwar= e code bases. But it takes time to revise OpebSbi and I don't want to keep RISC-V edk2 po= rt in edk2-staing for a long time just for waiting the refactoring. That's = painful to me when merge/syncup RISC-V edk2 port with edk2 repo while edk2 = is changed often as well. I would like to get RISC-V edk2 works in edk2 repo first and revise it once= OpenSbi has refactored. RISC-V edk2 has been staying in edk2-staing since 2016... >=20 > > > > > > > + > > > > +#include "../opensbi/include/sbi/sbi_bits.h" > > > > > > No relative includes. Let's figure out a way to expose the interface > properly. > > > > Can be fixed by RiscVPkg.dec >=20 > Sounds good. >=20 > > > > + > > > > +#endif > > > > \ No newline at end of file > > > > diff --git a/RiscVPkg/Include/sbi/sbi_types.h > > > b/RiscVPkg/Include/sbi/sbi_types.h > > > > new file mode 100644 > > > > index 0000000..fe877f2 > > > > --- /dev/null > > > > +++ b/RiscVPkg/Include/sbi/sbi_types.h > > > > @@ -0,0 +1,24 @@ > > > > +/** @file > > > > + RISC-V OpesbSBI header file reference. > > > > + > > > > + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. > > > > + 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 > > > > + license may be > > > found at > > > > + INVALID URI REMOVED > > > 3A__opensource.org_licenses_bsd- > > > > 2Dlicense.php&d=3DDwIBAg&c=3DC5b8zRQO1miGmBeVZ2LFWg&r=3D_SN6FZBN4V > > > > gi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E&m=3DiwfkW8MQjzEkixp0gv3xsvh20ei > > > > odo7hGcTLXEL_I0o&s=3DmLKjYgrdQ6MuAN9UVYQeCDB0pNA44m9yBOylxW- > > > Koiw&e=3D > > > > + > > > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS > IS" > > > BASIS, > > > > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > > > EXPRESS OR IMPLIED. > > > > + > > > > +**/ > > > > +#ifndef __EDK2_SBI_TYPES_H__ > > > > +#define __EDK2_SBI_TYPES_H__ > > > > + > > > > +#undef TRUE > > > > +#undef FALSE > > > > +#undef NULL > > > > > > Why? > > Same reason as above. >=20 > OK, same response as above. >=20 > > > > + > > > > +#include "../opensbi/include/sbi/sbi_types.h" > > > > > > No relative includes. > > Can be fixed by RiscVPkg.dec >=20 > OK. >=20 > / > Leif