From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.4077.1571330297978591089 for ; Thu, 17 Oct 2019 09:38:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=T8roM2L9; spf=pass (domain: linaro.org, ip: 209.85.128.66, mailfrom: leif.lindholm@linaro.org) Received: by mail-wm1-f66.google.com with SMTP id 5so3264223wmg.0 for ; Thu, 17 Oct 2019 09:38: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=PBQ/NTS1Nku35xMYvx+YiTHuc8uWvYnx+HUl9T2nzkI=; b=T8roM2L9KLuVYDRai4ybtVs3BuuQpv4O0tLMtuBvSMnjsniQddE0JwAqCA7VMczGKk rVUGvMO1xmK61uKAqje0OT90fg7ta7jWKMC4Uffa1N5RV11HNSisz+i9xpCbO+n+iGlO 79vfOQezqyTWdEYL0Q+rxrMBgvJQMhRfaMiBOqTUfFow/yMIIsbJzu0XoMhE/Vc6FNDK XdsSeF0WymZ++GP6MAvupaHnDB8ra0S855vIq1+FCrFF9X4xtIEOSeBEzQD48kFbxNN7 /Vz3vJ0ZHze4kDIkhuLTnVbi1HWz03Bbc5XWqu9R/9KwVjag1lpm31gsmrToEWnqNGHC rX4w== 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=PBQ/NTS1Nku35xMYvx+YiTHuc8uWvYnx+HUl9T2nzkI=; b=M0wrx9fCID7Nayz99Jfi5tG1oztFTWJDZqwdcALJRD1EMJx/W4Ma2YUSnnHABbn5PC XUCkuuPnNKCq6VY09MpLsleXAjSiz4nWC7ABNq8go6B2qaRSrGBieNqhsHXOv65zD/we 9nKM/Mh8xhUeKz+VmW3a1R7WolNM6VmoScd+amGoc/ipxkAKR6voTdp6wRtcA8UaBEse V0nSaNfuYMi4k5TnRIfhML4MIO0hB9wGI1SuJBPgo46mjjy/U9FxwBDcUSEZ4CzbYmSf k9E+XOeVB9pnUHffoggWijsbZGFpfTYDMU1qekBHPQ/cyJGqVPzcGpkdKkJKKvG6u4Wn DV0w== X-Gm-Message-State: APjAAAU0Euu93BybjC3J9Q0eKcMQIGYELJ8Cw2M9GdZ2OQkDpbceD5OH 6VWlXZ8baTS0dwEdm5kuSE3cD8w0R/0= X-Google-Smtp-Source: APXvYqzs9y2DUokVDjhOHq+zDrJkaevTBZIEc8eikkQJKG3y+Q3OaO0eyD+nj0099rAVxseX9DDRVA== X-Received: by 2002:a05:600c:20ca:: with SMTP id y10mr3928896wmm.168.1571330294238; Thu, 17 Oct 2019 09:38:14 -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 p7sm2583040wma.34.2019.10.17.09.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 09:38:13 -0700 (PDT) Date: Thu, 17 Oct 2019 17:38:11 +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: <20191017163811.GY25504@bivouac.eciton.net> 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> 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 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 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? > > 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. Ah, OK - this is new for v3 then? In that case, sure, the above sounds fine. Regards, Leif