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.web12.2467.1571376284465262512 for ; Thu, 17 Oct 2019 22:24:44 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0194b9932d=abner.chang@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9I5LEVd009213; Fri, 18 Oct 2019 05:24:43 GMT Received: from g2t2352.austin.hpe.com (g2t2352.austin.hpe.com [15.233.44.25]) by mx0b-002e3701.pphosted.com with ESMTP id 2vq0agpb1b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Oct 2019 05:24:43 +0000 Received: from G9W8456.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.161.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g2t2352.austin.hpe.com (Postfix) with ESMTPS id A63029B; Fri, 18 Oct 2019 05:24:42 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G9W8456.americas.hpqcorp.net (2002:10d8:a15f::10d8:a15f) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 18 Oct 2019 05:24:42 +0000 Received: from NAM03-BY2-obe.outbound.protection.outlook.com (15.241.52.13) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 18 Oct 2019 05:24:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aiBRi5l42DZ+Gi3MTGMO0jyXU5ywrxuJJcP0M+5WkelPqY8ChoDPOB4h9/nYYZAKFMjS/p6aLrCBdDgKgmI21T1SFIu3dHjh8JtGDIC0zsE3VnJD33zWkDFmrGF2wV608xIwUgFLn5cD+MldH4miYu1D8qH8b46qOtvG3RYrHzvDzVC/9dTr1smIDXNcWoQG21npfAerXgtkyoQJN6ThGWe3NpJz7bgNXdw17HjN7AncEVWBZT7Jb61Ke4nyv7ip9OMbwNbccdEn769R1KY7eNTAPM1vvvEZVDHZrMTTKkMCV3kg4iAuWWfpp10mjUknxR4EEgVo57oWVxDixGh3EQ== 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=VPtVOfOn8eYu/+e2M/aHOqhm+mj1EV0X83QxcAfhHEE=; b=ebcotO/ouFRL+BL4uy9+5IRGK8JYrqOSba9t9ONVPLKCtq/38FJsfbXzHIcFxqeRxw4PQ83IgMgjNvvkfbVggHHbAXzVa0ROStf+PoncvohbCq7mc2sDmHLIjtxDNZfJBCua+gVhBC+AFZP9o727sqcO6oUqnnyQvJeHRW4qpunL+vLuGlLxsSLPzR2r/MTS4cAR715jerrzdy0Tfi0FbwSfdf4/kzB0BeoRkUbGwu+mYA/YTifBoXtrW3WRcqSyFt4VWQZLDp7Yma9orcpqscCF/RuqnqfsnQzXZrlDlLer6E0V1RnY5OA5g9HyMQ/pu+dA8unDGGxb0nZe998l+g== 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 CS1PR8401MB0485.NAMPRD84.PROD.OUTLOOK.COM (10.169.14.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2367.20; Fri, 18 Oct 2019 05:24:38 +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; Fri, 18 Oct 2019 05:24:38 +0000 From: "Abner Chang" To: Leif Lindholm , "devel@edk2.groups.io" 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/2C2deVoK5adJMwUAgBUQq7CAAFvxQIAAPIyAgABQNACAAAjqgIAA1fZg Date: Fri, 18 Oct 2019 05:24:38 +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> <20191017163811.GY25504@bivouac.eciton.net> In-Reply-To: <20191017163811.GY25504@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: 9714d1e7-c2a1-463f-72ce-08d7538b78ae x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: CS1PR8401MB0485: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 01949FE337 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(366004)(39860400002)(136003)(346002)(396003)(199004)(189003)(13464003)(229853002)(4326008)(86362001)(33656002)(52536014)(5660300002)(8936002)(478600001)(74316002)(6116002)(3846002)(2906002)(14454004)(66066001)(186003)(71190400001)(71200400001)(476003)(19627235002)(486006)(7696005)(316002)(76176011)(26005)(76116006)(66946007)(66556008)(256004)(66476007)(64756008)(66446008)(81166006)(81156014)(6436002)(8676002)(9686003)(6246003)(2501003)(55016002)(7736002)(25786009)(305945005)(14444005)(99286004)(102836004)(54906003)(53546011)(110136005)(11346002)(6506007)(446003);DIR:OUT;SFP:1102;SCL:1;SRVR:CS1PR8401MB0485;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: 7CBPuYi+69L5cvn2XT1OQmkJ/7DNcB/FuhbD5xDeOqW0B5IGSXAAGK0JC4zJzzkrJuwlaOYxNr6T+37Vni98htupnSUy6fIKKJTDFE5wYb4oCywh2pTkB65KKVwthLSip3rPP6p6tKcG8PkjwAnYMS2BPbx2VFmG4oMbUkFBY3zyrqtlyPzq5XBCJuuoEW6dygVu8KBWb8r4Jk7sL2r1ax7GJ9Tq4zs5sXDEdtHOhKx+HS5zxRcjqKvEuVSprVfZnU/9G8Muy06h5V/rGJ/flCt1pOdKLSqUpWVj85W16hoxxWmDFhcWjIivvIdKhfHZbV5kvODkEUWeTQ9EYiTQdR4ghwiPwilH74+wD2Q0tW0P2bjB3MMpbtyE4bHZoRAcXYkMgHJUIrfxrli8OMuqyUCg8H5WopNt9fn+9DULWU/4m8BKB7dEjeEYOGOHneV/ X-MS-Exchange-CrossTenant-Network-Message-Id: 9714d1e7-c2a1-463f-72ce-08d7538b78ae X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2019 05:24:38.5073 (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: lcAt16s7EbU8Ae0/AqTxFpCHJBz5jBhsJdtTB9Mr+4pm3dej3aJ4G57oMglpcsdc7mdzWeZQLDW+2J/Vd7puiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0485 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-18_01:2019-10-17,2019-10-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 clxscore=1015 impostorscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1910180050 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: Friday, October 18, 2019 12:38 AM > 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 04:09:44PM +0000, Abner Chang wrote: > > > -----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 > > > > > > 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 > > > > > > > > > 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 > implements > > > > > > 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 v= ery > > > > > > unfortunate because that does not let us build edk2/RiscVPk= g in > > > > > > 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 patte= rn > 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 t= o clash > > > > > > with other imported projects in the future (but I would esti= mate > > > > > > 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 li= bs. > > > > > > I am not sure I understand. > > > > > > What I am saying is that OpensbiLib already has a dependency on > > > OpensbiPlatformLib. So there is no benefit to adding the > > > OpensbiPlatformLib 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 > > RiscVOpensbiLib because SecMain.inf needs the functionalities of those > > libs. >=20 > Ah, OK - this is new for v3 then? > In that case, sure, the above sounds fine. Yes, this will be in the next set of patches. >=20 > Regards, >=20 > Leif