From 1767d390fbf3d0c65389de46caf0b6d43ef3b6ad Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 10 Jul 2026 11:24:56 +0800 Subject: feat: establish bootable new architecture checkpoint Replace the compressed boot path with a relocatable higher-half RISC-V entry, expand memory and SMP support, and add the driver, TTY, VFS, exec, signal, syscall, initramfs, and self-test infrastructure needed for a bootable kernel checkpoint. --- na/kernel/pid.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'na/kernel/pid.cc') diff --git a/na/kernel/pid.cc b/na/kernel/pid.cc index 81b9494..04b846b 100644 --- a/na/kernel/pid.cc +++ b/na/kernel/pid.cc @@ -12,8 +12,10 @@ void PidAllocator::init() { for (int i = 0; i < kBitmapWords; i++) bitmap_[i] = 0; - next_hint_ = 2; - bitmap_[0] |= 0x3ULL; /* Reserve PID 0 (idle) and 1 (init) */ + next_hint_ = 1; + bitmap_[0] |= 0x1ULL; /* Reserve PID 0 (idle/swapper) only. + * PID 1 (init) is allocated normally — the first + * kthread_create() call gets it, matching Linux. */ } int32 PidAllocator::alloc() -- cgit v1.2.3