danos/system/kernel/architecture/x86_64
Daniel Samson 88ad432758
kernel: shm cross-process shared memory capability (v2 V2)
Generalize capability passing from endpoints to memory objects. The per-task
handle table now holds kind-tagged entries (scheduler.HandleObject{kind, ptr});
closeHandles and shareCapability dispatch by kind, so a shared-memory object
rides an ipc_call send_cap exactly like an endpoint and is refcount-freed only
when its last capability drops.

- shm_create(len) -> vaddr, handle: contiguous, zeroed, cacheable frames wrapped
  in a refcounted ShmObject, mapped into the caller's shm arena (PML4[230]).
- shm_map(cap) -> vaddr: map the same physical pages into a receiver that got the
  capability. mapUserSharedInto maps WB-cacheable + device_grant, so a sharer's
  teardown never frees the shared frames — the object owns them.
- runtime.shm: create(len) -> Region{ptr, handle, len}, map(handle) -> ptr.

Gate: qemu_test.py shm — shm-client creates a region, writes a pattern, passes
its capability to shm-server, which maps it and reads the same bytes back
(shm: shared 4096 bytes ok). ipc/ipc-call/ipc-cap/supervision/dma/usermem/
display-service and host tests all still pass — the handle change broke no IPC.
2026-07-14 10:57:14 +01:00
..
apic.zig Add runtime.time, drop demo drivers, harden TSC timekeeping 2026-07-13 11:56:43 +01:00
cpu.zig kernel: shm cross-process shared memory capability (v2 V2) 2026-07-14 10:57:14 +01:00
gdt.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
idt.zig zig fmt 2026-07-12 16:04:58 +01:00
io.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
ioapic.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
isr.s Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
linker.ld Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
paging.zig kernel: shm cross-process shared memory capability (v2 V2) 2026-07-14 10:57:14 +01:00
per-cpu.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
serial.zig serial: skip a dead COM1 via a loopback probe (fixes ~57s real-HW boot) 2026-07-13 21:15:56 +01:00
smp.zig paging: map the framebuffer write-combining, and clear it after paging 2026-07-13 22:40:39 +01:00
trampoline.s Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
tss.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00