From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web10.718.1571311157701683778 for ; Thu, 17 Oct 2019 04:19:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=rzBioA27; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: leif.lindholm@linaro.org) Received: by mail-wr1-f66.google.com with SMTP id w18so1328042wrt.3 for ; Thu, 17 Oct 2019 04:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aS5bCkaaDnyigS1ouWRaLJSq1PwJJHhy5pSbbgXQzsA=; b=rzBioA27T7GGfIdRlthUCBX6Dh78N/hoM/XYEAbc5XrCVmwOkZkLPMWGJXlZNoxalq cTDQEw+TL2Ax1p+F+wH5juibBEZ+2om9Ltp7kaFVQ+jhXIAwiucV3iGxjHV2pt7ZvHcq piX/iVf8FpnOLJ0vrYimAScBauGIIIQD60HrlozsBbCp8/k0Y7gujQbWgMLkBq3nIvGn buQIW++Ckyw4D9miCj6vgvvZUTqjB+I0jQY58vLy2ZCYF1mNBaKh2ukM1LpyxD2GzA/N rw9yUM3S8QOi4H6kEKu/0F54Gc+LJevMZes77srBF1hcOVfhNBCKto8iG8tLoanv6ned 367Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aS5bCkaaDnyigS1ouWRaLJSq1PwJJHhy5pSbbgXQzsA=; b=iX3fyR5Rbn6jbS5/R/VBtNqihnHDFw3GlF+ea9fRlhJo/BIxLfMGLjNDO3eF0H0SDb OKaItqf32XZavNHr3j6+wub5C6e2KFRh91dpkix14ps7y5KUpytRWnIXOhvApOZx5t8h Bf+v7jeCvtaEQWWGSSH4tTu6wW4ewt3IqTv6Xindxeoi+6l0hu9rum7KQ3RiuAo15cfT ljbMbwFaFU13lkE2a+MnrLI6FWtDK1sqPwmhFbJEK0w+h/Nvnz+gzyij3+5+9RK9x0On 0C1rTOC01yi0t4az0RUYU3zt+S0bay4Ut/g5B75FvVXSXC6iCUaMBORxw/d8WCz0wcsp WnMA== X-Gm-Message-State: APjAAAUrNRLHaXiTHXZprQYwN08AMuTjaUzJhAi/SFFMuUw/i9oq/vuI gnQBLbIf/COo1xEwh9osjQcdaRSwvrw= X-Google-Smtp-Source: APXvYqw7vjVsDM1Vv1AHDwAtDjVSl8+RS7sc1ig9OB7e36o/kKjteSZi+21ZxPLMpaMquYiBEAYQaA== X-Received: by 2002:a5d:44c8:: with SMTP id z8mr2543974wrr.66.1571311155980; Thu, 17 Oct 2019 04:19:15 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id m18sm2124348wrg.97.2019.10.17.04.19.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 04:19:14 -0700 (PDT) Date: Thu, 17 Oct 2019 12:19:13 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, abner.chang@hpe.com Cc: "Chen, Gilbert" , Palmer Dabbelt Subject: Re: [edk2-devel] [plaforms/devel-riscv-v2 PATCHv2 10/14] U500Pkg/Library: Library instances of U500 platform library Message-ID: <20191017111913.GW25504@bivouac.eciton.net> References: <20190919035131.4700-1-gilbert.chen@hpe.com> <20190919035131.4700-11-gilbert.chen@hpe.com> <20191003163220.GN25504@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 very > > > unfortunate because that does not let us build edk2/RiscVPkg 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 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 clash > > > with other imported projects in the future (but I would estimate > > > 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. 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? Regards, Leif