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.<BR> > > > + > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > + > > > +**/ > > > + > > > +#ifndef EDK2_SBI_H_ > > > +#define EDK2_SBI_H_ > > > + > > > +#include <sbi/sbi_types.h> // Reference to header file wrapper > > > +#include <include/sbi/riscv_asm.h> // 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52414): https://edk2.groups.io/g/devel/message/52414 Mute This Topic: https://groups.io/mt/38757517/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-