Score
0
1 Unstar Star 1 Fork 1

Gitee 极速下载 / OpenSBIC

Clone or download
README.md
Copy Edit Web IDE Raw Normal History
Atish Patra   docs: Use doxygen config to mark the main page 2020-06-04
RISC-V Open Source Supervisor Binary Interface (OpenSBI)
Anup Patel   Initial commit. 2018-12-11
========================================================
Anup Patel   docs: Fix ordering of pages in table of contents 2020-05-06
Copyright and License---------------------The OpenSBI project is copyright (c) 2019 Western Digital Corporationor its affiliates and other contributors.It is distributed under the terms of the BSD 2-clause license("Simplified BSD License" or "FreeBSD License", SPDX: *BSD-2-Clause*).A copy of this license with OpenSBI copyright can be found in the file[COPYING.BSD].All source files in OpenSBI contain the 2-Clause BSD license SPDX shortidentifier in place of the full license text.```SPDX-License-Identifier:    BSD-2-Clause```This enables machine processing of license information based on the SPDXLicense Identifiers that are available on the [SPDX] web site.OpenSBI source code also contains code reused from other projects as listedbelow. The original license text of these projects is included in the sourcefiles where the reused code is present.* The libfdt source code is disjunctively dual licensed  (GPL-2.0+ OR BSD-2-Clause). Some of this project code is used in OpenSBI  under the terms of the BSD 2-Clause license. Any contributions to this  code must be made under the terms of both licenses.See also the [third party notices] file for more information.Introduction------------
Damien Le Moal   top: README.md updates 2019-02-07
The **RISC-V Supervisor Binary Interface (SBI)** is the recommended interface
Damien Le Moal   docs: README.md update 2019-01-23
between:
Anup Patel   Initial commit. 2018-12-11
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
1. A platform-specific firmware running in M-mode and a bootloader, a   hypervisor or a general-purpose OS executing in S-mode or HS-mode.2. A hypervisor running in HS-mode and a bootloader or a general-purpose OS
Damien Le Moal   top: README.md updates 2019-02-07
   executing in VS-mode.
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   docs: README.md update 2019-01-23
The *RISC-V SBI specification* is maintained as an independent project by the
Tobias Klauser   README.md: fix markdown link formatting 2020-07-01
RISC-V Foundation on [Github].
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   top: README.md updates 2019-02-07
The goal of the OpenSBI project is to provide an open-source reference
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
implementation of the RISC-V SBI specifications for platform-specific firmwaresexecuting in M-mode (case 1 mentioned above). An OpenSBI implementation can be
Damien Le Moal   top: README.md updates 2019-02-07
easily extended by RISC-V platform and system-on-chip vendors to fit a
Damien Le Moal   docs: README.md update 2019-01-23
particular hardware configuration.
Damien Le Moal   README: Update 2018-12-25
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
The main component of OpenSBI is provided in the form of a platform-independent
Damien Le Moal   top: README.md updates 2019-02-07
static library **libsbi.a** implementing the SBI interface. A firmware orbootloader implementation can link against this library to ensure conformancewith the SBI interface specifications. *libsbi.a* also defines an interface for
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
integrating with platform-specific operations provided by the platform firmwareimplementation (e.g. console access functions, inter-processor interrupt
Damien Le Moal   top: README.md updates 2019-02-07
control, etc).
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
To illustrate the use of the *libsbi.a* library, OpenSBI also provides a set ofplatform-specific support examples. For each example, a platform-specificstatic library *libplatsbi.a* can be compiled. This library implementsSBI call processing by integrating *libsbi.a* with the necessaryplatform-dependent hardware manipulation functions. For all supported platforms,OpenSBI also provides several runtime firmware examples built using the platform
Damien Le Moal   top: README.md updates 2019-02-07
*libplatsbi.a*. These example firmwares can be used to replace the legacy
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
*riscv-pk* bootloader (aka BBL) and enable the use of well-known bootloaders
Tobias Klauser   README.md: fix markdown link formatting 2020-07-01
such as [U-Boot].
Damien Le Moal   top: README.md updates 2019-02-07
Atish Patra   docs: Update README about supported SBI versions 2020-04-16
Supported SBI version---------------------Currently, OpenSBI fully supports SBI specification *v0.2*. OpenSBI alsosupports Hart State Management (HSM) SBI extension starting from OpenSBI v0.7.HSM extension allows S-mode software to boot all the harts a defined orderrather than legacy method of random booting of harts. As a result, manyrequired features such as CPU hotplug, kexec/kdump can also be supported easilyin S-mode. HSM extension in OpenSBI is implemented in a non-backward compatiblemanner to reduce the maintenance burden and avoid confusion. That's why, anyS-mode software using OpenSBI will not be able to boot more than 1 hart if HSMextension is not supported in S-mode.Linux kernel already supports SBI v0.2 and HSM SBI extension starting from**v5.7-rc1**. If you are using an Linux kernel older than **5.7-rc1** or anyother S-mode software without HSM SBI extension, you should stick to OpenSBIv0.6 to boot all the harts. For a UMP systems, it doesn't matter.N.B. Any S-mode boot loader (i.e. U-Boot) doesn't need to support HSM extension,as it doesn't need to boot all the harts. The operating system should becapable enough to bring up all other non-booting harts using HSM extension.
Atish Patra   docs: Update about toolchain section. 2019-02-15
Required Toolchain------------------OpenSBI can be compiled natively or cross-compiled on a x86 host. For
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
cross-compilation, you can build your own toolchain or just download
Tobias Klauser   README.md: fix markdown link formatting 2020-07-01
a prebuilt one from the [Bootlin toolchain repository].
Atish Patra   docs: Update about toolchain section. 2019-02-15
Bin Meng   treewide: Use conventional names for 32-bit and 64-bit 2019-07-23
Please note that only a 64-bit version of the toolchain is available in
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
the Bootlin toolchain repository for now.
Atish Patra   docs: Update about toolchain section. 2019-02-15
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
Building and Installing the OpenSBI Platform-Independent Library----------------------------------------------------------------
Damien Le Moal   top: README.md updates 2019-02-07
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
The OpenSBI platform-independent static library *libsbi.a* can be compilednatively or it can be cross-compiled on a host with a different basearchitecture than RISC-V.
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   docs: README.md update 2019-01-23
For cross-compiling, the environment variable *CROSS_COMPILE* must be definedto specify the name prefix of the RISC-V compiler toolchain executables, e.g.*riscv64-unknown-elf-* if the gcc executable used is *riscv64-unknown-elf-gcc*.
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   top: README.md updates 2019-02-07
To build *libsbi.a* simply execute:
Damien Le Moal   README: Update 2018-12-25
```make```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
All compiled binaries as well as the resulting *libsbi.a* static library filewill be placed in the *build/lib* directory. To specify an alternate build root
Damien Le Moal   docs: README.md update 2019-01-23
directory path, run:
Damien Le Moal   README: Update 2018-12-25
```make O=<build_directory>```
Damien Le Moal   docs: README.md update 2019-01-23
To generate files to be installed for using *libsbi.a* in other projects, run:
Damien Le Moal   README: Update 2018-12-25
```make install```
Damien Le Moal   docs: README.md update 2019-01-23
Damien Le Moal   README: Update 2018-12-25
This will create the *install* directory with all necessary include files
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
copied under the *install/include* directory and the library file copied intothe *install/lib* directory. To specify an alternate installation rootdirectory path, run:
Damien Le Moal   README: Update 2018-12-25
```make I=<install_directory> install```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
Building and Installing a Reference Platform Static Library and Firmware------------------------------------------------------------------------
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   top: README.md updates 2019-02-07
When the *PLATFORM=<platform_subdir>* argument is specified on the make command
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
line, the platform-specific static library *libplatsbi.a* and firmware examples
Damien Le Moal   top: README.md updates 2019-02-07
are built for the platform *<platform_subdir>* present in the directory
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
*platform* in the OpenSBI top directory. For example, to compile the platformlibrary and the firmware examples for the QEMU RISC-V *virt* machine,
Anup Patel   platform: Remove qemu/virt directory 2020-05-01
*<platform_subdir>* should be *generic*.
Damien Le Moal   README: Update 2018-12-25
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
To build *libsbi.a*, *libplatsbi.a* and the firmware for one of the supportedplatforms, run:
Damien Le Moal   README: Update 2018-12-25
```make PLATFORM=<platform_subdir>
Damien Le Moal   docs: README.md update 2019-01-23
```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
An alternate build directory path can also be specified:
Damien Le Moal   docs: README.md update 2019-01-23
```
Damien Le Moal   README: Update 2018-12-25
make PLATFORM=<platform_subdir> O=<build_directory>```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
The platform-specific library *libplatsbi.a* will be generated in the
Anup Patel   top: Fix typo in README.md 2019-01-29
*build/platform/<platform_subdir>/lib* directory. The platform firmware fileswill be under the *build/platform/<platform_subdir>/firmware* directory.
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
The compiled firmwares will be available in two different formats: an ELF file
Damien Le Moal   docs: README.md update 2019-01-23
and an expanded image file.To install *libsbi.a*, *libplatsbi.a*, and the compiled firmwares, run:
Damien Le Moal   README: Update 2018-12-25
```make PLATFORM=<platform_subdir> install
Damien Le Moal   docs: README.md update 2019-01-23
```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
This will copy the compiled platform-specific libraries and firmware files
Anup Patel   top: Fix typo in README.md 2019-01-29
under the *install/platform/<platform_subdir>/* directory. An alternate
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
install root directory path can be specified as follows:
Damien Le Moal   docs: README.md update 2019-01-23
```
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
make PLATFORM=<platform_subdir> I=<install_directory> install
Damien Le Moal   README: Update 2018-12-25
```
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
In addition, platform-specific configuration options can be specified with the
Damien Le Moal   docs: README.md update 2019-01-23
top-level make command line. These options, such as *PLATFORM_<xyz>* or
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
*FW_<abc>*, are platform-specific and described in more details in the
Damien Le Moal   docs: README.md update 2019-01-23
*docs/platform/<platform_name>.md* files and*docs/firmware/<firmware_name>.md* files.
Anup Patel   top: More detailed top-level README.md 2018-12-20
Bin Meng   README: Document 32-bit / 64-bit images build 2019-07-23
Building 32-bit / 64-bit OpenSBI Images---------------------------------------By default, building OpenSBI generates 32-bit or 64-bit images based on thesupplied RISC-V cross-compile toolchain. For example if *CROSS_COMPILE* is setto *riscv64-unknown-elf-*, 64-bit OpenSBI images will be generated. If building32-bit OpenSBI images, *CROSS_COMPILE* should be set to a toolchain that ispre-configured to generate 32-bit RISC-V codes, like *riscv32-unknown-elf-*.However it's possible to explicitly specify the image bits we want to build witha given RISC-V toolchain. This can be done by setting the environment variable*PLATFORM_RISCV_XLEN* to the desired width, for example:```export CROSS_COMPILE=riscv64-unknown-elf-export PLATFORM_RISCV_XLEN=32```will generate 32-bit OpenSBI images. And vice vesa.
Damien Le Moal   docs: README.md update 2019-01-23
Contributing to OpenSBI-----------------------The OpenSBI project encourages and welcomes contributions. Contributions should
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
follow the rules described in the OpenSBI [Contribution Guideline] document.
Damien Le Moal   docs: README.md update 2019-01-23
In particular, all patches sent should contain a Signed-off-by tag.
Atish Patra   docs: Add licensing seciton for external projects. 2019-01-09
Anup Pate   top: Add CONTRIBUTORS.md file 2019-04-15
The [Contributors List] document provides a list of individuals andorganizations actively contributing to the OpenSBI project.
Anup Patel   top: More detailed top-level README.md 2018-12-20
Documentation-------------
Damien Le Moal   docs: README.md update 2019-01-23
Detailed documentation of various aspects of OpenSBI can be found under the*docs* directory. The documentation covers the following topics.
Damien Le Moal   README: Update 2018-12-25
Damien Le Moal   docs: README.md update 2019-01-23
* [Contribution Guideline]: Guideline for contributing code to OpenSBI project* [Library Usage]: API documentation of OpenSBI static library *libsbi.a*
Anup Patel   docs: Add platform requirements document 2020-05-05
* [Platform Requirements]: Requirements for using OpenSBI on a platform
Damien Le Moal   top: README.md updates 2019-02-07
* [Platform Support Guide]: Guideline for implementing support for new platforms
Damien Le Moal   docs: README.md update 2019-01-23
* [Platform Documentation]: Documentation of the platforms currently supported.* [Firmware Documentation]: Documentation for the different types of firmware
Damien Le Moal   top: README.md updates 2019-02-07
  examples build supported by OpenSBI.
Anup Patel   docs: Add initial documentation for domain support 2020-09-24
* [Domain Support]: Documentation for the OpenSBI domain support which helps  users achieve system-level partitioning using OpenSBI.
Anup Patel   top: More detailed top-level README.md 2018-12-20
Damien Le Moal   docs: README.md update 2019-01-23
OpenSBI source code is also well documented. For source level documentation,
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
doxygen style is used. Please refer to the [Doxygen manual] for details on this
Damien Le Moal   README: Update 2018-12-25
format.
Anup Patel   top: More detailed top-level README.md 2018-12-20
Damien Le Moal   docs: README.md update 2019-01-23
Doxygen can be installed on Linux distributions using *.deb* packages usingthe following command.
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
```sudo apt-get install doxygen doxygen-latex doxygen-doc doxygen-gui graphviz```
Damien Le Moal   docs: README.md update 2019-01-23
For *.rpm* based Linux distributions, the following commands can be used.```sudo yum install doxygen doxygen-latex doxywizard graphviz```or```sudo yum install doxygen doxygen-latex doxywizard graphviz```To build a consolidated *refman.pdf* of all documentation, run:
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
```make docs
Damien Le Moal   docs: README.md update 2019-01-23
```
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
or
Damien Le Moal   docs: README.md update 2019-01-23
```
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
make O=<build_directory> docs```
Damien Le Moal   docs: README.md update 2019-01-23
the resulting *refman.pdf* will be available under the directory*<build_directory>/docs/latex*. To install this file, run:
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
```make install_docs
Damien Le Moal   docs: README.md update 2019-01-23
```
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
or
Damien Le Moal   docs: README.md update 2019-01-23
```
Anup Patel   top: Update top-level README.md to build/install documentation PDF 2019-01-14
make I=<install_directory> install_docs```
Damien Le Moal   docs: README.md update 2019-01-23
*refman.pdf* will be installed under *<install_directory>/docs*.[Github]: https://github.com/riscv/riscv-sbi-doc
Damien Le Moal   top: README.md updates 2019-02-07
[U-Boot]: https://www.denx.de/wiki/U-Boot/SourceCode
Tobias Klauser   README.md: fix markdown link formatting 2020-07-01
[Bootlin toolchain repository]: https://toolchains.bootlin.com/
Damien Le Moal   docs: README.md update 2019-01-23
[COPYING.BSD]: COPYING.BSD[SPDX]: http://spdx.org/licenses/[Contribution Guideline]: docs/contributing.md
Anup Pate   top: Add CONTRIBUTORS.md file 2019-04-15
[Contributors List]: CONTRIBUTORS.md
Damien Le Moal   docs: README.md update 2019-01-23
[Library Usage]: docs/library_usage.md
Anup Patel   docs: Add platform requirements document 2020-05-05
[Platform Requirements]: docs/platform_requirements.md
Damien Le Moal   top: README.md updates 2019-02-07
[Platform Support Guide]: docs/platform_guide.md
Damien Le Moal   docs: README.md update 2019-01-23
[Platform Documentation]: docs/platform/platform.md[Firmware Documentation]: docs/firmware/fw.md
Anup Patel   docs: Add initial documentation for domain support 2020-09-24
[Domain Support]: docs/domain_support.md
Karsten Merker   docs: miscellaneous documentation fixes and updates 2019-05-05
[Doxygen manual]: http://www.doxygen.nl/manual/index.html[Kendryte standalone SDK]: https://github.com/kendryte/kendryte-standalone-sdk
Damien Le Moal   README: Update license information 2019-04-02
[third party notices]: ThirdPartyNotices.md
C
1
https://gitee.com/mirrors/OpenSBI.git
git@gitee.com:mirrors/OpenSBI.git
mirrors
OpenSBI
OpenSBI
master

Search

132457 8cb2edc1 1899542 131848 70c8d3a4 1899542