From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.9364.1576761700582743562 for ; Thu, 19 Dec 2019 05:21:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=fZ3N8gOD; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: leif.lindholm@linaro.org) Received: by mail-wm1-f68.google.com with SMTP id p17so5612715wmb.0 for ; Thu, 19 Dec 2019 05:21:40 -0800 (PST) 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=ejASViWYCuRF2C/S9jroCA/R66ItOw2CTl8f5vpPh0A=; b=fZ3N8gODR9bHqtcXsEXHiZUEDveuu59UkNT1D+iikqTK9c65RQ/JxqTrm88u+D4Tba ArFkJG4xpP69blHVIE/3kFntdmnMAd5IWCrOTXEP60twrWeQUjiQ59QfAVNbpegXPc97 gtxuRs32kmrUOP9y7oVLuncpqE2lbKwGG4PBydXEwZcM5076nG4Y6GqFMKw+01M8EYXC Z6Sc1Uh8L2shGwHXT+gq5kjXYEv2mzGHdggQVRcFNQBGMZdDFFCoWI+a0XiCXRvv5XZu j+NaJXYmCbCQXmIY/N5MOLdwMqdmzE8rTtEvkElJYfhxvrB7nt5QmhAt0kTEwMAtXalp PbCA== 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=ejASViWYCuRF2C/S9jroCA/R66ItOw2CTl8f5vpPh0A=; b=srGWwWc68l12f/TXUBdNy3f42x9vcwfYJYUtFyZxW0GcvOjE4rtXGzl9tBpwN4lUyl 2BjJPFALDy4bBrL8oDIInV2ic4TCvcRmLLVdzvRXZlerHvUwupeoDfbdgPN7pWVbPJOi Invh5VrjBE6dyqDcInnLOi2g6MlHEO7VB+jOyDs1/APJ1FNWU0HESdIBLaE2L0JieZzx IbBdqL9CHk/xIv/ZfDbuIcGg/YrF8Q5+le+ScpXmIhbEiEzfOfhLE+b12wu4/rnogv+a 1qMvDEa92owS0rz+xTHVa3xuuKGziSwgNjwiHOHnqTDjE5e2xE3sj/UJ34PtXgfzlbw0 fX3w== X-Gm-Message-State: APjAAAW9eHHZcgQgB0GhidePG9iKjxVArFetL7IQmFF0Jeh8vIlPSUDH /RrQ3LY8g9VJnaW9f61u1HfBBTt3A00= X-Google-Smtp-Source: APXvYqwGaHzQmkZYnePhbexaHXdDZO40CwvsvwIpogybNsZn2CyksPhOZDJ1JusfUmxAtfI0nO/akQ== X-Received: by 2002:a1c:80d4:: with SMTP id b203mr9911621wmd.102.1576761698720; Thu, 19 Dec 2019 05:21:38 -0800 (PST) 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 g21sm6089133wmh.17.2019.12.19.05.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 05:21:37 -0800 (PST) Date: Thu, 19 Dec 2019 13:21:36 +0000 From: "Leif Lindholm" To: devel@edk2.groups.io, abner.chang@hpe.com Cc: "Chen, Gilbert" , "Kinney, Michael D" Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v3 03/39] RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support Message-ID: <20191219132136.GU7359@bivouac.eciton.net> References: <1572227957-13169-1-git-send-email-abner.chang@hpe.com> <1572227957-13169-4-git-send-email-abner.chang@hpe.com> <20191121162428.GJ7359@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, Dec 19, 2019 at 04:09:22 +0000, Abner Chang wrote: > > > diff --git a/RiscVPkg/Include/sbi/sbi.h b/RiscVPkg/Include/sbi/sbi.h > > > new file mode 100644 index 0000000..04e7f18 > > > --- /dev/null > > > +++ b/RiscVPkg/Include/sbi/sbi.h > > > @@ -0,0 +1,52 @@ > > > +/** @file > > > + SBI inline function calls. > > > + > > > + Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All > > > + rights reserved.
> > > + > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > +**/ > > > + > > > +#ifndef EDK2_SBI_H_ > > > +#define EDK2_SBI_H_ > > > + > > > +#include // Reference to header file wrapper > > > +#include // Reference to header file in > > > +opensbi > > > > This whole sbi situation is too much of a hornets' nest, and really does need > > to get sorted before we even push this to -staging. > > (But I do think is is one of the last things we need to address.) > > > > And I think the starting point to untangle it is to rename the wrapper include > > files in RiscVPkg/Include/sbi (and indeed the directory > > itself) to conform with the TianoCore standard. > > > > That means: > > > > RiscVPkg/Include/IndustryStandard/Sbi/Sbi.h > > RiscVPkg/Include/IndustryStandard/Sbi/SbiBits.h > > RiscVPkg/Include/IndustryStandard/Sbi/SbiTypes.h > > > > Unless all of the wrappers can be combined into a single > > RiscVPkg/Include/IndustryStandard/Sbi.h > > > > ...and then tested on a case-sensitive filesystem. > > > > For the record, doing that immediately results in the non-wrapper versions > > being pulled in and then the build failing. > > Leif, > We can't change the naming of those header files under > RiscVPkg/Include/sbi. We build opensbi source code in edk2 and those > source files refer to those header file. And we are not going to > change opensbi code as we discussed before. > > The only file we can change is sbi.h -> Sbi.h because this header > file is created for edk2 RISC-V related drivers. > > I think we can make it this way, > Rename sbi.h to RiscVOpensbi.h and move it to under > RiscVPkg/Include/IndustryStandard, no need "/Sbi" subdirectory. That sounds good to me. > Keep the naming of sbi_bits.h and sbi_types.h and still leave those > under RiscVPkg/Include/sbi. > > No naming changes in order to build opensbi source file. Can't even > change "/sbi" subdirectory to "/Sbi". sbi_bits.h and sbi_types.h are > the binding files for edk2 framework BTW. Sure, if we separate interface for EDK2 apps from binding, it becomes less bad. Plus sbi_bits.h needs to just go, but we'll fix that in opensbi before merging Risc-V to edk2 master. I think the proper fix for sbi_types.h also involves a change to opensbi. But if you can - do those changes - move/rename SbiFirmwareContext.h to live with RiscVOpensbi.h - add a (short) Readme.md to RiscVPkg/Include/sbi explaining what these files are and why I think that resolves my final reservations against bringing this set onto a staging branch. Regards, Leif