Skip to content

tmp - #201

Merged
MRNIU merged 3931 commits into
Simple-XX:mainfrom
MRNIU:main
Mar 20, 2026
Merged

tmp#201
MRNIU merged 3931 commits into
Simple-XX:mainfrom
MRNIU:main

Conversation

@MRNIU

@MRNIU MRNIU commented Mar 20, 2026

Copy link
Copy Markdown
Member

No description provided.

MRNIU added 30 commits February 28, 2026 12:28
Replace custom Singleton<T> with etl::singleton<T> using per-type
named aliases (e.g. BasicInfoSingleton, TaskManagerSingleton) defined
centrally in kernel.h. Delete singleton.hpp. Update all call sites
from Singleton<T>::GetInstance() to TypeSingleton::instance() and
assignment-construction to TypeSingleton::create(). Update all
documentation references.

Signed-off-by: Niu Zhihong <[email protected]>
…e interrupt controllers Interrupt members

Move arch-specific singleton type aliases from shared kernel.h into
per-arch directories, and convert interrupt controller singletons
(PlicSingleton, ApicSingleton) into private members of each arch's
Interrupt class, following the existing aarch64 pattern where Gic is
already an Interrupt member.

- Move Pl011Singleton to src/arch/aarch64/include/pl011_singleton.h
- Move SerialSingleton to file-local scope in x86_64/early_console.cpp
- Move Ns16550aSingleton to file-local scope in riscv64/interrupt_main.cpp
- Add Plic plic_ member to riscv64 Interrupt with InitPlic() deferred init
- Add Apic apic_ member to x86_64 Interrupt with InitApic() deferred init
- Move APIC creation from ArchInit() to InterruptInit() (boot order fix)
- Remove arch-specific #includes and #ifdefs from kernel.h

Signed-off-by: Niu Zhihong <[email protected]>
Since Interrupt is used as etl::singleton (only one instance), static
class members are semantically equivalent to non-static members. Remove
static to eliminate the need for out-of-class definitions in .cpp files.

- aarch64: interrupt_handlers -> interrupt_handlers_ (non-static member)
- riscv64: interrupt_handlers_, exception_handlers_ (drop static + defs)
- x86_64: interrupt_handlers_, idts_ (drop static + defs, keep alignas)

The alignas(4096) on x86_64 members propagates correctly through
etl::singleton via uninitialized_buffer_of<T> which uses
alignas(etl::alignment_of<T>::value) on its storage.

Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
- C1: Add ReapTask(current) for orphan tasks in Exit() to prevent TCB leak
- C2: Start FSM after default-constructing TCB in Clone() to avoid null deref
- I2: Use STATE_ID constant in StateExited::on_event(MsgReap)
- I3: Move GetStatus() implementation from header to .cpp file
- I4: Enqueue idle task in kReady state, then transition to kRunning
- M2: Restore dropped @todo SIGCHLD comment in exit.cpp
- M5: Add [[nodiscard]] attribute to GetStatus()

Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
MRNIU and others added 27 commits March 20, 2026 13:09
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
U-Boot's image.h requires openssl/evp.h for FIT image signing.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
…uild

OP-TEE's build system requires aarch64-linux-gnu-cpp which was not
symlinked via update-alternatives.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Add kSyscallSchedGetaffinity and kSyscallSchedSetaffinity constants for
all architectures. Add dispatcher cases for sys_kill, sys_sigaction,
sys_sigprocmask, sys_sched_getaffinity, and sys_sched_setaffinity.
Implement sys_kill, sys_sigaction, and sys_sigprocmask function bodies
that delegate to TaskManager signal methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
- signal_test: SIGTERM/SIGKILL default, SIG_IGN, sigprocmask, error paths
- affinity_test: get/set affinity syscalls, cross-task, error paths
- tick_test: tick increment, sleep timing, runtime tracking
- zombie_reap_test: zombie reaping, orphan reparenting, multi-child Wait
- stress_test: 20 concurrent tasks, wait non-child, rapid create-exit

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
…w clone

- Split single serial job into parallel build-riscv64 + build-aarch64 jobs
- Add dev-image.yml workflow to build/push dev container to GHCR
- Replace devcontainers/ci per-step with container: for shared container
- Use shallow clone (fetch-depth: 1) and shallow submodules (--depth 1)
- Add CMake build cache via actions/cache
- Reduce system test runs to 3 for PRs (10 for push/release)
- Add concurrency group to cancel superseded runs
- Upgrade codecov-action v3->v4, actions-gh-pages v3->v4

Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
The riscv64 system test step only checked the cmake exit code, which
is always 0 even when individual tests fail inside QEMU. Align with
the aarch64 approach: capture output to file, grep for "Failed: 0"
to determine pass/fail.

Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Signed-off-by: Niu Zhihong <[email protected]>
Copilot AI review requested due to automatic review settings March 20, 2026 18:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@MRNIU
MRNIU merged commit d384aeb into Simple-XX:main Mar 20, 2026
2 of 3 checks passed
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.

2 participants