Skip to content

Develop#114

Merged
LuernOutOfOrder merged 14 commits intomainfrom
develop
Feb 3, 2026
Merged

Develop#114
LuernOutOfOrder merged 14 commits intomainfrom
develop

Conversation

@LuernOutOfOrder
Copy link
Owner

This pull request introduces several improvements and refactorings to the kernel's memory and stack handling for the RISC-V32 architecture, updates configuration and build scripts, and removes some redundant fields from test files. The most significant changes focus on improving stack alignment, simplifying stack management, and enhancing build configuration for better debugging and reliability.

Memory and Stack Alignment Improvements:

  • Introduced a new AlignedStack16 struct (with 16-byte alignment) to replace the previous AlignedStack, improving stack alignment for both the scheduler and trap handling; updated all relevant usages and initializations to use AlignedStack16 (src/primitives/stack.rs, src/arch/riscv32/scheduler/mod.rs, src/arch/riscv32/traps/trap_frame.rs) [1] [2] [3] [4] [5] [6] [7].

  • Added a new mem module under arch::riscv32 with a function update_kernel_sp to handle updating the kernel stack pointer in a more modular way (src/arch/riscv32/mem.rs, src/arch/riscv32/mod.rs, [1] [2] [3] [4].

Build Configuration and Debugging Enhancements:

  • Updated .cargo/config.toml to set panic = "abort" for all profiles, added force-frame-pointers for improved backtraces, enabled profile-rustflags, and simplified build/test/Clippy aliases to remove hardcoded target specifications (.cargo/config.toml) [1] [2] [3] [4] [5].

  • Bumped kernel version to 0.4.2 in both Cargo.toml and src/info.rs [1] [2].

Test Suite Refactoring:

  • Removed the redundant tests_nb field from all test suite definitions, as the number of tests can be inferred automatically, simplifying test maintenance [1] [2] [3] [4] [5] [6] [7] [8] [9] [10].

Other Notable Changes:

  • Updated the trap frame initialization and related tests to account for the new stack alignment and buffer management [1] [2].

These changes collectively improve the kernel's portability, reliability, and maintainability, particularly for RISC-V32 targets.

LuernOutOfOrder and others added 13 commits February 3, 2026 11:31
…add the flag -Zjson-target-spec, I though I needed the flag --target but no
… add new -C flags for memory map and frame pointer
Fix trap frame stack pointer and improve AlignedStack primitive
…ic API from kernel mem module to update the kernel sp
…ernel_sp-fn

Refactor update_kernel_sp function
…r-test-number

Refactor test suite creation to avoid specifying the number of test inside the suite
@LuernOutOfOrder LuernOutOfOrder added this to the v0.4.2 milestone Feb 3, 2026
@LuernOutOfOrder LuernOutOfOrder self-assigned this Feb 3, 2026
@LuernOutOfOrder LuernOutOfOrder merged commit afc7db4 into main Feb 3, 2026
3 checks passed
@LuernOutOfOrder LuernOutOfOrder deleted the develop branch February 3, 2026 15:53
@LuernOutOfOrder LuernOutOfOrder restored the develop branch February 3, 2026 15:53
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.

1 participant