blob: 03b5f28483936c1adbcab7e17dc5acf5f0111c7f [file] [log] [blame] [view]
Tobias Wölfel03d1cf32020-02-26 12:47:07 +01001---
Miguel Osorio44882ad2022-07-21 20:04:39 -07002title: "Software"
Tobias Wölfel03d1cf32020-02-26 12:47:07 +01003---
4
5This is the landing spot for software documentation within the OpenTitan project.
Tobias Wölfel03d1cf32020-02-26 12:47:07 +01006More description and information can be found within the [Reference Manual]({{< relref "doc/rm" >}}) and [User Guide]({{< relref "doc/ug" >}}) areas.
7
Sam Elliotted5086c2020-11-24 19:12:09 +00008There are three major parts to the OpenTitan software stack:
Sam Elliottb6745d32020-04-08 21:46:28 +01009
Sam Elliotted5086c2020-11-24 19:12:09 +000010* 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 Elliottb6745d32020-04-08 21:46:28 +010013
Sam Elliotted5086c2020-11-24 19:12:09 +000014We use the term "image" to denote a complete, standalone executable which has been prepared for the OpenTitan platform chip.
15This 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 McArdlebd23a142022-09-07 11:19:20 -040019This software runs on the primary core within the OpenTitan platform chip itself.
Sam Elliotted5086c2020-11-24 19:12:09 +000020You can find all the device software in the `sw/device` directory of the repository.
21
22The 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
27Device software must be written in C, Assembly, or Rust.
28
Sam Elliotted5086c2020-11-24 19:12:09 +000029# OTBN Software
30
31This software runs on the OTBN cryptographic co-processor within the OpenTitan platform chip.
32You can find all the OTBN software in the `sw/otbn` directory of the repository.
33
34This software consists of a number of hand-written assembly routines which can be run on the OTBN co-processor.
35
36Normally, 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
38OTBN Software must only be written in Assembly.
39
40# Host Software
41
42This software is for host-side use, either in preparing images or interacting with a running OpenTitan platform chip.
43You can find all the device software in the `sw/host` directory of the repository.
44
45Host software must be written in C++ or Rust.
46
Sam Elliotted5086c2020-11-24 19:12:09 +000047# Other Documentation
48
49## OpenTitan Software API Documentation {#sw-api-docs}
Sam Elliottb6745d32020-04-08 21:46:28 +010050
51The [OpenTitan Software API Documentation](/sw/apis/) contains automatically generated documentation for the public software APIs.
52This includes the Device Interface Functions (DIFs).
53
54All DIFs are also documented on their respective [Hardware IP Specification]({{< relref "hw" >}})
55
Miguel Osorio44882ad2022-07-21 20:04:39 -070056## Vendored in Code
57
58See [Vendor Tool User Guide]({{% relref "doc/ug/vendor_hw.md" %}})
Tobias Wölfela47a4152020-06-02 20:35:28 +020059
60* [CoreMark](https://github.com/eembc/coremark)
Tobias Wölfela47a4152020-06-02 20:35:28 +020061* [Cryptoc](https://chromium.googlesource.com/chromiumos/third_party/cryptoc/)
Sam Elliotted5086c2020-11-24 19:12:09 +000062* [LLVM's Compiler-RT Coverage Profiling Library](https://github.com/llvm/llvm-project/tree/master/compiler-rt)