Skip to content

feat(riscv platform vf2): vf2 platform adapted to riscv architecture#1285

Merged
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
JensenWei007:rv
Oct 26, 2025
Merged

feat(riscv platform vf2): vf2 platform adapted to riscv architecture#1285
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
JensenWei007:rv

Conversation

@JensenWei007
Copy link
Contributor

  • Add necessary platform driver support
  • Modify some startup processes and assert
  • Fixed some issues

@fslongjin
Copy link
Member

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bug: Kernel Stack Initialization Mismatch

The init_idle function assumes processor 0 is the Boot Strap Processor (BSP) for kernel stack initialization. This conflicts with the removed assertion and the TODO comment noting that the boot hart might not be 0 on platforms like riscv-vf2. This mismatch can lead to incorrect kernel stack setup for the actual BSP and processor 0, potentially causing system instability.

kernel/src/process/idle.rs#L38-L46

for i in 0..PerCpu::MAX_CPU_NUM {
let kstack = if unlikely(i == 0) {
let stack_ptr =
VirtAddr::new(Self::stack_ptr().data() & (!(KernelStack::ALIGN - 1)));
// 初始化bsp的idle进程
let mut ks = unsafe { KernelStack::from_existed(stack_ptr) }
.expect("Failed to create kernel stack struct for BSP.");
unsafe { ks.clear_pcb(true) };
ks

Fix in Cursor Fix in Web


if cmd.data_expected() {
let buffer = // TODO: dirty
buffer.unwrap_or(unsafe { core::slice::from_raw_parts_mut(core::ptr::NonNull::dangling().as_ptr(), 64) });
assert!(buffer_offset == 0);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Invalid Memory Access in send_cmd Function

The send_cmd function creates a mutable slice from a dangling pointer when the buffer argument is None. This results in a 64-element slice pointing to invalid memory, which is then accessed during data transfers. This leads to undefined behavior, potential memory corruption, and system instability. This also bypasses the debug_assert on line 404 when data is expected.

Fix in Cursor Fix in Web

assert!(buf.len() == BLOCK_SIZE);

#[allow(mutable_transmutes)]
let buf = unsafe { core::mem::transmute(buf) };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unsafe Transmute Violates Rust Memory Safety

The write_block function uses mem::transmute to convert an immutable &[u8] slice into a mutable &mut [usize] slice. This violates Rust's aliasing rules and memory safety, leading to undefined behavior. The transmute also changes the element type, which can cause issues with data interpretation and alignment.

Fix in Cursor Fix in Web

impl BUFADDRU {
pub fn offset() -> usize {
0xA0
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Incorrect Offset for 64-bit Buffer Address Upper Part

The BUFADDRL and BUFADDRU structs incorrectly share the same offset (0xA0). As these represent the lower and upper 32-bit parts of a 64-bit buffer address, BUFADDRU needs a distinct offset, likely 0xA4, consistent with other 64-bit address register pairs.

Fix in Cursor Fix in Web

let base = self.virt_base_address() as *mut CTRL;
let ctrl = self.control_reg().with_fifo_reset(true);
unsafe { base.byte_add(*self.fifo_offset.get()).write_volatile(ctrl) }
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: FIFO Reset Error

In reset_fifo, the control register value is written to the FIFO data offset (0x600) instead of the correct control register offset (0x00). This prevents the FIFO from resetting and may corrupt other hardware registers.

Fix in Cursor Fix in Web

Copilot AI review requested due to automatic review settings October 22, 2025 05:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the VisionFive 2 (VF2) RISC-V platform by introducing platform-specific drivers and modifying startup procedures to accommodate hardware differences.

Key changes:

  • Implements VF2 SD/MMC card driver (DW MSHC controller)
  • Adjusts boot hart initialization logic for RISC-V platforms
  • Relocates architecture setup in the boot sequence for RISC-V

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
kernel/src/process/idle.rs Temporarily disables boot hart assertion that assumes hart 0
kernel/src/mm/init.rs Moves RISC-V setup_arch() call earlier in memory initialization
kernel/src/init/initial_kthread.rs Adds VF2-specific init binary to search path
kernel/src/init/init.rs Guards setup_arch() call to prevent duplicate execution on RISC-V
kernel/src/filesystem/vfs/vcore.rs Adds /dev/sdio1 to root filesystem device candidates
kernel/src/driver/base/device/device_number.rs Adds MMC block device major number constant
kernel/src/arch/riscv64/pci/mod.rs Disables PCI initialization for VF2 platform
kernel/src/arch/riscv64/driver/vf2/mod.rs Implements VF2 MMC/SDIO probe and initialization
kernel/src/arch/riscv64/driver/vf2/dw_mshc/registers.rs Defines register structures for DW MSHC controller
kernel/src/arch/riscv64/driver/vf2/dw_mshc/mod.rs Module structure for DW MSHC driver components
kernel/src/arch/riscv64/driver/vf2/dw_mshc/mmc.rs Core MMC driver implementation with block device interface
kernel/src/arch/riscv64/driver/vf2/dw_mshc/dma.rs DMA descriptor structures for MSHC controller
kernel/src/arch/riscv64/driver/sbi.rs Modifies console output to handle line endings for RustSBI
kernel/src/arch/riscv64/driver/mod.rs Exports VF2 driver module
kernel/Cargo.toml Adds byte-slice-cast dependency for driver

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +30 to +31
// TODO: 这里需要修正一下判断逻辑
// 在 riscv-vf2 中, boot hart 不一定是0, 他可能是1, 因此会过不了
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO comment should be in English to maintain consistency with the codebase. Additionally, it should reference the specific issue or provide more context about when this will be addressed.

Suggested change
// TODO: 这里需要修正一下判断逻辑
// riscv-vf2 中, boot hart 不一定是0, 他可能是1, 因此会过不了
// TODO: The logic here needs to be fixed. See issue #123 for details.
// In riscv-vf2, the boot hart is not always 0; it can be 1, so this check may fail.

Copilot uses AI. Check for mistakes.
("/bin/busybox", Some("init")),
("/bin/init", None),
("/bin/sh", None),
("/bin/riscv_rust_init", None), // 对vf2, 目前没做cmdline的适配, 加个默认寻找
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inline comment should be in English to match the project's language standards.

Suggested change
("/bin/riscv_rust_init", None), // 对vf2, 目前没做cmdline的适配, 加个默认寻找
("/bin/riscv_rust_init", None), // For vf2, cmdline adaptation is not yet implemented, so add a default search

Copilot uses AI. Check for mistakes.
let fdt = open_firmware_fdt_driver().fdt_ref()?;
// vf2 不需要, 事实上 qemu 也不使用 pci,设备都是使用 mmio
// 因此其实初始化这个没有太大的意义, 先注释掉
// TODO: 如果取消注释且启用 vf2 平台, 那么需要补充 vf2 的 pcie 驱动
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments should be written in English to maintain consistency with the rest of the codebase.

Suggested change
// TODO: 如果取消注释且启用 vf2 平台, 那么需要补充 vf2 的 pcie 驱动
// TODO: If you uncomment this and enable the vf2 platform, you need to add the vf2 PCIe driver.

Copilot uses AI. Check for mistakes.
for c in s {
#[allow(deprecated)]
sbi_rt::legacy::console_putchar(*c as usize);
// 原本的是适配opensbi的, 但是对rustsbi的适配存在问题, 不能正确的解析'\r'
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be written in English to align with codebase documentation standards.

Suggested change
// 原本的是适配opensbi的, 但是对rustsbi的适配存在问题, 不能正确的解析'\r'
// The original implementation was adapted for OpenSBI, but there are compatibility issues with RustSBI, which cannot correctly parse '\r'

Copilot uses AI. Check for mistakes.
}

fn disk_range(&self) -> GeneralBlockRange {
// TODO: 实现自动读,下面的数字为fdisk -l DragonOS/bin/disk....img的结果
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This TODO comment should be in English to maintain documentation consistency.

Suggested change
// TODO: 实现自动读,下面的数字为fdisk -l DragonOS/bin/disk....img的结果
// TODO: Implement automatic reading. The number below is the result of running 'fdisk -l DragonOS/bin/disk....img'.

Copilot uses AI. Check for mistakes.
#[bits(16)]
pub oemid: usize, // OEM ID
#[bits(8)]
pub manfid: usize, // Manufacturer ID`
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected backtick at the end of the comment. Should be a regular comment without the trailing backtick.

Suggested change
pub manfid: usize, // Manufacturer ID`
pub manfid: usize, // Manufacturer ID

Copilot uses AI. Check for mistakes.
}

fn set_parent(&self, _parent: Weak<LockedDevFSInode>) {
panic!("DeviceINode for MMC is not supportted!")
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'supportted' to 'supported'.

Suggested change
panic!("DeviceINode for MMC is not supportted!")
panic!("DeviceINode for MMC is not supported!")

Copilot uses AI. Check for mistakes.
pub struct DES0 {
_reserved0: bool,
disable_interrupt_on_completion: bool,
last_decriptor: bool,
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'decriptor' to 'descriptor'.

Suggested change
last_decriptor: bool,
last_descriptor: bool,

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JensenWei007 这里需要小改一下

- Add necessary platform driver support
- Modify some startup processes and assert
- Fixed some issues

Signed-off-by: JensenWei007 <jensenwei007@gmail.com>
@Samuka007
Copy link
Member

bugbot run

@cursor
Copy link

cursor bot commented Oct 22, 2025

Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository.

Comment on lines +72 to +75

#[cfg(target_arch = "riscv64")]
crate::arch::init::setup_arch().expect("setup_arch failed");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里似乎x86的初始化也可以迁到这个位置?不需要分开编译条件处理? @fslongjin 怎么看
从原来的 kernel/src/init/init.rs:87 setup_arch()

riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [
"s-mode",
] }
byte-slice-cast = { version = "1.2.2", default-features = false }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我测试了一下,貌似这个不是必须的?在mmc.rs那,用到的地方,直接core::str::from_utf8就可以了?

pub struct DES0 {
_reserved0: bool,
disable_interrupt_on_completion: bool,
last_decriptor: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JensenWei007 这里需要小改一下

("/bin/busybox", Some("init")),
("/bin/init", None),
("/bin/sh", None),
("/bin/riscv_rust_init", None), // 对vf2, 目前没做cmdline的适配, 加个默认寻找
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里最好为rv64加个条件编译?

@fslongjin fslongjin merged commit 9634e5e into DragonOS-Community:master Oct 26, 2025
11 checks passed
mistcoversmyeyes pushed a commit to mistcoversmyeyes/DragonOS that referenced this pull request Nov 6, 2025
fix(futex): 修复futex系统调用参数处理逻辑 (DragonOS-Community#1321)

- 根据不同的futex命令类型正确处理第4个参数
- 对于WAIT系列操作,第4个参数被解释为超时指针
- 对于其他操作,第4个参数被解释为数值val2
- 仅在需要uaddr2的操作中校验uaddr2

Signed-off-by: longjin <longjin@DragonOS.org>

feat(ipc): 实现 rt_sigtimedwait 系统调用并优化信号处理机制 (DragonOS-Community#1323)

* feat(ipc): 实现 rt_sigtimedwait 系统调用并优化信号处理机制

- 添加标准 POSIX siginfo_t 结构体及相关类型,用于用户态接口
- 实现 rt_sigtimedwait 系统调用,支持等待特定信号并处理超时
- 优化信号处理逻辑,确保信号正确标记为 pending
- 修复生命周期标注问题,提高代码健壮性
- 添加完整的系统调用测试用例

Signed-off-by: longjin <longjin@DragonOS.org>

* feat(signal): 扩展实时信号支持并优化信号处理逻辑

- 新增实时信号定义(SIGRTMIN+1至SIGRTMIN+31)
- 改进信号唤醒机制,修复阻塞状态下的信号处理
- 增强内存错误日志,添加进程ID和RIP信息
- 重构抢占管理,引入PreemptGuard机制
- 优化rt_sigtimedwait系统调用实现

Signed-off-by: longjin <longjin@DragonOS.org>

fix: 修复多线程的一些bug (DragonOS-Community#1325)

* feat: 增强信号处理和线程同步功能

- 修复信号处理默认行为,显式设置SIGCHLD/SIGURG/SIGWINCH为忽略
- 在信号处理和futex系统调用中添加内存屏障确保执行顺序
- 添加pthread创建和连接测试用例,验证线程功能正确性
- 优化进程退出时的子进程收养逻辑,移除调试日志
- 更新测试程序Makefile,添加pthread链接支持

Signed-off-by: longjin <longjin@DragonOS.org>

* feat(mm): 实现MADV_DONTNEED内存建议操作

- 添加对MADV_DONTNEED和MADV_DONTNEED_LOCKED标志的处理
- 实现页面解除映射和TLB刷新逻辑
- 支持glibc pthread_create时的线程栈管理

Signed-off-by: longjin <longjin@DragonOS.org>

* fix(robust_lock): 修复robust list获取逻辑

- 修正get_robust_list方法的参数命名和文档
- 修复用户空间指针处理逻辑,正确写入robust list head地址和大小

Signed-off-by: longjin <longjin@DragonOS.org>

* refactor(kernel): 优化futex系统调用和线程相关代码

- 简化futex操作参数处理,移除不必要的错误检查
- 调整clone系统调用参数提取函数顺序
- 在clear_user函数中添加内存屏障
- 新增pthread基础功能测试程序

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>

fix(futex): 修复futex定时器激活逻辑导致唤醒丢失的问题&复FUTEX_WAKE_OP操作中的Linux兼容性问题 (DragonOS-Community#1326)

* fix(futex): 修复定时器激活逻辑以避免唤醒丢失

- 在阻塞进程时,确保定时器在中断关闭后被激活,以防止短超时导致的唤醒丢失
- 移除不必要的定时器激活调用,优化代码结构

Signed-off-by: longjin <longjin@DragonOS.org>

* fix(futex): 修复FUTEX_WAKE_OP操作中的Linux兼容性问题

- 修复FUTEX_OP_ANDN操作的位运算逻辑错误
- 支持私有futex中uaddr为NULL时的Linux兼容行为
- futex_test启用PrivateFutex的测例

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>

feat(riscv platform vf2): vf2 platform adapted to riscv architecture (DragonOS-Community#1285)

- Add necessary platform driver support
- Modify some startup processes and assert
- Fixed some issues

Signed-off-by: JensenWei007 <jensenwei007@gmail.com>

add dropbear support (DragonOS-Community#1304)

DragonOS-Community#1304

* fix rename error in fat32

add a fake link implementation for fat32(it will be removed in the
future).

Signed-off-by: Godones <chenlinfeng25@outlook.com>

* feat: add new syscall and fix the fnctl error

add sendfile syscall.
add rt_sigsuspend syscall.
add sendfile test.
add setown/getown command for fcntl.

Signed-off-by: Godones <chenlinfeng25@outlook.com>

---------

Signed-off-by: Godones <chenlinfeng25@outlook.com>

feat(net): 桥接网络支持 (DragonOS-Community#1287)

* feat: 新增veth和bridge结构体,尚未详细测试

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(net): 完善一下已有的bridge以及veth设备,增加一些调试信息

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(net): 完善veth网卡驱动,能通过测例;简单修改vridge设备,尚未测试

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(routing): 简单添加路由子系统,尚未完成

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(veth): 增加veth默认对端路由

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(socket): 恢复udp socket中的wait_queue等待

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(net): 补充bridge的实现

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(bridge): 更改测试程序

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 重命名测试程序

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 更改veth&beidge测试程序的toml

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 暂时添加route_iface以及route_table

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: draft router

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 实现简单的路由功能,未详细测试

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 添加netlink框架,内核相应的处理逻辑以及读取写入用户空间尚未完成

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netlink): 完善netlink的读写部分,增加addr的内核处理逻辑

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 移动routing的位置

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 补充netlink的阻塞等待逻辑&&fmt

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netns): 添加网络命名空间

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netns): 删除全局路由,使用当前netns下的路由

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netlink): 将netlink socket移入netns中

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 完成netlink addr消息的支持,增加测试程序

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netlink): 消除一些warning

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: 新建netns时插入loopback网卡到设备列表

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 将veth和bridge测试程序改用C完成

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(gdb): 增加gdb debug可选项

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: 修复SockAddrIn结构体中的sin_addr字节序问题,确保正确处理IPv4地址

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 手糊实现路由功能,后续需要更改事件驱动

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netlink): 补充getlink方法以及相关结构体

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* Refactor network driver interfaces and introduce NAPI support

- Removed the default_iface parameter.
- Introduced a new NAPI module to manage network polling and scheduling.
- Updated the Iface trait to include a napi_struct method for NAPI support.
- Modified Veth network interfaces to integrate with the new NAPI structure.
- Refactored the Router implementation to remove unnecessary polling threads and wait queues.
- Updated NetNamespace to manage a list of bridge devices.
- Cleaned up various unused methods and comments across network-related files.

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 将virtio网卡的处理逻辑移动进ksoftirqd中

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(netlink): 暂时为多播消息添加allow unused,消除warning

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(nat): 实现SNAT和DNAT

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat(epoll): 更改epoll唤醒判断的逻辑,支持socket加入epoll

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 修改test_bind,防止爆内存

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 添加一个路由todo信息

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* fix: rebase主线之后修改冲突

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: fmt

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 清除无用日志

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 补充一个panic信息

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 将kernel文件夹重命名为kern

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

* feat: 删除netlink测试程序中的linux/netlink.h头文件

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

---------

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

feat(kexec & initram):Add kexec and initram support for x86 architecture (DragonOS-Community#1303)

- Support embedding initram and using Ramfs as the file system for extracting initram
- Support kexec series system calls, including load series and reboot
- Support u-root as the root file system to boot in Go language
- Add sysfs such as boot_crams and memmap
- Add a series of peripheral system calls related to the above

Signed-off-by: JensenWei007 <jensenwei007@gmail.com>

fix(syscall):修复syslog的bug (DragonOS-Community#1327)

- 在 procfs 的 syslog syscall 处理路径中增加对 SYSLOG_ACTION_READ_ALL (action = 3) 的分发。
- 直接调用现有的 Kmsg::read_all 接口,未修改 Kmsg 的实现逻辑。
- 修复了 gvisor 测试中 Syslog.ReadAll 因未分发而返回 EINVAL 的问题。

fix: 更新Makefile指定的Rust工具链为nightly-2025-08-10 (DragonOS-Community#1328)

* fix: 更新一些makefile中指定的工具链

* fix: 添加novashell到app-blocklist.toml

* fix: 修改nix-dev-shell指定的rust工具链版本号为2025-08-10

* fix: 更新enable_compile_gvisor.sh,避免对其他blocked_app的意外注释

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

---------

Signed-off-by: sparkzky <sparkhhhhhhhhhh@outlook.com>
Co-authored-by: sparkzky <sparkhhhhhhhhhh@outlook.com>

feat: 实现waitid系统调用及作业控制信号处理 (DragonOS-Community#1333)

* feat: 实现waitid系统调用及作业控制信号处理

- 新增waitid系统调用,支持WEXITED、WSTOPPED、WCONTINUED等选项
- 完善作业控制信号处理逻辑,支持SIGSTOP/SIGCONT的异步处理
- 优化信号唤醒机制,确保及时处理pending信号
- 添加waitid功能测试用例,验证系统调用正确性

Signed-off-by: longjin <longjin@DragonOS.org>

* fix: 修复进程管理和信号处理中的竞态条件与错误处理

- 在信号唤醒逻辑中添加停止状态检查,避免错误唤醒已停止进程
- 修复进程等待循环中的错误处理,防止在ESRCH等错误时无限循环
- 优化CPU踢出逻辑,避免当前CPU自踢造成的竞态条件
- 清理信号类型定义中的冗余注释

Signed-off-by: longjin <longjin@DragonOS.org>

* fix(ipc): 修正信号信息结构体字段顺序以符合Linux标准

- 调整SigInfo和PosixSigInfo结构体字段顺序
- 确保si_errno在si_code之前,符合Linux标准布局
- 更新相关转换代码中的字段赋值顺序

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants