|
|
8d2c40cb1e
|
feat(kernel): kernel-owned memory model
- FrameTable: per-frame owner/use, replaces PagePool + ProcessMemory
- Quota per process, page tables charged to owner
- Regions for shared mem + device MMIO, torn down w/ owner
- Platform: create/destroy AS, map/unmap, zero_frame; drop translate_va
- RequestPages/ReleasePages/MapPage(move) checked vs kernel records
- user window 0x1000..32MiB, private pts by construction
- boot loader + device setup go through kernel api
- kernel built in place, boot allocator bounded
- isolation tests, randomized invariant test, FrameTable kani proofs
- fixes: inflated release, unmapped release, dst va unchecked,
heap overflow, unbounded pt alloc, unzeroed frames, double free
|
2026-10-26 19:40:50 +01:00 |
|
|
|
8d53fa9ac5
|
refactor(adapter-riscv): split kmain into boot/, devices/ modules
kmain is now 20 lines — six function calls:
hardware::init → BSS, MMU, traps, timer, PLIC, kernel
loader::load_init → read init.elf, create process, map ELF
loader::load_server → read server ELF, create process, map ELF
storage_setup → VirtIO block re-init, shared buffer, phys-info
gpu_setup → VirtIO GPU init, framebuffer alloc, phys-info
caps::grant_all → endpoints, capability grants
New modules:
boot/hardware.rs — hardware init (BSS, MMU, traps, kernel)
boot/loader.rs — ELF loading, thread setup, enter_userspace
boot/caps.rs — endpoint creation, capability grants
devices/storage_setup.rs — VirtIO block for storage server
devices/gpu_setup.rs — VirtIO GPU for display server
All unsafe contained in hw/, mmu/, trap/. Boot and device
modules call safe wrappers.
|
2026-10-18 13:19:16 +02:00 |
|