public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 0/3] New RISC-V Patches
@ 2020-05-15 13:39 Daniel Schaefer
  2020-05-15 13:39 ` [PATCH v2 1/3] ProcessorPkg/RiscVOpensbLib: Add opensbi submodule Daniel Schaefer
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Daniel Schaefer @ 2020-05-15 13:39 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Gilbert Chen, Michael D Kinney, Leif Lindholm

In this updated version I addressed Leif's comments and made the following
changes:

- Refactor sbi_call* to SbiCall* (EDKII style)
- Use OpenSBI constants if possible
- Include Base.h in OpensbiTypes.h
- Only use __builtin_expect with Clang and GCC (not MSVC)

I'm sorry, I hadn't explained the new branches properly.
Previously we had all code going to EDK2 via the RISC-V-V2 branch.

Now we're only making the least amount of necessary changes in edk2 and
everything else in edk2-platforms.
Those changes to edk2 can be grouped into different categories:

- Patches for RISC-V EDK2 CI enablement
- Patches for edk2 modules other than RISC-V ones, to allow building them with the RISC-V toolchain
- Other RISC-V enablement like PE/COFF relocation

Those have all been reviewed and merged to edk2 master.

Previously we had two packages just for RISC-V on our edk2 branch:
  RiscVPkg and RiscVPlatformPkg
They are now under
  Platform/RISC-V/PlatformPkg and Silicon/RISC-V/ProcessorPkg
in edk2-platforms.
You, Leif, have previously reviewed those. In addition to this old code, which
was moved, we need some more patches to allow running PEI in S-Mode and
building in edk2-platforms. That's what this patch series is about.

In the previous version of this patchseries I forgot to attach the biggest new
commit, which adds RiscVEdk2SbiLib. It wraps the ecall interface for calling
SBI in a C API and lets PEI and DXE call SBI interfaces. Because we need more
M-Mode capabilities in PEI and DXE than SBI gives us, we register another SBI
extension, that gives us access to the mscratch register.

I hope now it makes more sense.

- Daniel

Cc: Abner Chang <abner.chang@hpe.com>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
Cc: Michael D Kinney <michael.k.kinney@intel.com>
Cc: Leif Lindholm <leif@nuviainc.com>

Abner Chang (1):
  ProcessorPkg/Library: Add RiscVOpensbiLib

Daniel Schaefer (2):
  ProcessorPkg/RiscVOpensbLib: Add opensbi submodule
  ProcessorPkg/Library: Add RiscVEdk2SbiLib

 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.inf |  28 +
 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/RiscVOpensbiLib.inf |  60 ++
 Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h     |  72 ++
 Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h           | 631 ++++++++++++++++
 Silicon/RISC-V/ProcessorPkg/Include/OpensbiTypes.h                      |  73 ++
 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c   | 789 ++++++++++++++++++++
 .gitmodules                                                             |   3 +
 Readme.md                                                               |  36 +
 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi             |   1 +
 9 files changed, 1693 insertions(+)
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.inf
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/RiscVOpensbiLib.inf
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/IndustryStandard/RiscVOpensbi.h
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/Library/RiscVEdk2SbiLib.h
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Include/OpensbiTypes.h
 create mode 100644 Silicon/RISC-V/ProcessorPkg/Library/RiscVEdk2SbiLib/RiscVEdk2SbiLib.c
 create mode 100644 .gitmodules
 create mode 160000 Silicon/RISC-V/ProcessorPkg/Library/RiscVOpensbiLib/opensbi

-- 
2.26.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-06-03 15:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15 13:39 [PATCH v2 0/3] New RISC-V Patches Daniel Schaefer
2020-05-15 13:39 ` [PATCH v2 1/3] ProcessorPkg/RiscVOpensbLib: Add opensbi submodule Daniel Schaefer
2020-05-20 11:51   ` Leif Lindholm
2020-05-15 13:39 ` [PATCH v2 2/3] ProcessorPkg/Library: Add RiscVOpensbiLib Daniel Schaefer
2020-05-20 12:00   ` Leif Lindholm
2020-05-20 14:44     ` Daniel Schaefer
2020-05-15 13:39 ` [PATCH v2 3/3] ProcessorPkg/Library: Add RiscVEdk2SbiLib Daniel Schaefer
2020-05-20 18:27   ` Leif Lindholm
2020-05-29 12:43     ` [edk2-devel] " Daniel Schaefer
2020-05-29 13:15       ` Leif Lindholm
2020-05-20 11:43 ` [edk2-devel] [PATCH v2 0/3] New RISC-V Patches Leif Lindholm
2020-05-20 16:03   ` [edk2-devel] [PATCH v2 0/3] New RISC-V Patches - Why in edk2-platforms Daniel Schaefer
2020-05-20 16:07     ` Daniel Schaefer
2020-05-20 16:17       ` Daniel Schaefer
2020-05-21  6:59         ` Abner Chang
2020-05-28 11:54           ` Leif Lindholm
2020-05-29 14:41             ` Abner Chang
     [not found]             ` <b55ee3ec-74de-532e-01f7-bd24a327d00b@hpe.com>
     [not found]               ` <CY4PR21MB0743421F39A05298FBCFBAA0EF8F0@CY4PR21MB0743.namprd21.prod.outlook.com>
     [not found]                 ` <MN2PR11MB4461D8666DE6DA1E7D4B5B9BD28F0@MN2PR11MB4461.namprd11.prod.outlook.com>
     [not found]                   ` <TU4PR8401MB1182F755F76709FF1D46D3F2FF8F0@TU4PR8401MB1182.NAMPRD84.PROD.OUTLOOK.COM>
     [not found]                     ` <MN2PR11MB4461442E7462457D6C20F6F2D28F0@MN2PR11MB4461.namprd11.prod.outlook.com>
     [not found]                       ` <MW2PR2101MB092494AB8318628E06B62089E18F0@MW2PR2101MB0924.namprd21.prod.outlook.com>
2020-06-03 11:57                         ` [edk2-devel] Where to put RISC-V packages Daniel Schaefer
2020-06-03 15:02                           ` Abner Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox