Commit Graph

26 Commits

Author SHA1 Message Date
38f20cc3c4 feat: proper IPC-based boot — init loads servers from storage via IPC, VirtIO GPU driver
Complete microkernel boot pipeline: adapter loads only init + storage + display
from disk. Init bootstraps all other servers by reading binaries from the
storage server via IPC, parsing ELF, creating processes, mapping pages, and
spawning threads.

New syscalls:
- CreateEndpoint: userspace endpoint creation with full capability grant
- DebugPutchar: debug output to UART from userspace
- MapPage: cross-process page mapping (init loads binaries into children)
- SpawnThreadIn: spawn thread in another process via capability

Key fixes:
- Per-process L1 page tables for VPN[2]=0 (prevents cross-process corruption)
- Separate kernel_pt from page_tables[0] (init pid=0 overwrote kernel PT ref)
- Thread Running state set in switch_to_next (syscalls rejected without it)
- Pending IPC results applied during context switch
- SIE disabled during boot (timer can't preempt into unready processes)
- User heap VA starts at 0x40000 (avoids shared buffer at 0x30000)
- RequestPages maps at user VAs via per-process heap allocator

VirtIO GPU:
- Adapter probes for GPU device, initializes resource/scanout/backing
- Display server writes to mapped framebuffer, flushes via GPU virtqueue
- 640x480 BGRA framebuffer with transfer-to-host and resource-flush

Storage server:
- Userspace VirtIO block driver using pre-mapped MMIO and DMA pages
- FAT16 filesystem reader serving file-read requests via IPC
- Shared buffer protocol: init writes filename, storage writes file data

Echo app for IPC testing (adapter-loaded echo proved the pipeline end-to-end).
2026-10-18 13:02:30 +02:00
b7bc223a79 feat: add Halt syscall, fault notification to fault handler, supervisor with back-off, shutdown with timeout
- Halt syscall: only pid 0 (init) can halt, adapter uses SBI SRST
- Fault notification: kernel delivers fault info to process fault handler endpoint before killing
- Supervisor: tracks restart counts, back-off up to 5 restarts
- Shutdown: notifies servers, waits with timeout, calls halt
- Trap handler: faults now call kernel.handle_fault instead of halting
2026-10-18 03:29:05 +02:00
7724a5bd0a feat: implement context switching, SavedContext with pc/status fields, wire all syscall outcomes and timer preemption 2026-10-18 02:34:36 +02:00
142505d8a4 feat: add SavedContext::with_entry_and_stack, wire SpawnThread to preserve entry point and stack 2026-10-18 01:24:56 +02:00
4833f2e2bb feat(kernel): add Revoke syscall for generation-based capability revocation 2026-10-18 01:23:24 +02:00
192631d506 feat(kernel): implement generation-based capability revocation with proofs and tests 2026-10-18 01:11:24 +02:00
71518a93a4 refactor(proofs): split into per-topic modules with shared helpers across types, domain, and kernel 2026-10-18 01:08:05 +02:00
1278373142 fix: fix mut binding and unused import warnings in Kani proofs 2026-10-18 00:57:33 +02:00
acc59830ff feat: add Kani proofs for delegation non-escalation across types, domain, and kernel 2026-10-18 00:55:52 +02:00
b8c5090fe5 fix(kernel): fix kill wait-queue cleanup, RegionId tracking, ReleasePages ownership, and SwitchTo scheduler state 2026-10-18 00:31:05 +02:00
8912a944b8 feat(kernel): add WaitForInterrupt, AcknowledgeInterrupt, and WaitAny syscalls 2026-10-18 00:26:11 +02:00
07534e52d9 feat(kernel): add SpawnThread, CreateProcess, and Kill syscalls 2026-10-18 00:21:01 +02:00
d0a0ba788f feat(kernel): add Kernel struct, MockPlatform, and simple syscalls (GetTime, GetProcessId, Yield) 2026-10-18 00:15:40 +02:00
8dd36e7d6d refactor(domain): move irq tests to separate file, fix MemoryRegion import in platform 2026-10-17 23:54:16 +02:00
328708ed58 feat(domain): add EndpointTable, IrqRoutingTable, and remaining error variants 2026-10-17 23:51:56 +02:00
ed80fc43a6 feat(domain): add memory module with page pool, per-process tracking, and region table 2026-10-17 23:45:17 +02:00
021b2d83b9 fix(domain): remove all unwrap() from production code in scheduler 2026-10-17 23:40:03 +02:00
c590810fe3 feat(domain): add Message constructor, accessors, and builder 2026-10-17 23:36:44 +02:00
0296776e45 chore: remove old flat process.rs and thread.rs replaced by directories 2026-10-17 23:34:54 +02:00
edb924c27a feat(domain): add MultiCoreScheduler with placement tracking, priority preemption, and load balancing 2026-10-17 23:31:22 +02:00
14b18f7406 feat(domain): add ThreadTable with spawn, get, destroy, and process filtering 2026-10-17 23:29:46 +02:00
6444de69b8 feat(domain): add Thread constructor, accessors, and state machine transitions 2026-10-17 23:28:56 +02:00
42ed5ade29 feat(domain): add ProcessTable with create, get, and destroy 2026-10-17 23:27:28 +02:00
fe0fde7de1 feat(domain): add Process constructor, accessors, and thread slot management 2026-10-17 23:26:14 +02:00
06b51b6712 Implement domain and endpoint modules with capability management, message passing, and scheduling features 2026-10-17 23:09:21 +02:00
bb99c3001d init 2026-10-16 02:32:24 +02:00