Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit e121644

Browse files
committed
feat(prototyper): add bl808 support
1 parent 1c4f916 commit e121644

File tree

8 files changed

+276
-78
lines changed

8 files changed

+276
-78
lines changed

Cargo.lock

+172-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prototyper/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fast-trap = { version = "0.0.1", features = ["riscv-m"] }
2626
serde-device-tree = { git = "https://github.com/rustsbi/serde-device-tree", default-features = false }
2727
uart_xilinx = { git = "https://github.com/duskmoon314/uart-rs/" }
2828
xuantie-riscv = { git= "https://github.com/rustsbi/xuantie" }
29+
bouffalo-hal = { git = "https://github.com/rustsbi/bouffalo-hal", rev = "968b949", features = ["bl808"] }
2930

3031
[[bin]]
3132
name = "rustsbi-prototyper"

prototyper/src/cfg.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
/// The address where the SBI link start.
2+
pub const SBI_LINK_START_ADDRESS: usize = 0x80000000;
13
/// Maximum number of supported harts.
24
pub const NUM_HART_MAX: usize = 8;
35
/// Stack size per hart (hardware thread) in bytes.
46
pub const LEN_STACK_PER_HART: usize = 16 * 1024;
5-
/// Heap Size of SBI firmware
7+
/// Heap Size of SBI firmware.
68
pub const HEAP_SIZE: usize = 32 * 1024;
7-
/// Page size
9+
/// Platform page size.
810
pub const PAGE_SIZE: usize = 4096;
911
/// TLB_FLUSH_LIMIT defines the TLB refresh range limit.
1012
/// If the TLB refresh range is greater than TLB_FLUSH_LIMIT, the entire TLB is refreshed.
1113
pub const TLB_FLUSH_LIMIT: usize = 4 * PAGE_SIZE;
1214

1315
#[cfg(feature = "jump")]
14-
pub const JUMP_ADDRESS: usize = 0x80200000;
16+
pub const JUMP_ADDRESS: usize = 0x50000000;

prototyper/src/devicetree.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,12 @@ use core::ops::Range;
1111
pub struct Tree<'a> {
1212
/// Optional model name string.
1313
pub model: Option<StrSeq<'a>>,
14-
/// Chosen node containing boot parameters.
15-
pub chosen: Chosen<'a>,
1614
/// Memory information.
17-
pub memory: NodeSeq<'a>,
15+
pub memory: Node<'a>,
1816
/// CPU information.
1917
pub cpus: Cpus<'a>,
2018
}
2119

22-
/// Chosen node containing boot parameters.
23-
#[derive(Deserialize)]
24-
#[serde(rename_all = "kebab-case")]
25-
pub struct Chosen<'a> {
26-
/// Path to stdout device.
27-
pub stdout_path: StrSeq<'a>,
28-
}
29-
3020
/// CPU information container.
3121
#[derive(Deserialize)]
3222
#[serde(rename_all = "kebab-case")]

0 commit comments

Comments
 (0)