Skip to content

Commit

Permalink
Revise device tree documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BuJo committed Oct 3, 2023
1 parent 6a5930b commit fcfd811
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ This project aims to provide a learning platform for RISC-V and Rust.

```mermaid
flowchart LR
hart[HART] --> bus[bus]
hart[HART] --> bus{bus}
bus --> rom(ROM)
bus --> ram(RAM)
ram --> dt(DTB)
bus --> rtc(RTC)
hart --> csr(CSR)
hart -->|SBI| see[SEE]
see -..-> hart
```

* `RAM` is shared between one or more `hart`s via the bus
* `ROM` is shared between one or more `hart`s via the bus
* `RTC` is memory mapped and reachable from the bus
* `SEE` is global
* `CSR`s are per `hart` (or per core)
Expand All @@ -32,6 +35,9 @@ flowchart LR
| EEI | Execution Environment Interface |
| ABI | Application Binary Interface |
| RTC | Real Time Clock |
| DTS | Device Tree Source |
| FTD | Flattened Device Tree |
| DTB | Device Tree Blob |

## Development

Expand Down Expand Up @@ -104,3 +110,4 @@ limitations under the License.
* [example DTS for the HiFive Unleashed](https://github.com/riscv-non-isa/riscv-device-tree-doc/blob/master/examples/sifive-hifive_unleashed-microsemi.dts)
* [Device Node Requirements](https://devicetree-specification.readthedocs.io/en/latest/chapter3-devicenodes.html)
* [Device Tree Usage](https://elinux.org/Device_Tree_Usage)
* [Introduction to Device Trees](https://www.nxp.com/docs/en/application-note/AN5125.pdf)
File renamed without changes.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod bus;
mod csr;
mod dts;
mod dt;
mod hart;
mod ram;
mod rom;
Expand All @@ -22,7 +22,7 @@ fn main() {
let threads = args.get(1).and_then(|x| x.parse::<u32>().ok()).unwrap_or(1);

let text = fs::read("target/target.text").expect("no .text");
let dtb = dts::load();
let dtb = dt::load();

let rom = Rom::new(text);
let ram = Ram::new();
Expand Down

0 comments on commit fcfd811

Please sign in to comment.