<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rs-dos/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-07-31T00:58:31Z</updated>
<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>
<entry>
<title>fix: ISR dispatch calling convention + PS/2 interrupt enable</title>
<updated>2026-07-31T00:40:18Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-07-31T00:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=4b48b6938d91a91d7b1dd242991258fe47e284f0'/>
<id>urn:sha1:4b48b6938d91a91d7b1dd242991258fe47e284f0</id>
<content type='text'>
Root cause: x86_64-unknown-uefi uses the Microsoft x64 calling
convention where the first argument is passed in rcx, not rdi.
The ISR stub was setting rdi = rsp, but isr_dispatch() read
the frame pointer from rcx, getting garbage → triple fault.

Also:
- Enable PS/2 keyboard IRQ via controller config byte (bit 0).
- Expose read_scancode() and TICKS from interrupt module.
- ps2::poll_key() uses 'sti; hlt' race-free sleep pattern.
</content>
</entry>
<entry>
<title>interrupts: IDT, PIC remap, PIT timer, PS/2 keyboard IRQ</title>
<updated>2026-07-31T00:28:10Z</updated>
<author>
<name>salmonik</name>
<email>salmonik@tuta.io</email>
</author>
<published>2026-07-31T00:28:10Z</published>
<link rel='alternate' type='text/html' href='https://git.2137697.xyz/rs-dos/commit/?id=af8d5aa4538ac71f11a5418ef94ae478868a0484'/>
<id>urn:sha1:af8d5aa4538ac71f11a5418ef94ae478868a0484</id>
<content type='text'>
- IDT with 256 entries, loaded via lidt (CS read from current context)
- PIC 8259A remapped to vectors 32-47, timer+keyboard IRQs unmasked
- PIT channel 0 at ~100 Hz (mode 2, rate generator)
- PS/2 keyboard IRQ (IRQ1 → vector 33): reads port 0x60, pushes byte
  to lock-free SPSC ring buffer
- Timer IRQ (IRQ0 → vector 32): sends EOI, increments tick counter
- ps2::poll_key() now reads from ring buffer with cli/sti+hlt for
  race-free sleep (instead of busy-polling the data port)
- build.rs: use idiomatic Result&lt;_, Box&lt;dyn Error&gt;&gt; return type
- tools/qemu.sh: fix SC2207 shellcheck warning
</content>
</entry>
</feed>
