docs: Add platform requirements document
[platform/kernel/opensbi.git] / docs / platform_requirements.md
1 OpenSBI Platform Requirements
2 =============================
3
4 The RISC-V platform requirements for OpenSBI can change over time
5 with advances in RISC-V specifications and ecosystem.
6
7 To handle this, we have two types of RISC-V platform requirements:
8
9 1. **Base platform requirements** which apply to all OpenSBI releases
10 2. **Release specific platform requirements** which apply to a OpenSBI
11    release and later releases
12
13 Currently, we don't have any **Release specific platform requirements**
14 but such platform requirements will be added in future.
15
16 Base Platform Requirements
17 --------------------------
18
19 The base RISC-V platform requirements for OpenSBI are as follows:
20
21 1. At least rv32ima or rv64ima required on all HARTs
22 2. At least one HART should have S-mode support because:
23
24      * SBI calls are meant for RISC-V S-mode (Supervisor mode)
25      * OpenSBI implements SBI calls for S-mode software
26
27 3. The MTVEC CSR on all HARTs must support direct mode
28 4. The PMP CSRs are optional. If PMP CSRs are not implemented then
29    OpenSBI cannot protect M-mode firmware and secured memory regions
30 5. The TIME CSR is optional. If TIME CSR is not implemented in
31    hardware then a 64-bit MMIO counter is required to track time
32    and emulate TIME CSR
33 6. Hardware support for injecting M-mode software interrupts on
34    a multi-HART platform
35
36 The RISC-V extensions not covered by rv32ima or rv64ima are optional
37 for OpenSBI. Although, OpenSBI will detect and handle some of these
38 optional RISC-V extensions at runtime.
39
40 The optional RISC-V extensions handled by OpenSBI at runtime are:
41
42 * D-extension: Double precision floating point
43 * F-extension: Single precision floating point
44 * H-extension: Hypervisor