Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ci / cd pipeline in multicore #254

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 0 additions & 57 deletions config/test/qemu-rustsbi-test-kernel-spike.toml

This file was deleted.

2 changes: 1 addition & 1 deletion config/test/qemu-virt-benchmark.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ color = true
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8

[benchmark]
enable = true
Expand Down
57 changes: 0 additions & 57 deletions config/test/qemu-virt-hello-world-payload-spike.toml

This file was deleted.

2 changes: 1 addition & 1 deletion config/test/qemu-virt-hello-world-payload.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ max_firmware_exits = 2000
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8

[benchmark]
enable = false
Expand Down
2 changes: 1 addition & 1 deletion config/test/qemu-virt-release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ max_firmware_exits = 2000
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8

[benchmark]
enable = false
Expand Down
23 changes: 0 additions & 23 deletions config/test/qemu-virt-sifive-u54-spike.toml

This file was deleted.

2 changes: 1 addition & 1 deletion config/test/qemu-virt-sifive-u54.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ color = true
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8
boot_hart_id = 0

[benchmark]
Expand Down
2 changes: 1 addition & 1 deletion config/test/qemu-virt-test-payload-lock.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ color = true
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8
boot_hart_id = 0

[benchmark]
Expand Down
2 changes: 1 addition & 1 deletion config/test/qemu-virt-test-protect-payload.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ color = true
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8

[benchmark]
enable = false
Expand Down
2 changes: 1 addition & 1 deletion config/test/qemu-virt-u-boot-payload.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ max_firmware_exits = 2000
max_pmp = 8

[platform]
nb_harts = 1
nb_harts = 8

[benchmark]
enable = false
Expand Down
3 changes: 2 additions & 1 deletion crates/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ license = "MIT"
[dependencies]
miralis_core = { path = "../core" }
log = { workspace = true }
config_helpers = { path = "../config_helpers"}
config_helpers = { path = "../config_helpers"}
spin = "0.9.8"
13 changes: 9 additions & 4 deletions crates/abi/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use core::fmt::Write;

use log::{LevelFilter, Metadata, Record};
use spin::Once;

use crate::miralis_log;

Expand Down Expand Up @@ -34,14 +35,18 @@ impl log::Log for Logger {
fn flush(&self) {}
}

static LOGGER_INIT: Once = Once::new();

/// Initialize the firmware logger
///
/// This function is called automatically by `setup_binary!`.
pub fn init() {
static LOGGER: Logger = Logger {};

log::set_logger(&LOGGER).unwrap();
log::set_max_level(LevelFilter::Trace);
LOGGER_INIT.call_once(|| {
if let Err(err) = log::set_logger(&Logger {}) {
panic!("Failed to set logger: {}", err);
}
log::set_max_level(LevelFilter::Trace);
});
}

// —————————————————————————————— Stack Buffer —————————————————————————————— //
Expand Down
9 changes: 3 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config := "config.toml"
benchmark := "ecall_benchmark"
spike := "./config/spike.toml"
qemu_virt := "./config/test/qemu-virt.toml"
qemu_virt_multicore := "./config/test/qemu-virt-multicore.toml"
qemu_virt_protect_payload := "./config/test/qemu-virt-test-payload-lock.toml"
qemu_virt_2harts := "./config/test/qemu-virt.toml"
qemu_virt_benchmark := "./config/test/qemu-virt-benchmark.toml"
Expand All @@ -11,12 +12,9 @@ spike_latency_benchmark := "./config/test/spike-latency-benchmark.toml"
qemu_virt_release := "./config/test/qemu-virt-release.toml"
qemu_virt_hello_world_payload := "./config/test/qemu-virt-hello-world-payload.toml"
qemu_virt_test_protect_paylod := "./config/test/qemu-virt-test-protect-payload.toml"
qemu_virt_hello_world_payload_spike := "./config/test/qemu-virt-hello-world-payload-spike.toml"
qemu_virt_u_boot_payload := "./config/test/qemu-virt-u-boot-payload.toml"
qemu_virt_sifive_u54 := "./config/test/qemu-virt-sifive-u54.toml"
qemu_virt_sifive_u54_spike := "./config/test/qemu-virt-sifive-u54-spike.toml"
qemu_virt_rustsbi_test_kernel := "./config/test/qemu-rustsbi-test-kernel.toml"
qemu_virt_rustsbi_test_kernel_spike := "./config/test/qemu-rustsbi-test-kernel-spike.toml"
benchmark_folder := "./benchmark-out"
default_iterations := "1"

Expand Down Expand Up @@ -55,7 +53,6 @@ test:
cargo run -- run --config {{qemu_virt}} --firmware mret
cargo run -- run --config {{qemu_virt}} --firmware os_ctx_switch
cargo run -- run --config {{qemu_virt}} --firmware sandbox
cargo run -- run --config {{qemu_virt}} --firmware interrupt
cargo run -- run --config {{qemu_virt}} --firmware os_ecall
cargo run -- run --config {{qemu_virt}} --firmware vectored_mtvec
cargo run -- run --config {{qemu_virt}} --firmware device
Expand All @@ -66,8 +63,8 @@ test:
cargo run -- run --config {{qemu_virt}} --firmware miralis

# Testing with external projects
cargo run -- run --config {{qemu_virt}} --firmware opensbi
cargo run -- run --config {{qemu_virt}} --firmware zephyr --max-exits 1000000
cargo run -- run --config {{qemu_virt_multicore}} --firmware opensbi
cargo run -- run --config {{qemu_virt_multicore}} --firmware zephyr --max-exits 1000000
cargo run -- run --config {{qemu_virt_sifive_u54}} --firmware linux
cargo run -- run --config {{qemu_virt_rustsbi_test_kernel}} --firmware rustsbi-qemu

Expand Down
2 changes: 1 addition & 1 deletion src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ path = "main.rs"

[dependencies]
uart_16550 = "0.3.0"
spin = "0.5.2"
spin = "0.9.8"
log = { workspace = true }
miralis_core = { path = "../crates/core" }
miralis_abi = { path = "../crates/abi" }
Expand Down
Loading