<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rs-dos/rsnix/src/serial.rs, branch qemu</title>
<subtitle>Simple, kernel-only, 64bit OS, early stage.
</subtitle>
<id>https://git.2137697.xyz/rs-dos/atom?h=qemu</id>
<link rel='self' href='https://git.2137697.xyz/rs-dos/atom?h=qemu'/>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/'/>
<updated>2026-08-01T15:38:57Z</updated>
<entry>
<title>rsnix: preemptive kernel tasks (ADR 0003) — sched, IST fault stacks, 176-byte frames</title>
<updated>2026-08-01T15:38:57Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T15:38:57Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=8f05ea44f69cb796e7b1f581ba1b8045c98d615b'/>
<id>urn:sha1:8f05ea44f69cb796e7b1f581ba1b8045c98d615b</id>
<content type='text'>
- sched: 16-slot static table, shell=task 0, idle=task 1, spawn with
  guard page + 8 KiB stack, RR on the 100 Hz tick, int 0x60 yield,
  sleep_ms, lazy reap, jobs/bg/sleep/kill shell commands
- gdt: own GDT mirroring UEFI selectors + TSS with IST1/IST2
  (guard-page overflows die gracefully instead of triple-faulting)
- interrupts: isr_dispatch returns next frame in rax; IntFrame grows
  rsp/ss fields — QEMU's 64-bit iretq always pops all five slots from
  a 176-byte frame, so synthetic task frames must carry rsp=top+ss
  (a 160-byte frame made the first iretq pop rsp/ss from the unmapped
  page beyond the frame)
- panic handler: task panics abort the task, shell keeps running
- main: sched::init moved after page allocator + adopted tables
  (the idle's stack+guard need both; it was silently not spawning)
</content>
</entry>
<entry>
<title>klog: kernel log ring + /dev/klog + klog shell command</title>
<updated>2026-08-01T12:09:14Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T12:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=c7540c31d45dac68fa1852f5d25645d569b2da9d'/>
<id>urn:sha1:c7540c31d45dac68fa1852f5d25645d569b2da9d</id>
<content type='text'>
- rsnix/src/klog.rs: RAM ring of the last 128 serial log lines (128
  chars each), fed by serial_println! so every boot/low-level message
  is captured for free.  Sequence numbers per line, wrap/drop
  accounting; the ring never allocates (const-constructible static).
- /dev/klog char device; shell 'klog' is a thin alias for cat
  /dev/klog with the same filters/redirection, so 'klog -t 5',
  'klog -g fat' and 'klog WRITING /disk/.../boot.log' all work.
  klog rejects positional args (usage) and input keywords.
- Shell user-facing output (banner, prompt, term_print/term_println,
  pipeline sink, halt/poweroff) now writes to serial directly instead
  of through serial_println!, keeping echo/cat output out of the boot
  log (a streaming cat /dev/mem would otherwise wrap the ring).
- serial_println! macro hooks klog::append_fmt via format_args! (no
  alloc at call sites); klog::dump formats the log for the device.

Verified in QEMU: 28 boot lines captured (seq 0..27), shell output
absent from the ring, klog WRITING persists a boot log (mtype-checked),
wrap verified with a temporary 140-line boot loop (128 kept / 40
dropped, seq 40..167, oldest-live correct; loop reverted); full
test-disk round trip still fsck-clean.
</content>
</entry>
<entry>
<title>restructure: rsnix kernel + shell crate + rsdos entry point</title>
<updated>2026-07-31T00:58:31Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-07-31T00:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=6a5c32fa6ae8ec34e3e5b44d7e5a78ded8fe729b'/>
<id>urn:sha1:6a5c32fa6ae8ec34e3e5b44d7e5a78ded8fe729b</id>
<content type='text'>
Architecture:
  rs-dos/  (workspace root, was raisernics/)
  ├── rsnix/     — kernel lib crate (uefi, serial, gop, ps2, interrupts, memory)
  ├── shell/     — shell lib crate (prompt, commands, line input)
  ├── rsdos/     — binary crate (efi_main, init, panic handler)
  └── rsboot/    — future git submodule

No functional changes — boots to shell prompt identically.
Version auto-pulled from Cargo.toml via env!("CARGO_PKG_VERSION").
</content>
</entry>
</feed>
