terminus.kernel

28 modules on bare metal — x86_64 and ARM64, TCP remote access

Architecture

┌─────────────────────────────────────────┐
│            Terminus Manager             │
│  - Hardware ownership                   │
│  - Kernel instance lifecycle            │
│  - Syscall routing per process          │
│  - Hot-swap: old drains, new activates  │
└──────┬──────────────────┬───────────────┘
       │                  │
  ┌────▼─────┐      ┌────▼─────┐
  │ Kernel v1 │      │ Kernel v2 │
  │ (draining) │      │ (active)  │
  └───────────┘      └──────────┘

Kernel Modules

ModulePurposeStatus
serial.fUART COM1 driverworking
gdt.fGlobal Descriptor Tableworking
pmm.fPhysical memory manager (bitmap)working
heap.fKernel heap (free-list)working
idt.fInterrupt Descriptor Tableworking
handlers.fISR dispatch, PIC, timer/keyboardworking
timer.fPIT at 100 Hzworking
tss.fTask State Segmentworking
scheduler.fRound-robin cooperative schedulerworking
tfs.fFilesystem (directories, variable-length names)working
virtio_blk.fBlock device (VirtIO + ramdisk fallback)working
virtio_pci.fVirtIO block PCI driverpersistent
manager.fKernel instance registry, hot-swapproven
shell.fInteractive shell (22 commands)working
fcc.fIn-kernel Foundation compilerexec .f files
capability.fCapability-based access controlworking
namespace.fPer-process filesystem namespacesworking
preempt.fPreemptive scheduling (timer ISR)working
virtio_net.fVirtIO network card driverworking
net_ip.fARP + IPv4 + network pollingworking
net_tcp.fTCP state machineworking
net_shell.fRemote shell over TCP :7777proven

Boot Sequence

Power On → BIOS/UEFI → Limine bootloader → start.s → kmain()
  → serial → GDT → PMM → heap → IDT → interrupts → timer
  → TSS → scheduler → initrd → VirtIO disk → TFS mount
  → Manager → hot-swap demo → networking → preempt
  → spawn net shell (PID 1) → serial shell (PID 0)

Shell Commands

Two concurrent shells: serial (local) and TCP (port 7777, nc localhost 7777).

terminus> help
  ls, cat, write, append, replace, rm, mkdir
  exec, spawn, calc, run
  recv, send
  deploy, drain, ps, mem, status, uptime
  clear, halt

For AI Agents

Technical architecture: concept.md