<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rs-dos/rsnix/src/interrupts.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-17T12:53:52Z</updated>
<entry>
<title>USB2/1.1 (EHCI/UHCI) drivers + real-hardware bring-up hardening</title>
<updated>2026-08-17T12:53:52Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-17T12:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=be868a43185826b02bf6d091019bb779678525bb'/>
<id>urn:sha1:be868a43185826b02bf6d091019bb779678525bb</id>
<content type='text'>
- Add polled EHCI (USB2) and UHCI (USB1.1) host-controller drivers with
  HID boot mouse support, wired into cursor polling and the 'usb' shell cmd
- Add USB Legacy ownership handoff (claim_usb_legacy) plus config_write_byte
- Harden boot: verify the PIT/timer ticks before shell entry, EOI stray
  interrupts in the LAPIC to stop interrupt storms, bound PS/2 controller
  waits, and INTx-disable AHCI (polled driver)
- Add boot stage markers, klog screen echo, and QR lock; scheduler
  mark_shell_running; NO_USB stopgap to keep BIOS USB-Legacy input alive
- alloc_pages_above for DMA buffers that must avoid low conventional memory
- Expand DEBUG_NOTES with EHCI/QEMU bring-up findings
</content>
</entry>
<entry>
<title>v0.5.5: crash reports go to a dedicated CRASHLOG USB stick</title>
<updated>2026-08-02T13:21:34Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-02T13:21:34Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=c7d92071e1dd11c45999457b16554b4abaa73b28'/>
<id>urn:sha1:c7d92071e1dd11c45999457b16554b4abaa73b28</id>
<content type='text'>
The fault handler now writes crash.log to the volume labeled CRASHLOG
(label-selected via fat::crash_vol), falling back to slot 0.  On real
hardware the boot USB may be unwritable, so a second stick labeled
CRASHLOG survives the write; the shell auto-prints the previous crash
report from it at next boot (read_crash_log resolves /disk/&lt;uid&gt;/crash.log
through the FAT path, since Disk nodes hold no cached children).

- fat.rs: volume_label() + crash_vol() (no allocation)
- fs.rs: write_crash_log targets crash_vol(); read_crash_log prefers the
  CRASHLOG disk node; drop now-unused first_disk()
- mkdisk.sh: --label option
- test-fault.sh: boots with a dedicated CRASHLOG stick (mkfs -F 32 -n
  CRASHLOG), verifies crash.log lands there and NOT on the ESP
</content>
</entry>
<entry>
<title>rsnix v0.5.2: fault diagnostics + real-hardware scroll-crash hardening</title>
<updated>2026-08-01T20:28:34Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T20:28:34Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=ab7d87bcde31c1681ea09c30534dde840a58d6fa'/>
<id>urn:sha1:ab7d87bcde31c1681ea09c30534dde840a58d6fa</id>
<content type='text'>
The real-hardware scroll crash (white bands + instant freeze, QEMU-clean)
was invisible because the only trace was a single serial line on machines
with no serial console.  This makes every crash self-identifying and
hardens the real-hardware failure surfaces:

- Every CPU exception vector 0-31 now has an IDT entry (macro-generated
  stubs; 8/14 keep their IST stacks).  A fault in the shell prints a
  white-on-red band to the framebuffer via gop::dump_lines (raw fb
  writes bypassing the vt, fully clamped) plus a parseable serial line:
  '!!! &lt;kind&gt; vec=N err=… rip=… cr2=… rsp=… rflags=… task=N "name"',
  then halts — instead of converging to a cryptic double fault.
  Background-task faults abort the task as before.
- Boot log now reports the authoritative post-SetMode geometry:
  'gop: fb base=… size=… pitch=… WxH bpp=… bgr=…', so the next real
  machine's report identifies whether pitch*height exceeds the mapping.
- Framebuffer writes (clear, push_rect, shift_up_n bulk push, cursor
  overlay) are clamped to the firmware's framebuffer_size: a pitch-
  padded mode degrades to a truncated view instead of faulting past
  the mapping.
- The GOP framebuffer region is excluded from the page allocator (and
  subtracted from the heap's conventional-region pick) even when the
  firmware lists it as ConventionalMemory — kernel allocations can
  never overwrite the display again.  The GOP protocol is located and
  peeked before the memory map is captured so the exclusion is known
  at heap-init time.
- Shell gains a hidden 'fault' command (deliberate unmapped write) and
  'make test-fault' verifies the dump: vec=14, cr2=0x400000000000,
  task=0, halt — no triple fault.  All other suites re-pass.
- CONTEXT.md: fault-dump format documented for real-hardware reports.
</content>
</entry>
<entry>
<title>rsnix v0.4.0: GUI input foundation — PS/2 mouse + scheduler message queues</title>
<updated>2026-08-01T17:34:40Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T17:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=9b9758e5ee2564b04685eadf2b9ce23dd1060b86'/>
<id>urn:sha1:9b9758e5ee2564b04685eadf2b9ce23dd1060b86</id>
<content type='text'>
Mouse (IRQ12, stream mode): ByteRing generalized for both PS/2 devices,
ISR routes data-port bytes by the controller's aux bit; mouse_init with
bounded-ACK handshake (boots without a mouse); packet decoder with
bit-3 resync, screen-relative deltas, buttons.  Exposed as /dev/mouse,
the `mouse` stream command, and `make test-mouse`.

Message queues (ADR 0003's GUI-era primitive): every task gets a static
16-slot TaskMsg ring; send/recv/recv_blocking with direct wake + tick
scan safety net for the lost-wakeup race; `msgrecv`/`send` commands,
`mouse &lt;id&gt;` routes real IRQ12 events into a task's queue, jobs shows
q=.  `make test-msg` + `make test-disk` regression pass.
</content>
</entry>
<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: [ssss.mmm] millisecond timestamps from the PIT</title>
<updated>2026-08-01T12:21:11Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T12:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=6447eb12948d37b74adae2fdbf1db5a9d7b363d5'/>
<id>urn:sha1:6447eb12948d37b74adae2fdbf1db5a9d7b363d5</id>
<content type='text'>
- interrupts::uptime_ms(): monotonic ms since boot — the 100 Hz PIT
  tick (10 ms) plus interpolation from the PIT's live 1.19 MHz
  down-counter (read twice around the tick load; a count jump means a
  tick fired between reads) for true sub-ms resolution.  TICKS widened
  AtomicU16 -&gt; AtomicU64 (u16 wrapped after ~11 min).
- PIT_READY gates interpolation until interrupts::init configures the
  timer, so early-boot lines are deterministically [0000.000] instead
  of uninitialised-PIT noise; klog clamps timestamps monotonic.
- The CMOS RTC cannot provide milliseconds (1 Hz BCD device, seconds
  only) — millis come from the PIT.
- klog stores ms per line at append time; dump format is now
  '[0000.123] 000000  === rsnix boot ===' (user-specified format).

Verified in QEMU: first line [0000.000], Phase-2 lines show real
monotonic ms (fs: vfs ready at [0000.519], self-test [0000.524]),
per-dump monotonicity, boot.log persists timestamps, test-disk round
trip fsck-clean.
</content>
</entry>
<entry>
<title>Bump workspace to edition 2024</title>
<updated>2026-08-01T01:47:51Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T01:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=7c5603b2fed27be86982665a8b10dcd8f1c5a483'/>
<id>urn:sha1:7c5603b2fed27be86982665a8b10dcd8f1c5a483</id>
<content type='text'>
- edition = "2024" in the workspace manifest and rsdosedit
- extern blocks must be unsafe: interrupts.rs ISR stubs -&gt; unsafe extern "C"
- #[no_mangle] -&gt; #[unsafe(no_mangle)] (efi_main, isr_dispatch)
- One missed static-mut read in free_list_insert wrapped in an explicit
  unsafe block (edition 2024 removed the implicit unsafe context inside
  unsafe fns)
- rustfmt reflows for 2024: nested if-lets become let-chains, imports
  re-sorted, rsdosedit help-screen box rows wrapped

No codegen-affecting changes. Validated: cargo check/clippy/fmt clean
(host + uefi target), make test-disk PASS, editor round-trip PASS.
</content>
</entry>
<entry>
<title>Clean up warnings, fix FAT32 multi-cluster dirs, prep for edition 2024</title>
<updated>2026-08-01T01:44:57Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-08-01T01:44:57Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=63d01e9d8eb6f3ccb6a96b7c577834276cf51add'/>
<id>urn:sha1:63d01e9d8eb6f3ccb6a96b7c577834276cf51add</id>
<content type='text'>
Warning cleanup (cargo check + clippy now 0 across the workspace):
- Migrate all 21 static_mut_refs sites to &amp;raw mut accessors (fat, gop,
  ps2, vt, ahci, interrupts, memory) so edition 2024 won't deny them
- panic = "abort" profiles: bare cargo check/build now works without
  nightly/-Zbuild-std
- Wire TICKS in the timer ISR (it was never incremented, so the vt scroll
  batching trigger was dead code)
- Clippy: efi_main becomes unsafe extern "efiapi" with a # Safety doc,
  KeyBuf::new uses inline-const array repeat (no interior-mutable const),
  editor main loop is a while-let, PIT control byte regrouped
- [workspace.lints.clippy] allows result_unit_err + needless_range_loop
  (deliberate kernel style); large_enum_variant allowed on LineInput
- Drop now-stale static_mut_refs allow from the rsdos bin

FAT32 correctness fixes (both pre-existing, exposed by the SFN fix):
- Unique 8.3 short names: to_8_3() never disambiguated collisions, so
  files sharing a long-name prefix got identical SFNs and fsck reported
  duplicate directory entries.  Add dir_short_names() + unique_short_name()
  (~N tails, Windows-style) and force LFN when the SFN changes.
- Multi-cluster directories: scan_dir/dir_short_names stopped at the first
  0x00 slot, hiding every entry written into a chained cluster (writes
  failed with 'cannot write', duplicate SFNs accumulated); add_dir_entry
  now packs the cluster (0xE5 deleted-markers) before extending so other
  FAT readers (mtools, Windows) see the continuation too.

Other: delete dead fields (Disk.fis, Volume.fat_count), drop timer_irq/
keyboard_irq/rendered, refresh_and_exit is a documented unsafe fn, CONTEXT
.md corrected (stable toolchain, IRQ input, 4-crate layout), .gitignore
excludes .pi-subagents artifacts.

Validated: cargo check/clippy/fmt clean, make test-disk PASS on fresh and
reused images (incl. two directory-chain extensions and ~10 SFN tails),
editor round-trip smoke test PASS.
</content>
</entry>
<entry>
<title>fix(rsdos): organizational changes</title>
<updated>2026-07-31T01:22:20Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-07-31T01:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=0ace22d6f88692883584119c64ff010f4cee6738'/>
<id>urn:sha1:0ace22d6f88692883584119c64ff010f4cee6738</id>
<content type='text'>
</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>
