aboutsummaryrefslogtreecommitdiff
path: root/NOTES.md
AgeCommit message (Collapse)Author
2026-04-08[Phase 2.4-2.6] Process table, round-robin scheduler, Ring 3 spawnCLAUDE_TESTNatasha Moongrave
Adds the task module (process control block, PROCESS_TABLE, round-robin scheduler, and iretq-based Ring 3 entry) and wires set_syscall_kernel_stack into the scheduler so SYSCALL uses the current process's kernel stack. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08[Phase 2.2/2.3] SYSCALL/SYSRET MSR setup + syscall dispatcherNatasha Moongrave
syscall/mod.rs: - Configure STAR (kernel CS=0x08, user base=0x10), LSTAR, SFMASK (clear IF), EFER.SCE to enable the SYSCALL/SYSRET instruction pair - Naked assembly entry stub: swapgs, save/restore user RSP via per-CPU static, remap r10→rcx for Linux arg4 convention, call Rust syscall_handler, sysretq - validate_user_ptr(): bounds check for all user pointers (0..USER_ADDR_MAX) - set_syscall_kernel_stack(): for scheduler to update per-CPU kernel RSP syscall/dispatch.rs: - dispatch(): routes syscall numbers; unknown → -ENOSYS (never panics) - sys_write(fd, buf, count): fd 1/2 → serial; validates user ptr; read_volatile loop avoids Rust aliasing assumptions on untrusted memory - sys_exit(): serial log + hlt_loop() placeholder; Phase 2.5 adds scheduling lib.rs: register syscall::init() + syscall::init_kernel_stack() in strix_os::init() All existing integration tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08[Phase 2.1] GDT user space segments + heap growthNatasha Moongrave
- Restructure GDT to add kernel_data/user_data/user_code in the order required for SYSCALL/SYSRET ABI: 0x08 kernel code, 0x10 kernel data, 0x18 user data, 0x20 user code, 0x28 TSS STAR MSR values: STAR[47:32]=0x08, STAR[63:48]=0x10 - Add TSS.privilege_stack_table[0] (RSP0) with 8 KiB static initial stack for Ring3→Ring0 hardware interrupt transitions - Expose GDT static and all Selectors fields as pub (needed by syscall module) - Add set_kernel_stack(VirtAddr) for scheduler to update RSP0 per-process - Grow HEAP_SIZE 100 KiB → 4 MiB to support process table + kernel stacks - Fix pre-existing lifetime elision lint in allocator.rs - Update flake.nix: add cpio, busybox, gdb, binutils, e2fsprogs - Update NOTES.md with decisions and next steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08[Step 0] Add PLAN.md and NOTES.mdNatasha Moongrave
PLAN.md: Full 7-phase development roadmap with progress tracker, per-phase tasks, integration test specs, security baseline, and dependency list. NOTES.md: Running developer log for context recovery after session resets. Documents key architecture decisions (GDT segment order, filesystem strategy, heap sizing, syscall ABI). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>