Tobias Wölfel | 03d1cf3 | 2020-02-26 12:47:07 +0100 | [diff] [blame] | 1 | --- |
Miguel Osorio | 44882ad | 2022-07-21 20:04:39 -0700 | [diff] [blame] | 2 | title: "Software" |
Tobias Wölfel | 03d1cf3 | 2020-02-26 12:47:07 +0100 | [diff] [blame] | 3 | --- |
| 4 | |
| 5 | This is the landing spot for software documentation within the OpenTitan project. |
Tobias Wölfel | 03d1cf3 | 2020-02-26 12:47:07 +0100 | [diff] [blame] | 6 | More description and information can be found within the [Reference Manual]({{< relref "doc/rm" >}}) and [User Guide]({{< relref "doc/ug" >}}) areas. |
| 7 | |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 8 | There are three major parts to the OpenTitan software stack: |
Sam Elliott | b6745d3 | 2020-04-08 21:46:28 +0100 | [diff] [blame] | 9 | |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 10 | * The _device_ software, which runs on the primary core within the OpenTitan platform chip. |
| 11 | * The _otbn_ software, which runs on the OTBN cryptographic co-processor within the OpenTitan platform chip. |
| 12 | * The _host_ software, which is run on a host device and interacts with an OpenTitan device. |
Sam Elliott | b6745d3 | 2020-04-08 21:46:28 +0100 | [diff] [blame] | 13 | |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 14 | We use the term "image" to denote a complete, standalone executable which has been prepared for the OpenTitan platform chip. |
| 15 | This is to differentiate from a "library", which is a collection of functions that are not complete enough to run on their own. |
| 16 | |
| 17 | # Device Software |
| 18 | |
Dan McArdle | bd23a14 | 2022-09-07 11:19:20 -0400 | [diff] [blame] | 19 | This software runs on the primary core within the OpenTitan platform chip itself. |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 20 | You can find all the device software in the `sw/device` directory of the repository. |
| 21 | |
| 22 | The device software is split into two parts: |
| 23 | * The reference firmware images, which is the project's reference implementation of the Secure Boot system. |
| 24 | Not all OpenTitan chips will use exactly the same firmware images. |
| 25 | * The firmware libraries, which can be used by any software built for the device. |
| 26 | |
| 27 | Device software must be written in C, Assembly, or Rust. |
| 28 | |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 29 | # OTBN Software |
| 30 | |
| 31 | This software runs on the OTBN cryptographic co-processor within the OpenTitan platform chip. |
| 32 | You can find all the OTBN software in the `sw/otbn` directory of the repository. |
| 33 | |
| 34 | This software consists of a number of hand-written assembly routines which can be run on the OTBN co-processor. |
| 35 | |
| 36 | Normally, this software can not be run on its own, and the main processor has to set up the data and instructions for the OTBN co-processor before it triggers the start of execution. |
| 37 | |
| 38 | OTBN Software must only be written in Assembly. |
| 39 | |
| 40 | # Host Software |
| 41 | |
| 42 | This software is for host-side use, either in preparing images or interacting with a running OpenTitan platform chip. |
| 43 | You can find all the device software in the `sw/host` directory of the repository. |
| 44 | |
| 45 | Host software must be written in C++ or Rust. |
| 46 | |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 47 | # Other Documentation |
| 48 | |
| 49 | ## OpenTitan Software API Documentation {#sw-api-docs} |
Sam Elliott | b6745d3 | 2020-04-08 21:46:28 +0100 | [diff] [blame] | 50 | |
| 51 | The [OpenTitan Software API Documentation](/sw/apis/) contains automatically generated documentation for the public software APIs. |
| 52 | This includes the Device Interface Functions (DIFs). |
| 53 | |
| 54 | All DIFs are also documented on their respective [Hardware IP Specification]({{< relref "hw" >}}) |
| 55 | |
Miguel Osorio | 44882ad | 2022-07-21 20:04:39 -0700 | [diff] [blame] | 56 | ## Vendored in Code |
| 57 | |
| 58 | See [Vendor Tool User Guide]({{% relref "doc/ug/vendor_hw.md" %}}) |
Tobias Wölfel | a47a415 | 2020-06-02 20:35:28 +0200 | [diff] [blame] | 59 | |
| 60 | * [CoreMark](https://github.com/eembc/coremark) |
Tobias Wölfel | a47a415 | 2020-06-02 20:35:28 +0200 | [diff] [blame] | 61 | * [Cryptoc](https://chromium.googlesource.com/chromiumos/third_party/cryptoc/) |
Sam Elliott | ed5086c | 2020-11-24 19:12:09 +0000 | [diff] [blame] | 62 | * [LLVM's Compiler-RT Coverage Profiling Library](https://github.com/llvm/llvm-project/tree/master/compiler-rt) |