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
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust nightly
run: rustup toolchain install nightly-2026-06-13
run: rustup toolchain install nightly-2026-07-20
- name: Use Rust nightly
run: rustup default nightly-2026-06-13
run: rustup default nightly-2026-07-20
- name: Add Rust components
run: rustup component add rust-src llvm-tools-preview clippy rustfmt
- name: Add Rust targets
Expand Down
12 changes: 6 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// ],
// "rust-analyzer.check.overrideCommand": [
// "cargo",
// "+nightly-2026-06-13",
// "+nightly-2026-07-20",
// "check_no_std",
// "--target=targets/aarch64-kernel.json",
// ],
Expand All @@ -21,13 +21,13 @@
// For x86_64
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
"+nightly-2026-06-13",
"+nightly-2026-07-20",
"check_no_std",
"--target=targets/x86_64-kernel.json",
],
"rust-analyzer.check.overrideCommand": [
"cargo",
"+nightly-2026-06-13",
"+nightly-2026-07-20",
"check_no_std",
"--target=targets/x86_64-kernel.json",
],
Expand All @@ -37,19 +37,19 @@
// For Linux
// "rust-analyzer.cargo.buildScripts.overrideCommand": [
// "cargo",
// "+nightly-2026-06-13",
// "+nightly-2026-07-20",
// "check_std",
// "--quiet",
// "--message-format=json"
// ],
// "rust-analyzer.check.overrideCommand": [
// "cargo",
// "+nightly-2026-06-13",
// "+nightly-2026-07-20",
// "check_std",
// "--quiet",
// "--message-format=json"
// ],
// "rust-analyzer.cargo.features": [
// "std"
// ],
}
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ X86_64_LD=$(LINKERDIR)/x86_64-link.lds
RV32_LD=$(LINKERDIR)/rv32-link.lds
RV64_LD=$(LINKERDIR)/rv64-link.lds

RUSTV=nightly-2026-06-13
RUSTV=nightly-2026-07-20

all: aarch64 x86_64 riscv32 riscv64 std

Expand Down
15 changes: 5 additions & 10 deletions awkernel_drivers/src/pcie/intel/ixgbe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1831,21 +1831,16 @@ impl Ixgbe {

// Pluggable optics-related interrupt
if inner.is_sfp() {
let mod_mask;
let msf_mask;
if inner.info.get_id() == IXGBE_DEV_ID_X550EM_X_SFP {
mod_mask = IXGBE_EICR_GPI_SDP0_X540;
msf_mask = IXGBE_EICR_GPI_SDP1_X540;
let (mod_mask, msf_mask) = if inner.info.get_id() == IXGBE_DEV_ID_X550EM_X_SFP {
(IXGBE_EICR_GPI_SDP0_X540, IXGBE_EICR_GPI_SDP1_X540)
} else if inner.hw.mac.mac_type == MacType::IxgbeMacX540
|| inner.hw.mac.mac_type == MacType::IxgbeMacX550
|| inner.hw.mac.mac_type == MacType::IxgbeMacX550EMX
{
mod_mask = IXGBE_EICR_GPI_SDP2_X540;
msf_mask = IXGBE_EICR_GPI_SDP1_X540;
(IXGBE_EICR_GPI_SDP2_X540, IXGBE_EICR_GPI_SDP1_X540)
} else {
mod_mask = IXGBE_EICR_GPI_SDP2;
msf_mask = IXGBE_EICR_GPI_SDP1;
}
(IXGBE_EICR_GPI_SDP2, IXGBE_EICR_GPI_SDP1)
};
if reg_eicr & mod_mask != 0 {
// Clear the interrupt
ixgbe_hw::write_reg(&inner.info, IXGBE_EICR, mod_mask)?;
Expand Down
4 changes: 2 additions & 2 deletions awkernel_lib/src/arch/x86_64/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ fn cpu_x_wait_tx(msg: i64) {
#[inline(always)]
fn cpu_x_get_tx() -> i64 {
loop {
match CHANNEL_CPU0_TX.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |x| {
match CHANNEL_CPU0_TX.try_update(Ordering::Relaxed, Ordering::Relaxed, |x| {
if x != MSG_NULL {
Some(MSG_NULL)
} else {
Expand All @@ -362,7 +362,7 @@ fn cpu_x_get_tx() -> i64 {
#[inline(always)]
fn cpu_0_get_rx() -> i64 {
loop {
match CHANNEL_CPU0_RX.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |x| {
match CHANNEL_CPU0_RX.try_update(Ordering::Relaxed, Ordering::Relaxed, |x| {
if x != MSG_NULL {
Some(MSG_NULL)
} else {
Expand Down
2 changes: 1 addition & 1 deletion awkernel_lib/src/arch/x86_64/kvm/pvclock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub(crate) fn uptime_nano() -> Option<u64> {
return Some(ctr);
}

if let Err(prev) = PVCLOCK_LAST_COUNT.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |n| {
if let Err(prev) = PVCLOCK_LAST_COUNT.try_update(Ordering::Relaxed, Ordering::Relaxed, |n| {
if n < ctr {
Some(ctr)
} else {
Expand Down
6 changes: 2 additions & 4 deletions awkernel_lib/src/file/fatfs/dir_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use alloc::string::String;
use alloc::sync::Arc;
use bitflags::bitflags;
use core::char;
use core::convert::TryInto;
use core::fmt::{self, Debug};
#[cfg(not(feature = "unicode"))]
use core::iter;
Expand Down Expand Up @@ -417,9 +416,8 @@ impl DirEntryData {
};
// divide the name into order and LFN name_0
data.order = name[0];
for (dst, src) in data.name_0.iter_mut().zip(name[1..].chunks_exact(2)) {
// unwrap cannot panic because src has exactly 2 values
*dst = u16::from_le_bytes(src.try_into().unwrap());
for (dst, src) in data.name_0.iter_mut().zip(name[1..].as_chunks::<2>().0) {
*dst = u16::from_le_bytes(*src);
}

data.entry_type = rdr.read_u8()?;
Expand Down
2 changes: 1 addition & 1 deletion awkernel_lib/src/net/if_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ impl IfNet {
// If some task will poll, this task need not to poll.
if self
.will_poll
.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |n| {
.try_update(Ordering::Relaxed, Ordering::Relaxed, |n| {
if n > 0 {
None
} else {
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ RUN . /usr/local/cargo/env && \
cargo install mdbook-mermaid

RUN . /usr/local/cargo/env && \
rustup toolchain install nightly-2026-06-13 && \
rustup default nightly-2026-06-13 && \
rustup toolchain install nightly-2026-07-20 && \
rustup default nightly-2026-07-20 && \
rustup component add rust-src llvm-tools-preview && \
rustup target add x86_64-unknown-none aarch64-unknown-none riscv32imac-unknown-none-elf

Expand Down
9 changes: 4 additions & 5 deletions smoltcp/src/socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2237,14 +2237,13 @@ impl<'a> Socket<'a> {
// has expired, and we also have data in transmit buffer. Since any packet that occupies
// sequence space will elicit an ACK, we only need to send an explicit packet if we
// couldn't fill the sequence space with anything.
let is_keep_alive;
if self.timer.should_keep_alive(cx.now()) && repr.is_empty() {
let is_keep_alive = if self.timer.should_keep_alive(cx.now()) && repr.is_empty() {
repr.seq_number = repr.seq_number - 1;
repr.payload = b"\x00"; // RFC 1122 says we should do this
is_keep_alive = true;
true
} else {
is_keep_alive = false;
}
false
};

// Trace a summary of what will be sent.
if is_keep_alive {
Expand Down
Loading