Skip to content

Commit 09e1b14

Browse files
committed
update the docs
1 parent afddf09 commit 09e1b14

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

riscv-rt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "riscv-rt"
3-
version = "0.12.2"
3+
version = "0.13.0"
44
rust-version = "1.60"
55
repository = "https://github.com/rust-embedded/riscv"
66
authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]

riscv-rt/src/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
//!
2323
//! - A `_sheap` symbol at whose address you can locate a heap.
2424
//!
25-
//! - Support for a runtime in supervisor mode, that can be bootstrapped via [Supervisor Binary Interface (SBI)](https://github.com/riscv-non-isa/riscv-sbi-doc)
25+
//! - Support for a runtime in supervisor mode, that can be bootstrapped via
26+
//! [Supervisor Binary Interface (SBI)](https://github.com/riscv-non-isa/riscv-sbi-doc).
2627
//!
2728
//! ``` text
2829
//! $ cargo new --bin app && cd $_
2930
//!
3031
//! $ # add this crate as a dependency
3132
//! $ edit Cargo.toml && cat $_
3233
//! [dependencies]
33-
//! riscv-rt = "0.6.1"
34+
//! riscv-rt = "0.13.0"
3435
//! panic-halt = "0.2.0"
3536
//!
3637
//! $ # memory layout of the device
@@ -245,6 +246,8 @@
245246
//!
246247
//! Default implementation of this function wakes hart 0 and busy-loops all the other harts.
247248
//!
249+
//! `_mp_hook` is only necessary in multi-core targets. If the `single-hart` feature is enabled,
250+
//! `_mp_hook` is not called, as it is assumed that there is only one hart on the target.
248251
//!
249252
//! ### Core exception handlers
250253
//!
@@ -358,11 +361,12 @@
358361
//!
359362
//! Default implementation of this function stucks in a busy-loop.
360363
//!
361-
//! # Features
364+
//! # Cargo Features
362365
//!
363366
//! ## `single-hart`
364367
//!
365368
//! This feature saves a little code size if there is only one hart on the target.
369+
//! If the `single-hart` feature is enabled, `_mp_hook` is not called.
366370
//!
367371
//! ## `s-mode`
368372
//!
@@ -373,9 +377,7 @@
373377
//! [dependencies]
374378
//! riscv-rt = {features=["s-mode"]}
375379
//! ```
376-
//! Internally, riscv-rt uses different versions of precompiled static libraries
377-
//! for (i) machine mode and (ii) supervisor mode. If the `s-mode` feature was activated,
378-
//! the build script selects the s-mode library. While most registers/instructions have variants for
380+
//! While most registers/instructions have variants for
379381
//! both `mcause` and `scause`, the `mhartid` hardware thread register is not available in supervisor
380382
//! mode. Instead, the hartid is passed as parameter by a bootstrapping firmware (i.e., SBI).
381383
//!

0 commit comments

Comments
 (0)