|
22 | 22 | //! |
23 | 23 | //! - A `_sheap` symbol at whose address you can locate a heap. |
24 | 24 | //! |
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). |
26 | 27 | //! |
27 | 28 | //! ``` text |
28 | 29 | //! $ cargo new --bin app && cd $_ |
29 | 30 | //! |
30 | 31 | //! $ # add this crate as a dependency |
31 | 32 | //! $ edit Cargo.toml && cat $_ |
32 | 33 | //! [dependencies] |
33 | | -//! riscv-rt = "0.6.1" |
| 34 | +//! riscv-rt = "0.13.0" |
34 | 35 | //! panic-halt = "0.2.0" |
35 | 36 | //! |
36 | 37 | //! $ # memory layout of the device |
|
245 | 246 | //! |
246 | 247 | //! Default implementation of this function wakes hart 0 and busy-loops all the other harts. |
247 | 248 | //! |
| 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. |
248 | 251 | //! |
249 | 252 | //! ### Core exception handlers |
250 | 253 | //! |
|
358 | 361 | //! |
359 | 362 | //! Default implementation of this function stucks in a busy-loop. |
360 | 363 | //! |
361 | | -//! # Features |
| 364 | +//! # Cargo Features |
362 | 365 | //! |
363 | 366 | //! ## `single-hart` |
364 | 367 | //! |
365 | 368 | //! 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. |
366 | 370 | //! |
367 | 371 | //! ## `s-mode` |
368 | 372 | //! |
|
373 | 377 | //! [dependencies] |
374 | 378 | //! riscv-rt = {features=["s-mode"]} |
375 | 379 | //! ``` |
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 |
379 | 381 | //! both `mcause` and `scause`, the `mhartid` hardware thread register is not available in supervisor |
380 | 382 | //! mode. Instead, the hartid is passed as parameter by a bootstrapping firmware (i.e., SBI). |
381 | 383 | //! |
|
0 commit comments