Commit Graph
21 Commits
Author SHA1 Message Date
Daniel Samson 15b70856c9 M11–M12: IRQ-as-IPC and bus drivers; expand names tree-wide
Two driver-model milestones plus a tree-wide naming pass. Suite 35/35
(QEMU) + host tests green.

M11 — IRQ-as-IPC. A ring-3 driver now sleeps until its device interrupts
it. New src/kernel/irq.zig: per-GSI endpoint bindings, comptime per-vector
trampolines, dispatch = mask GSI -> LAPIC EOI -> notifyLocked, all under one
lock region. irq_bind/irq_ack syscalls, gated by the device claim like
mmio_map. interruptDispatch no longer EOIs — each handler owns its EOI,
because a level line must be masked before it is acknowledged (irq_ack is
the unmask). Bindings are keyed on the owning task and released on exit
(a shared endpoint's siblings survive). hpetd rewritten interrupt-driven.
Tests: hpet (rewritten, reads back the I/O APIC routing) and irqfree.

M12 — bus drivers. DeviceDesc gains a parent, making the device table a
tree. dev_register (device_register) lets a process publish children below
a device it claimed; the kernel enforces resource containment (a child's
resources must nest in its parent's), so a descriptor can't fabricate a
window over kernel RAM. Descriptor copied in via copyFromUser (physmap
walk — an unmapped user pointer fails the call instead of faulting the
kernel). Per-parent child cap bounds table exhaustion. sbin/busd.zig is a
worked bus driver. Test: bus.

Naming — per docs/coding-standards.md: non-acronym abbreviations spelled
out (message, descriptor, device_service, scheduler, runtime, physical,
interpreter, ...); acronyms kept (IPC, MMIO, DMA, HCD, ...); files are
kebab-case (ipc-synchronous.zig, device-service.zig, vfs-protocol.zig, ...).
Exceptions: POSIX/C ABI names and Zig idioms (init/len/ptr) kept. Module
collisions resolved by specific naming (config -> parameters, device.zig
alias -> device_model). AML op/Op disambiguated: op = opcode, Op =
operation; per-opcode parse handlers renamed opX -> parseX.

New driver docs: drivers.md, driver-model.md (bus/class/HCD shapes + the
proposed M13–M16 ABI), coding-standards.md.
2026-07-10 11:39:56 +01:00
Daniel Samson 26d2f5259c document the multi-sink logging model 2026-07-08 10:41:47 +01:00
Daniel Samson 2ee898a91e add device platform module with ACPI support 2026-07-08 09:23:41 +01:00
daniel 6f6ccc8bc9 moving kernel code to kernel/ 2026-07-05 10:19:11 +01:00
daniel 7c3cffb337 moving efi code to boot 2026-07-05 10:01:01 +01:00
daniel d055de7141 documenting things to research 2026-07-03 21:40:59 +01:00
daniel a6de418e42 documenting smp and scheduling to research 2026-07-03 21:24:44 +01:00
daniel f9f0511ac2 documenting research for arm and device discovery 2026-07-03 20:22:48 +01:00
daniel 99d6bf5ce3 renaming run-efi to run-x86-64 2026-07-03 19:45:44 +01:00
daniel 31bf86af56 IPC 2026-07-03 15:09:16 +01:00
daniel df774691c8 Fixed-priority preemptive scheduler 2026-07-03 14:30:33 +01:00
daniel e80043b611 Calibrated timer / clock 2026-07-03 14:17:00 +01:00
daniel 269729f2f2 Built heap allocation 2026-07-03 13:41:55 +01:00
daniel 56219b4050 Documenting sysv 2026-07-03 13:06:27 +01:00
daniel 5ea521d054 Built device interrupts 2026-07-03 12:57:40 +01:00
daniel c8e89e8115 Cross-architecture test suite 2026-07-03 12:39:26 +01:00
daniel 9cf135302d Built paging / the kernel's own page tables (with a TSS+IST) 2026-07-03 12:23:55 +01:00
daniel 0cc71ec8aa Built GDT + IDT + exception handlers 2026-07-03 12:05:41 +01:00
daniel cb2f49cb48 added physical memory manager 2026-07-03 11:24:26 +01:00
daniel 628c4f6d57 Move to multi arch support and added memory map 2026-07-03 11:11:19 +01:00
daniel c2435760c4 Add README file in docs 2026-07-03 10:31:08 +01:00