Skip to content
Merged
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
9 changes: 3 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module(
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "pigweed")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_rust", version = "0.68.1")
bazel_dep(name = "rules_rust_mdbook", version = "0.68.1")
bazel_dep(name = "rules_rust", version = "0.70.0")
bazel_dep(name = "rules_rust_mdbook", version = "0.70.0")
bazel_dep(name = "rules_platform", version = "0.1.0")
bazel_dep(name = "rules_python", version = "1.8.3")
bazel_dep(name = "ureg")
Expand All @@ -22,15 +22,12 @@ local_path_override(

git_override(
module_name = "pigweed",
commit = "67563b40f2c19aec4f899afd13c00e48baf790b2",
commit = "7882c537d21171b0e9641a132842a373382a78c3",
patch_args = ["-p1"],
patches = [
"//third_party/pigweed:veer_pic_generic_type.patch",
# Allow integration_tests to build for armv7-m / armv7e-m so the
# AST10x0 unittest_runner can use it.
"//third_party/pigweed:integration_tests_armv7m.patch",
Comment thread
rusty1968 marked this conversation as resolved.
# Fix lost-wakeup race in ipc/user test USER signal round-trip.
"//third_party/pigweed:ipc_user_signal_race.patch",
],
remote = "https://pigweed.googlesource.com/pigweed/pigweed",
)
Expand Down
1,059 changes: 476 additions & 583 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions target/ast10x0/harness/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ py_binary(
name = "qemu_runner_bin",
srcs = ["qemu_runner.py"],
main = "qemu_runner.py",
# @@pigweed++_repo_rules5+qemu is the canonical label for the qemu repo
# created by pigweed's cipd_repository use_repo_rule (not directly
# visible as @qemu from our module). If this breaks after a pigweed
# upgrade, run: ls $(bazel info output_base)/external/ | grep qemu
# @@pigweed++cipd+pigweed.qemu is the canonical label for the qemu repo
# created by pigweed's cipd module extension. If this breaks after a
# pigweed upgrade, run: bazel mod dump_repo_mapping "pigweed+" | grep qemu
deps = [
"@@pigweed++_repo_rules5+qemu//:qemu-system-arm-runfiles",
"@@pigweed++cipd+pigweed.qemu//:qemu-system-arm-runfiles",
"@pigweed//pw_tokenizer/py:detokenize",
"@rules_python//python/runfiles",
],
Expand Down
2 changes: 1 addition & 1 deletion target/ast10x0/tests/interrupts/kernel/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl TargetInterface for Target {
const NAME: &'static str = "AST10x0 Kernel Interrupts";

fn main() -> ! {
let sentinel: &[u8] = match test_interrupts::main::<Arch>(TEST_IRQ) {
let sentinel: &[u8] = match test_interrupts::main::<Arch>(Arch, TEST_IRQ) {
Ok(()) => b"TEST_RESULT:PASS\n",
Err(_e) => b"TEST_RESULT:FAIL\n",
};
Expand Down
4 changes: 1 addition & 3 deletions target/ast10x0/tests/usart/client2_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use userspace::entry;
use userspace::syscall;

#[entry]
fn entry() -> ! {
fn entry() {
let client = UsartClient::new(handle::USART);

match client.configure(1_500_000) {
Expand All @@ -23,8 +23,6 @@ fn entry() -> ! {
Err(_) => pw_log::error!("USART client2 write failed"),
}

// End the test only after client2 has executed, proving multi-client app
// startup and request handling against the same server endpoint.
let _ = syscall::debug_shutdown(Ok(()));
loop {}
}
Expand Down
2 changes: 1 addition & 1 deletion target/ast10x0/tests/usart/client_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use userspace::entry;
use userspace::time::Instant;

#[entry]
fn entry() -> ! {
fn entry() {
let client = UsartClient::new(handle::USART);

match client.configure(1_500_000) {
Expand Down
2 changes: 1 addition & 1 deletion target/ast10x0/tests/usart/server_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use userspace::entry;
use userspace::syscall::{self, Signals};

#[entry]
fn entry() -> ! {
fn entry() {
let mut backend = Backend::new();

let _ = syscall::wait_group_add(
Expand Down
6 changes: 2 additions & 4 deletions target/earlgrey/syscall_latency/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,9 @@ fn measure_nop_syscall(rv_timer: &RvTimer, n: usize) -> Result<()> {
}

#[entry]
fn entry() -> ! {
fn entry() -> Result<()> {
let rv_timer = unsafe { RvTimer::new() };
let result = measure_nop_syscall(&rv_timer, 100);
syscall::debug_shutdown(result).unwrap();
loop {}
measure_nop_syscall(&rv_timer, 100)
}

#[panic_handler]
Expand Down
7 changes: 3 additions & 4 deletions target/earlgrey/tests/drivers/gpio/test_gpio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use earlgrey_gpio::{EarlGreyGpio, EarlGreyPinConfig, GpioMask, GpioPin};
use earlgrey_pinmux::{Pad, Pull};
use openprot_hal_blocking::gpio_port::{GpioPort, PinMask};
use pw_status::Result;
use userspace::{entry, syscall};
use userspace::entry;

fn test_gpio_basic() -> Result<()> {
let mut gpio = unsafe { EarlGreyGpio::new() };
Expand Down Expand Up @@ -71,7 +71,7 @@ fn test_gpio_basic() -> Result<()> {
}

#[entry]
fn entry() -> ! {
fn entry() -> Result<()> {
pw_log::info!("🔄 RUNNING GPIO SMOKE TEST");
let ret = test_gpio_basic();

Expand All @@ -81,8 +81,7 @@ fn entry() -> ! {
pw_log::info!("✅ PASS");
}

let _ = syscall::debug_shutdown(ret);
loop {}
ret
}

#[panic_handler]
Expand Down
7 changes: 2 additions & 5 deletions target/earlgrey/tests/uart/test_uart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,17 @@ fn test_uart_interrupts() -> Result<()> {
}

#[entry]
fn entry() -> ! {
fn entry() -> Result<()> {
pw_log::info!("🔄 RUNNING");
let ret = test_uart_interrupts();

// Log that an error occurred so that the app that caused the shutdown is logged.
if ret.is_err() {
pw_log::error!("❌ FAILED: {}", ret.status_code() as u32);
} else {
pw_log::info!("✅ PASSED");
}

// Since this is written as a test, shut down with the return status from `main()`.
let _ = syscall::debug_shutdown(ret);
loop {}
ret
}

#[panic_handler]
Expand Down
7 changes: 2 additions & 5 deletions target/earlgrey/tests/uart/test_uart_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,8 @@ fn wait_for_interrupts() -> Result<()> {
}

#[entry]
fn entry() -> ! {
// Since this is written as a test, shut down with the return status from `main()`.
let ret = wait_for_interrupts();
let _ = syscall::debug_shutdown(ret);
loop {}
fn entry() -> Result<()> {
wait_for_interrupts()
}

#[panic_handler]
Expand Down
6 changes: 2 additions & 4 deletions target/veer/syscall_latency/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ fn measure_nop_syscall(n: usize) -> Result<()> {
}

#[entry]
fn entry() -> ! {
let result = measure_nop_syscall(100);
syscall::debug_shutdown(result).unwrap();
loop {}
fn entry() -> Result<()> {
measure_nop_syscall(100)
}

#[panic_handler]
Expand Down
14 changes: 0 additions & 14 deletions third_party/pigweed/ipc_user_signal_race.patch

This file was deleted.

11 changes: 0 additions & 11 deletions third_party/pigweed/veer_pic_generic_type.patch

This file was deleted.