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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2025-10-28
RUST_TOOLCHAIN: nightly-2025-01-18

QEMU_VERSION: qemu-9.2.1
QEMU_BUILD_PATH: ${{ github.workspace }}/qemu-build-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: 安装 Rust 工具链
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2025-10-28
toolchain: nightly-2025-01-18
targets: riscv64gc-unknown-none-elf
components: rust-src, rustfmt, clippy

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mirror-to-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Rust toolchain (for cargo vendor)
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2025-10-28
toolchain: nightly-2025-01-18

- name: Prepare mirror commit (vendor + README swap)
env:
Expand Down
2 changes: 1 addition & 1 deletion os/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2025-10-28"
channel = "nightly-2025-01-18"
3 changes: 3 additions & 0 deletions os/src/arch/loongarch/boot/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ boot_stack_lower_bound:
.space 4096 * 48 # 48 页 = 192KB 启动栈
.globl boot_stack_top
boot_stack_top:

# 切回 .text:与 riscv entry.S 同理,避免 global_asm! 拼接时后续代码块继承本 .bss 段。
.section .text
7 changes: 6 additions & 1 deletion os/src/arch/riscv/boot/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,9 @@ secondary_sbi_entry:
secondary_stacks_bottom:
.space 65536 * 8 # 8 核 × 64KB
.globl secondary_stacks_top
secondary_stacks_top:
secondary_stacks_top:

# 切回 .text:本文件经 global_asm! 与 switch.S 等纯代码 .S 拼接为同一汇编单元,
# 若停在 .bss.secondary_stack(NOBITS)结束,后续代码块会继承该段,触发
# "SHT_NOBITS section cannot have instructions"(旧版 LLVM 严格报错)。
.section .text
15 changes: 6 additions & 9 deletions os/src/kernel/syscall/fs/stat_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,12 @@ pub fn getdents64(fd: usize, dirp: *mut u8, count: usize) -> isize {

// 写入 dirent 头部
unsafe {
write_to_user(
dirp.add(written) as *mut LinuxDirent64,
LinuxDirent64 {
d_ino: entry.inode_no as u64,
d_off: current_off,
d_reclen: dirent_len as u16,
d_type: inode_type_to_d_type(entry.inode_type),
},
);
write_to_user(dirp.add(written) as *mut LinuxDirent64, LinuxDirent64 {
d_ino: entry.inode_no as u64,
d_off: current_off,
d_reclen: dirent_len as u16,
d_type: inode_type_to_d_type(entry.inode_type),
});
}

// 写入文件名到 d_name 字段(从 LinuxDirent64 offset 19 开始)
Expand Down
6 changes: 6 additions & 0 deletions os/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
#![no_std]
#![no_main]
#![feature(custom_test_frameworks)]
// 下列特性在 nightly-2025-10-28 已稳定,但本项目固定的 nightly-2025-01-18
// (1.86-nightly,与评测机/参考项目 SanktaOS 对齐) 仍需显式开启。
#![feature(let_chains)]
#![feature(trait_upcasting)]
#![feature(unsigned_is_multiple_of)]
#![feature(ip_from)]
#![test_runner(test_runner)]
#![reexport_test_harness_main = "test_main"]

Expand Down
11 changes: 4 additions & 7 deletions os/src/net/stack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,10 @@ impl NetworkStack {
sockets.remove(h);
return Err(NetworkError::AddressInUse);
}
ports.insert(
port,
UdpPortEntry {
handle: h,
sockets: alloc::vec::Vec::new(),
},
);
ports.insert(port, UdpPortEntry {
handle: h,
sockets: alloc::vec::Vec::new(),
});
h
}
};
Expand Down
Loading