6827e1455d
feat(theme): themes as files (theme crate: toml subset + ints, contrast check, wire); whimsy dark + light; display reads themes/, serves THEME/THEME_NAME, init SET_THEME -> THEME_CHANGED to all windows, bar themed; k-ui follows; settings appearance; init keeps choice in sealed users/<id>/settings/, reapplies at sign-in + display restart
2026-10-28 13:36:57 +01:00
29becf297c
feat(settings): settings app: apps list + per-capability allow/revoke, about (who/role), sign out; system-only caps permissions/session (install refused); pm MANAGE_BADGE copy (list/apps/allow/revoke only), APPS op; init WHO + session pass-on; factory decisions seeded for new system apps; k-ui list_item/toggle, screens/back/scroll
2026-10-28 13:14:35 +01:00
fe73b89525
feat(k-ui): first slice: App trait + run loop, builders (column/row/text/button), flex layout, theme tokens (Whimsy Dark), tiny-skia + fontdue render (Noto Sans Latin subset), keyboard focus ring; tally demo; manifest memory key (pm spawns with it)
2026-10-28 03:20:41 +01:00
864f039bc7
feat(display): windows: full-screen, F1 cycles, OS bar (names, front, user); canvas-only (display-owned buffers, 4 max, reused); launchers OPEN (pm per app, terminal own), window caps minted by display; FORGET on launcher death via init courier; raster crate (font, chunked text); F-keys in input; terminal+snake on canvas; REDRAW gone
2026-10-28 02:48:39 +01:00
28f1ace00a
feat(init): supervise servers+session progs: restart on death, same endpoint, backoff 0/1/5/30s then give up, restarts_clients cascade; release grants/spawn at stop (stale-slot safe); storage death fatal; init output via printer thread (never blocks on log); terminal Ctrl+C via CONTROL-badged copy, latest wins; flaky test server + spawntest restart/backoff check
2026-10-28 01:44:24 +01:00
24b0734c73
feat(filecrypt): per-area keys (BLAKE2s), per-file salt, XChaCha20-Poly1305 chunks bound to index+last, seed DRBG w/ fast key erasure
2026-10-27 23:51:29 +01:00
600140d518
feat(keystore): sealed real/duress slots (argon2id 16MiB/3, ChaCha20-Poly1305), torn-write-safe 2-copy record, wipe state; virtio-rng driver + Entropy port; RustCrypto deps
2026-10-27 23:06:25 +01:00
90e11eb2e8
feat(apps): permission manager equips apps (manifest+consent+decisions in /system), launches via init w/ file grant; shell unprivileged (/home); install/apps/allow/revoke; revoke stops running app; app-image tool; counter app
2026-10-27 22:56:44 +01:00
9bc31a9bbe
feat(manifest): app manifest + decision crate (strict TOML subset, checked newtypes, capability catalog); docs/apps.md spec
2026-10-27 22:32:40 +01:00
83809bbe94
feat(userspace): programs in /bin w/o .elf; bin manifests (needs = display) so shell runs snake; Ctrl+C kills foreground via terminal interrupt notification; ctrl keys; sleep
2026-10-27 21:16:00 +01:00
c603a578c0
feat(userspace): shell runs programs (ls, cat) via spawn w/ terminal+storage+args page; ext4 holes read as zeros; storage re-attach same buffer
2026-10-27 17:22:08 +01:00
b80303f553
feat(userspace): terminal server + shell desktop; US keymap w/ shift; libkos allocator multi-page fix; panics print
2026-10-27 16:50:35 +01:00
8587661684
feat(init): spawn service over IPC with per-client allowance refunded on child death; up to 4 death watchers; spawntest on test image
2026-10-27 16:21:08 +01:00
b814bd9570
test: on-hardware SMP self-test (revoke/kill must stop every hart) + make test-qemu
2026-10-27 12:54:42 +01:00
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
052d7c4a64
refactor: remove old userspace and userspace-rt crates
2026-10-19 00:58:14 +02:00
dbec3842fa
feat: create libkos crate with core modules (syscall, alloc, rt)
2026-10-19 00:53:31 +02:00
0a47b5489a
feat: VirtIO keyboard input for QEMU GUI
...
- Add VirtIO input device driver (device ID 18) reading from eventq
- Translate Linux keycodes (WASD, arrows) to InputEvent
- Kernel probes for VirtIO input device, falls back to UART
- Add -device virtio-keyboard-device to run-gui Makefile target
- input-qemu tries VirtIO first, falls back to UART
2026-10-19 00:30:20 +02:00
27be73f42d
feat: wire display + input servers to snake, fix QEMU 11.x GPU bug
...
VirtIO GPU: QEMU 11.x has RESOURCE_ATTACH_BACKING (0x0104) and
RESOURCE_FLUSH (0x0106) command types swapped in its legacy MMIO
VirtIO GPU implementation. Workaround: send swapped type values.
Confirmed via QEMU monitor (xp shows correct bytes in memory)
and QEMU trace events (device dispatches to wrong handler).
Display pipeline now works end-to-end:
adapter → GPU init → create_2d → attach_backing → set_scanout
display-server → clear(blue) → flush → transfer + resource_flush
snake → draw commands via IPC → display renders → flush to GPU
Input server:
- New driver-input-uart crate (reads UART at mapped VA 0x20000)
- New bins/input-qemu composition root
- Adapter loads input-server, maps UART MMIO into its address space
- Init delegates both display_ep (slot 0) and input_ep (slot 1) to snake
- WASD keys → UART → input-server → IPC → snake direction change
Snake game runs with display and input, exits on wall collision.
2026-10-18 21:10:42 +02:00
3a0395453b
refactor: extract shared hw-virtio crate, eliminate VirtIO protocol duplication
...
Two VirtIO block and two VirtIO GPU implementations (adapter + driver)
shared 90% of their protocol logic. Extracted the common code into
hw-virtio, parameterized by MmioAccess trait.
New crate: hw-virtio (no_std, zero deps)
- mmio.rs: MmioAccess trait, DirectMmio, init_legacy_device(), scan
- queue.rs: VirtioQueue with descriptor chain submit + poll
- block.rs: block read protocol (3-descriptor chain)
- gpu.rs: GPU commands (create_2d, attach_backing, set_scanout,
transfer_to_host, resource_flush)
Adapter thin wrappers (identity-mapped, statics for DMA):
- virtio_blk.rs: 220 → 53 lines
- virtio_gpu.rs: 165 → 37 lines
Driver thin wrappers (mapped VAs, phys-info for DMA):
- drivers/block/virtio: 139 → 70 lines
- drivers/framebuffer/virtio: 146 → 95 lines
Also deleted input-server/input_device.rs (1-line re-export,
superseded by port-input-device).
2026-10-18 13:29:28 +02:00
5766c6f7f7
refactor: extract ports/drivers/bins layers — clean dependency inversion
...
Separate abstractions from implementations following DIP:
servers/ drivers/
│ │
▼ ▼
ports/ (trait-only crates, zero deps)
New crates:
ports/ (abstractions):
- port-framebuffer: Framebuffer trait
- port-block-device: BlockDevice trait + SectorId
- port-input-device: InputDevice trait + InputEvent types
drivers/ (implementations depend on ports/):
- driver-framebuffer-virtio: VirtIO GPU framebuffer
- driver-framebuffer-mock: test double
- driver-block-virtio: VirtIO block device
bins/ (composition roots wire server + driver):
- display-qemu: DisplayServer<VirtioFramebuffer>
- storage-qemu: storage server with VirtIO block
Servers no longer own their hardware traits or driver code.
Neither server nor driver depends on the other — both point
inward to the port abstraction.
2026-10-18 13:13:53 +02:00
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
41f7e7db10
feat(session-server): add session server for app launching, remove apps from init manifest
...
Init now only starts servers. The session server holds ProcessCreate cap
and launches apps on demand. Snake is no longer in the boot manifest.
2026-10-18 04:09:28 +02:00
29434805a6
feat(userspace-rt): add runtime crate with entry point, panic handler, and allocator re-export
...
Snake and hello apps now use extern crate userspace_rt — no more boilerplate assembly or panic handlers in app code.
2026-10-18 04:04:52 +02:00
a83b53d962
feat(init): add init crate with declarative boot manifest, boot sequence, supervisor and shutdown stubs
...
Also: make types from_raw/raw const fn, add create_process/kill/delegate/revoke to userspace syscall stubs.
2026-10-18 03:21:17 +02:00
36cab28506
feat: add log-server (ring buffer) and permission-manager (grant/revoke/check) system servers
2026-10-18 03:14:48 +02:00
570fe22bee
feat: userspace round-trip — syscall stubs, ecall dispatch, U-mode entry and exit on QEMU
2026-10-18 02:15:35 +02:00
44a0ead7f2
feat(adapter-riscv): boot on QEMU virt with UART hello world
2026-10-18 01:46:47 +02:00
4844b6c2d2
feat(elf): add no_std ELF64 parser for loading process binaries
2026-10-18 01:26:18 +02:00
bb99c3001d
init
2026-10-16 02:32:24 +02:00