summaryrefslogtreecommitdiffstats
path: root/rsnix/src/interrupts.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-07-31 02:58:31 +0200
committersalmonik <salmonik@tuta.io>2026-07-31 02:58:31 +0200
commit6a5c32fa6ae8ec34e3e5b44d7e5a78ded8fe729b (patch)
treeed59a5bd59a94b3a731b28c68c507f18afc44b0b /rsnix/src/interrupts.rs
parentauto-version all strings from Cargo.toml via env!("CARGO_PKG_VERSION") (diff)
downloadrs-dos-6a5c32fa6ae8ec34e3e5b44d7e5a78ded8fe729b.tar.gz
rs-dos-6a5c32fa6ae8ec34e3e5b44d7e5a78ded8fe729b.zip
restructure: rsnix kernel + shell crate + rsdos entry point
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").
Diffstat (limited to '')
-rw-r--r--rsnix/src/interrupts.rs (renamed from src/interrupts.rs)4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interrupts.rs b/rsnix/src/interrupts.rs
index 90d5bbb..8f2acd7 100644
--- a/src/interrupts.rs
+++ b/rsnix/src/interrupts.rs
@@ -174,7 +174,7 @@ impl KeyBuf {
174 let h = self.head.load(Ordering::Acquire); 174 let h = self.head.load(Ordering::Acquire);
175 let next = t.wrapping_add(1); 175 let next = t.wrapping_add(1);
176 // Full if the distance between head and tail == capacity (256). 176 // Full if the distance between head and tail == capacity (256).
177 if next.wrapping_sub(h) as u16 > 255 { 177 if next.wrapping_sub(h) > 255 {
178 return; // drop — ring is full 178 return; // drop — ring is full
179 } 179 }
180 unsafe { 180 unsafe {
@@ -362,7 +362,7 @@ pub fn init() {
362 362
363 // Build the IDTR pseudo-descriptor. 363 // Build the IDTR pseudo-descriptor.
364 IDTR = [ 364 IDTR = [
365 (256u16 * 16 - 1) as u16, // limit = 256*16 - 1 365 ((256u16 * 16 - 1)), // limit = 256*16 - 1
366 idt_ptr as u16, // base lo 366 idt_ptr as u16, // base lo
367 (idt_ptr as u64 >> 16) as u16, // base mid 367 (idt_ptr as u64 >> 16) as u16, // base mid
368 (idt_ptr as u64 >> 32) as u16, // base hi 368 (idt_ptr as u64 >> 32) as u16, // base hi