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.3688.1571328611545358369 for ; Thu, 17 Oct 2019 09:10:11 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0193dcb113=abner.chang@hpe.com) Received: from pps.filterd (m0148664.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9HG1njb003972; Thu, 17 Oct 2019 16:10:10 GMT Received: from g4t3427.houston.hpe.com (g4t3427.houston.hpe.com [15.241.140.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2vpu6ure6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Oct 2019 16:10:10 +0000 Received: from G9W8453.americas.hpqcorp.net (g9w8453.houston.hp.com [16.216.160.211]) (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 3D94D6F; Thu, 17 Oct 2019 16:10:09 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G9W8453.americas.hpqcorp.net (2002:10d8:a0d3::10d8:a0d3) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 17 Oct 2019 16:09:46 +0000 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (15.241.52.10) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 17 Oct 2019 16:09:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JUPT5+RcJcDyKc/LkI7WgM9uR69pW8fu+OQQT6QNcBJmNB/3s//ZoxnUb9zq0QyUjn38hxk0E46eY6H5MpBGtqYDB+issYFq2rOX99Q2j3qf6tcWn1G5bTRPXeqce5pXA40Ds0c+ek+cy2S4ZHbfnvOfJ3bLgA2oPALzuvrI2zq7yoaZQnBs3jpf8znMlCvRHCOSqsT4vgBRfv1Ux3/dHvloWywCjRsQy8o8UJPrW0FEkZWb8It5MpsuJsV3Y5sTSvTifzYRkZZX1W/lCD6SBO2KqssOEmKCFqS2zsSvnSZgzpGl+u5+evAg4dWHVMJojj/rMux/DPoAj1B5Vpp1IA== 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=1AFya5wX6pZkfzt9a/hnTcLUrS0RkjtYI7ZCcOhWmD0=; b=GgJeiArOc1YQJmtuwsZ0h+ClEhmGe9uVbKPp54niJyUiNtak+/srNc1KVzv31wfsASmLVua5JElSiybxGQzhCW+5Qn2X6L9L/lxqNpBmujYQx5DRYXsJqB3TpUADphwH+WjRcAZY0qJBhMquKfEQ89kgCqM6lYIBtA/7cJpazc8l+gqqVi53rfJc3DjZE12JL5KCVkI3sBedr+VumhCl6A20fQmxwDpZ6JzVNoxnzjNv4lem6eSNPUirxhPKq7477+QC8f/PNffhhXPGS5JOL1KFHa/CnqYLbtL4RQ/TfGVljWYPcl21Xxl9itwLAF5DUuoVIcun1XBfal63Ot3sqg== 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 CS1PR8401MB1063.NAMPRD84.PROD.OUTLOOK.COM (10.169.96.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.21; Thu, 17 Oct 2019 16:09:44 +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.2347.024; Thu, 17 Oct 2019 16:09:44 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "leif.lindholm@linaro.org" CC: "Chen, Gilbert" , Palmer Dabbelt Subject: Re: [edk2-devel] [plaforms/devel-riscv-v2 PATCHv2 10/14] U500Pkg/Library: Library instances of U500 platform library Thread-Topic: [edk2-devel] [plaforms/devel-riscv-v2 PATCHv2 10/14] U500Pkg/Library: Library instances of U500 platform library Thread-Index: AQHVbp2YasLRrKgvHku/2C2deVoK5adJMwUAgBUQq7CAAFvxQIAAPIyAgABQNAA= Date: Thu, 17 Oct 2019 16:09:44 +0000 Message-ID: References: <20190919035131.4700-1-gilbert.chen@hpe.com> <20190919035131.4700-11-gilbert.chen@hpe.com> <20191003163220.GN25504@bivouac.eciton.net> <20191017111913.GW25504@bivouac.eciton.net> In-Reply-To: <20191017111913.GW25504@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: 734e4e16-4a99-456f-4054-08d7531c6ce6 x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: CS1PR8401MB1063: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1388; x-forefront-prvs: 01930B2BA8 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(136003)(346002)(396003)(39860400002)(376002)(13464003)(199004)(189003)(66556008)(54906003)(66066001)(74316002)(76116006)(8676002)(26005)(7736002)(4326008)(6306002)(71190400001)(71200400001)(66946007)(9686003)(14444005)(229853002)(19627235002)(5660300002)(256004)(64756008)(66446008)(966005)(86362001)(66476007)(2906002)(52536014)(6506007)(478600001)(53546011)(102836004)(99286004)(76176011)(11346002)(186003)(7696005)(25786009)(446003)(14454004)(33656002)(486006)(3846002)(8936002)(6246003)(305945005)(316002)(6436002)(476003)(110136005)(2501003)(6116002)(81166006)(55016002)(81156014);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR8401MB1063;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: BCL:0; x-microsoft-antispam-message-info: dw44/bBgXFSIN0LyyBnlHSCehQWJ1XYt12byVkw5UY2O32Fu7nB9IaOpolyWYr5DXZinpTRlEFSdIglgWiyddSp4AgSjL5zRvasxM3t4UVwv1GEwL7VzqL9bX1xXL3/oMBNzHY4h9SX0sgLL0j87UlPchV9viWYo52vZ9Uov8uHE2dUH5SKXmInldkv0VuOIfVjwh3PdG99PJLsR/PnegJM+GEQznt6FSsc2ZoEK3BFiaInYD105kZdXIqGs3k5f12cgUxzWNzzcE1EipLjyFMupvp4GO8nB/c0GPn29NG9ricsbfQINGIUhJShBWoWYqaMHoaH62Ur0uNyEYV866E4C8s3q2SPJKb816hZRhUtnOPaqm76LIo+kJGgxjc5lK0CAof3SzU2BiQbd7oTf+SGZC630VHI9ESy82+5ozjRY+7iknmHUYef86Appd1a2S2cCFoq/4j+AaDxyRcgT9Q== X-MS-Exchange-CrossTenant-Network-Message-Id: 734e4e16-4a99-456f-4054-08d7531c6ce6 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Oct 2019 16:09:44.5304 (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: sHUaloJwxq14b/cp8iZ+UVQXq4dzbKN0rUfTI3TTtqBWZ4/e1CyeFLhtBbRG2UDtf0JrmPFdpxMgiY3eg2IACQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB1063 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,1.0.8 definitions=2019-10-17_05:2019-10-17,2019-10-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 priorityscore=1501 phishscore=0 mlxscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910170144 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 > Leif Lindholm > Sent: Thursday, October 17, 2019 7:19 PM > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) > > Cc: Chen, Gilbert ; Palmer Dabbelt > > Subject: Re: [edk2-devel] [plaforms/devel-riscv-v2 PATCHv2 10/14] > U500Pkg/Library: Library instances of U500 platform library >=20 > On Thu, Oct 17, 2019 at 07:44:47AM +0000, Abner Chang wrote: > > > -----Original Message----- > > > From: Chang, Abner (HPS SW/FW Technologist) > > > Sent: Thursday, October 17, 2019 10:21 AM > > > To: devel@edk2.groups.io; leif.lindholm@linaro.org; Chen, Gilbert > > > > > > Cc: Palmer Dabbelt > > > Subject: RE: [edk2-devel] [plaforms/devel-riscv-v2 PATCHv2 10/14] > > > U500Pkg/Library: Library instances of U500 platform library >=20 > > > > Seeing this, I have a bit of a feeling that this Opensbi isn't > > > > being consistently > > > > treated/named: > > > > - In edk2, we have RiscVPkg/Library/RiscVOpensbiLib which implemen= ts > > > > class RiscVOpensbiLib. > > > > - Here, we have U500Pkg/Library/OpenSbiPlatformLib implementing > the > > > > class OpenSbiPlatformLib. > > > > - *Logically*, what we have is > > > > Platform/RiscV/Universal/Sec/SecMain.inf which depends on the > > > > OpensbiLib which depends on the OpenSbiPlatformLib. > > > > - However, there is no OpenSbiPlatformLib in edk2, which is very > > > > unfortunate because that does not let us build edk2/RiscVPkg i= n > > > > isolation (like we can with all the other packages in edk2). > > > Will name it as Opensbi. > > > > > > > > Here is my preferred solution for untangling this: > > > > 1) Standardise on OpenSbi or Opensbi. Opensbi follows the pattern = we > > > > already use for Openssl, so would be my preference. > > > > 2) Standardise on RiscVOpensbi or Opensbi - both for filenames and > > > > LibararyClasses. Either is fine, the former is less likely to c= lash > > > > with other imported projects in the future (but I would estimat= e > > > > this risk as *very* low to begin with). > > > > 3) Implement a (RiscV)OpensbiPlatformLibNull in > > > > edk2/RiscVPkg/Library, > > > I will have OpensbiPlatformLibNull in RiscVPlatformPkg/Library > > > > > > > containing only what is required to build/link > > > > RiscVPkg/Library/(RiscV)OpensbiLib/. > > > > 3.5) Map that to OpensbiPlatformLib in RiscVPkg/RiscVPkg.dsc. > > > > 3.6) Add a depedency on OpensbiPlatformLib to > > > > (RiscV)OpensbiLib.inf > > > > 3.7) Drop the dependency on OpensbiPlatformLib from > > > > Platform/RiscV/Universal/Sec/SecMain.inf > > > > > > Above work for me > > > > I changed my mind. Due to SecMain is moved to RiscVPlatformPkg in > > edk2 and requires both RiscVOpensbiPlatformLib and RiscVOpensbLiib, > > SecMain.inf still has dependency with these two libs. >=20 > I am not sure I understand. >=20 > What I am saying is that OpensbiLib already has a dependency on > OpensbiPlatformLib. So there is no benefit to adding the OpensbiPlatform= Lib > dependency to SecMain. Or does that not work for some reason? In order to make those dependencies correct, below is the new changes, RiscVOpensbiPlatformLib has NO dependency with RiscVOpensbiLib. RiscVOpensbiLib has NO dependency with RiscVOpensbiPlatformLib. SecMain.inf has dependencies with both RiscVOpensbiPlatformLib and RiscVOp= ensbiLib because SecMain.inf needs the functionalities of those libs. Abner >=20 > Regards, >=20 > Leif >=20 >=20