path: root/user/bsps/bsps-riscv.rst
diff options
authorSebastian Huber <>2018-08-02 13:21:25 +0200
committerSebastian Huber <>2018-08-02 13:21:25 +0200
commit24326a8d07ffa386e058c10b559aedbd02b29795 (patch)
treef6f2f7a3e3ce517a5e9fd8304d17fd7e8848ee20 /user/bsps/bsps-riscv.rst
parentcpu-supplement: Add RISC-V chapter (diff)
user: Add RISC-V BSP section
Update #3433.
Diffstat (limited to 'user/bsps/bsps-riscv.rst')
1 files changed, 109 insertions, 1 deletions
diff --git a/user/bsps/bsps-riscv.rst b/user/bsps/bsps-riscv.rst
index 5767a20..cda676f 100644
--- a/user/bsps/bsps-riscv.rst
+++ b/user/bsps/bsps-riscv.rst
@@ -4,4 +4,112 @@
riscv (RISC-V)
+This BSP offers 13 variants:
+* rv32i
+* rv32iac
+* rv32im
+* rv32imac
+* rv32imafc
+* rv32imafd
+* rv32imafdc
+* rv64imac
+* rv64imac_medany
+* rv64imafd
+* rv64imafd_medany
+* rv64imafdc
+* rv64imafdc_medany
+Each variant corresponds to a GCC multilib. A particular variant reflects an
+ISA with ABI and code model choice.
+The basic hardware initialization is not performed by the BSP. A boot loader
+with device tree support must be used to start the BSP, e.g. BBL. The BSP must
+be started im machine mode.
+The reference platform for this BSP is the Qemu `virt` machine.
+Build Configuration Options
+The following options are available at the configure command line.
+ If defined to a non-zero value, then print a message and wait until pressed
+ before resetting board when application terminates.
+ If defined to a non-zero value, then reset the board when the application
+ terminates.
+ If defined to a non-zero value, then print the exception context when an
+ unexpected exception occurs.
+ The maximum size of the device tree blob in bytes (default is 65536).
+ The default baud for console driver devices (default 115200).
+ The maximum number of external interrupts supported by the BSP (default
+ 64).
+ Enables the HTIF support if defined to a non-zero value, otherwise it is
+ disabled (disabled by default).
+ The maximum number of NS16550 devices supported by the console driver (2
+ by default).
+ The begin of the RAM region for linker command file (default is 0x70000000
+ for 64-bit with -mcmodel=medlow and 0x80000000 for all other).
+ The size of the RAM region for linker command file (default 64MiB).
+Interrupt Controller
+Exactly one Core Local Interruptor (CLINT) and exactly one Platform-Level
+Interrupt Controller (PLIC) are supported. The maximum number of external
+interrupts supported by the BSP is defined by the
+Clock Driver
+The clock driver uses the CLINT timer.
+Console Driver
+The console driver supports devices compatible to
+* "ucb,htif0" (depending on the ``RISCV_ENABLE_HTIF_SUPPORT`` BSP option),
+* "ns16550a" (see ``RISCV_CONSOLE_MAX_NS16550_DEVICES`` BSP option), and
+* "ns16750" (see ``RISCV_CONSOLE_MAX_NS16550_DEVICES`` BSP option).
+They are initialized according to the device tree. The console driver does not
+configure the pins or peripheral clocks. The console device is selected
+according to the device tree "/chosen/stdout-path" property value.