Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6b8ce05
feat(aweos): add bounded PS/2 keyboard and mouse protocol runtime
ARARAT33 Aug 26, 2026
b8a8ee3
feat(aweos): wire PS/2 runtime driver into kernel drivers
ARARAT33 Aug 26, 2026
d6438a7
feat(aweos): implement bounded initd runtime supervisor
ARARAT33 Aug 26, 2026
832d6e9
feat(aweos): wire initd runtime supervisor into service crate
ARARAT33 Aug 26, 2026
67cf4c9
feat(aweos): add bounded appd execution supervisor
ARARAT33 Aug 26, 2026
e164b3a
feat(aweos): wire appd runtime supervisor into application service
ARARAT33 Aug 26, 2026
8c1cec7
feat(aweos): add bounded runtime graphics and window manager core
ARARAT33 Aug 26, 2026
a5966ff
feat(aweos): expose integrated runtime graphics/window manager
ARARAT33 Aug 26, 2026
7353822
fix(aweos): gate PS/2 port I/O to x86_64 targets
ARARAT33 Aug 26, 2026
9c001b9
feat(aweos): replace demo userspace entry with validated runtime handoff
ARARAT33 Aug 26, 2026
5968158
feat(aweos): connect kernel runtime to native service planes
ARARAT33 Aug 26, 2026
8908849
feat(aweos): integrate process, initd, appd, UI and input runtime
ARARAT33 Aug 26, 2026
5097330
fix(aweos): map PS2 key codes explicitly into runtime events
ARARAT33 Aug 26, 2026
4420b29
feat(aweos): expose integrated system runtime coordinator
ARARAT33 Aug 26, 2026
437372a
fix(aweos): expose runtime pointer target for UI integration tests
ARARAT33 Aug 26, 2026
abb49ec
feat(aweos): add bounded Ethernet IPv4 UDP packet engine
ARARAT33 Aug 26, 2026
eb056aa
fix(aweos): validate IPv4 checksum over zeroed checksum field
ARARAT33 Aug 26, 2026
23d7ad7
feat(aweos): integrate bounded Ethernet IPv4 UDP engine into netd
ARARAT33 Aug 26, 2026
e95e1a3
feat(aweos): add bounded block-backed persistent file store
ARARAT33 Aug 26, 2026
99d924c
feat(aweos): integrate block-backed persistent file store into storag…
ARARAT33 Aug 26, 2026
1764597
fix(aweos): restore strict userspace pointer and syscall validation
ARARAT33 Aug 26, 2026
9c91a0b
feat(aweos): add native AYUI runtime adapter with dynamic framebuffer…
ARARAT33 Aug 26, 2026
a2f6417
feat(aweos): export native AYUI runtime adapter
ARARAT33 Aug 26, 2026
7a1b4f4
feat(aweos): add persistent filesystem namespace and mount manager
ARARAT33 Aug 26, 2026
7cc2b3c
feat(aweos): expose persistent namespace manager
ARARAT33 Aug 26, 2026
c04f33c
ci(aweos): run feature branch validation and headless QEMU
ARARAT33 Aug 26, 2026
107eb55
fix(aweos): enable keyboard and mouse IRQs
ARARAT33 Aug 26, 2026
f6bc780
feat(aweos): add interrupt-safe PS/2 input event broker
ARARAT33 Aug 26, 2026
374ce01
feat(aweos): register interrupt-safe PS2 input broker
ARARAT33 Aug 26, 2026
a1fd75d
feat(aweos): route PS2 IRQ1 and IRQ12 into input broker
ARARAT33 Aug 26, 2026
9cbaa39
feat(aweos): add bounded desktop shell application lifecycle
ARARAT33 Aug 26, 2026
02200bb
feat(aweos): expose integrated desktop shell runtime
ARARAT33 Aug 26, 2026
f4336d0
feat(aweos): bind storage namespaces and network daemon to system run…
ARARAT33 Aug 26, 2026
5f2903e
feat(aweos): connect end-user runtime orchestration to x86 boot path
ARARAT33 Aug 26, 2026
757b27c
fix(aweos): remove unused app runtime import
ARARAT33 Aug 26, 2026
0e2d7e4
fix(aweos): persist system runtime state across boot handoff
ARARAT33 Aug 26, 2026
ca0affd
fix(aweos): correct IPv4 parser comparison and module attributes
ARARAT33 Aug 26, 2026
683d0ef
fix(aweos): make bounded file store copy-safe for static mount table
ARARAT33 Aug 26, 2026
2a85303
fix(aweos): correct IPv4 packet parser comparison
ARARAT33 Aug 26, 2026
1c84983
fix(aweos): make initd runtime module warning-free
ARARAT33 Aug 26, 2026
0d3d05f
fix(aweos): remove module-level attributes and unused imports
ARARAT33 Aug 26, 2026
7044a85
fix(aweos): export PS2 key event types through driver facade
ARARAT33 Aug 26, 2026
d5175cf
fix(aweos): use public initd runtime dependency capacity
ARARAT33 Aug 26, 2026
1854666
fix(aweos): scope runtime imports to x86 kernel target
ARARAT33 Aug 26, 2026
eea4d63
ci(aweos): add real graphical QEMU smoke gate
ARARAT33 Aug 26, 2026
f758fd4
fix(aweos): provide bounded no-std allocator for kernel linkage
ARARAT33 Aug 26, 2026
c427160
fix(aweos): keep boot status ABI exhaustive for kernel-bin
ARARAT33 Aug 26, 2026
aa7c49d
ci(aweos): enforce latest runtime QEMU milestones
ARARAT33 Aug 26, 2026
9a9681f
feat(aweos): bind service and app launch to process manager
ARARAT33 Aug 26, 2026
e0a6271
fix(aweos): keep PIC cascade enabled for PS2 mouse IRQ12
ARARAT33 Aug 26, 2026
8458d35
fix(aweos): gate kernel alloc error handler to bare-metal target
ARARAT33 Aug 26, 2026
8a4d02a
fix(aweos): correct bare-metal allocator pointer expression
ARARAT33 Aug 26, 2026
b4ad2a1
fix(aweos): gate syscall write pointer to bare-metal target
ARARAT33 Aug 26, 2026
d3b76c7
feat(aweos): cryptographically bind full AWOS package payload
ARARAT33 Aug 26, 2026
d3294b1
fix(aweos): preserve app crash-loop failure history across restarts
ARARAT33 Aug 26, 2026
2010cf6
fix(aweos): preserve service crash-loop failure history across restarts
ARARAT33 Aug 26, 2026
1fbe2df
fix(aweos): bind full AWOS package bytes to publisher signature
ARARAT33 Aug 26, 2026
f276037
feat(aweos): expose storaged state for persistent metadata codec
ARARAT33 Aug 26, 2026
26dd3f9
feat(aweos): add checksummed persistent storaged metadata codec
ARARAT33 Aug 26, 2026
bb85101
feat(aweos): connect storaged persistence to system runtime
ARARAT33 Aug 26, 2026
0dad047
fix(aweos): align storage persistence with namespace error contract
ARARAT33 Aug 26, 2026
dcf4e83
fix(aweos): correct persistent storaged state header layout
ARARAT33 Aug 26, 2026
6728901
fix(aweos): correct AWOS validation syntax and full-payload admission…
ARARAT33 Aug 26, 2026
5f974ad
feat(aweos): keep runtime integration clippy-clean and persistent
ARARAT33 Aug 26, 2026
93e51dc
chore(aweos): align CI evidence gate with 40-45 runtime milestone
ARARAT33 Aug 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 38 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: AWEOS CI Pipeline

on:
push:
branches: [ main, master ]
branches: [ main, master, 'feat/**' ]
pull_request:
branches: [ main, master ]

Expand All @@ -16,31 +16,58 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust Toolchain
run: |
rustup show
rustup target add x86_64-unknown-none
rustup target add x86_64-unknown-uefi

- name: Check Workspace Compilation
run: cargo check --workspace --all-targets

- name: Run Workspace Tests
run: cargo test --workspace

run: cargo test --workspace --all-targets
- name: Validate Formatting
run: cargo fmt --all --check

- name: Validate Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Install QEMU and Xvfb
run: sudo apt-get update && sudo apt-get install -y qemu-system-x86 xvfb
- name: Build Boot Images
run: ./scripts/build-images.sh

- name: Verify Image Artifacts
run: |
test -f dist/aweos-x86_64.iso
test -f dist/aweos-x86_64.img
test -f dist/aweos-uefi.img
test -f dist/aweos-bios.img
test -f build/aweos-x86_64.iso
test -f build/aweos-x86_64.img
echo "All boot artifacts successfully generated and verified."
- name: Headless QEMU Smoke Test
timeout-minutes: 3
run: |
qemu-system-x86_64 --version
set +e
timeout 30s qemu-system-x86_64 -display none -serial stdio -no-reboot -no-shutdown -kernel target/x86_64-unknown-none/debug/aweos > qemu-serial.log 2>&1
status=$?
set -e
cat qemu-serial.log
test $status -eq 124 || test $status -eq 0
grep -q "AWEOS: kernel state = RUNNING" qemu-serial.log
grep -q "AWEOS: entering Ring 3" qemu-serial.log
grep -q "AWEOS: persistent initd/appd/storage/UI runtime control plane started" qemu-serial.log
- name: Graphical QEMU Startup Smoke Test
timeout-minutes: 3
run: |
set +e
timeout 30s xvfb-run -a qemu-system-x86_64 -display gtk -serial file:qemu-graphical.log -no-reboot -no-shutdown -kernel target/x86_64-unknown-none/debug/aweos
status=$?
set -e
cat qemu-graphical.log || true
test $status -eq 124 || test $status -eq 0
grep -q "AWEOS: kernel state = RUNNING" qemu-graphical.log
- name: Upload QEMU Evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: aweos-qemu-evidence
path: |
qemu-serial.log
qemu-graphical.log
if-no-files-found: warn
6 changes: 6 additions & 0 deletions kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ path = "src/lib.rs"
[dependencies]
awe-boot-protocol = { workspace = true }
awe-ayui = { workspace = true }
awe-initd = { workspace = true }
awe-appd = { workspace = true }
awe-driverd = { workspace = true }
awe-netd = { workspace = true }
awe-storaged = { workspace = true }
awe-securityd = { workspace = true }
104 changes: 104 additions & 0 deletions kernel/src/arch/x86_64/input.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#![no_std]

use core::sync::atomic::{AtomicBool, AtomicU8, AtomicUsize, AtomicU64, Ordering};
use crate::drivers::{KeyCode, Ps2Event};

pub const CAPACITY: usize = 128;
static HEAD: AtomicUsize = AtomicUsize::new(0);
static TAIL: AtomicUsize = AtomicUsize::new(0);
static QUEUE: [AtomicU64; CAPACITY] = [const { AtomicU64::new(0) }; CAPACITY];
static KB_EXTENDED: AtomicBool = AtomicBool::new(false);
static KB_BREAK: AtomicBool = AtomicBool::new(false);
static MOUSE_INDEX: AtomicU8 = AtomicU8::new(0);
static MOUSE_0: AtomicU8 = AtomicU8::new(0);
static MOUSE_1: AtomicU8 = AtomicU8::new(0);
static MOUSE_2: AtomicU8 = AtomicU8::new(0);

fn enqueue(encoded: u64) -> bool {
let tail = TAIL.load(Ordering::Relaxed);
let next = (tail + 1) % CAPACITY;
if next == HEAD.load(Ordering::Acquire) { return false; }
QUEUE[tail].store(encoded, Ordering::Release);
TAIL.store(next, Ordering::Release);
true
}

pub fn dequeue() -> Option<Ps2Event> {
let head = HEAD.load(Ordering::Relaxed);
if head == TAIL.load(Ordering::Acquire) { return None; }
let encoded = QUEUE[head].load(Ordering::Acquire);
HEAD.store((head + 1) % CAPACITY, Ordering::Release);
if encoded >> 63 == 0 {
let code = (encoded & 0xffff) as u8;
let pressed = ((encoded >> 16) & 1) != 0;
Some(Ps2Event::Key { code: map_key(code), pressed })
} else {
let dx = (encoded as u16) as i16;
let dy = ((encoded >> 16) as u16) as i16;
let buttons = ((encoded >> 32) & 0xff) as u8;
Some(Ps2Event::Pointer { dx, dy, buttons })
}
}

fn map_key(code: u8) -> KeyCode {
match code {
0x01 => KeyCode::Escape, 0x0D => KeyCode::Tab, 0x1C => KeyCode::Enter,
0x0E => KeyCode::Backspace, 0x39 => KeyCode::Space, 0x4B => KeyCode::Left,
0x4D => KeyCode::Right, 0x48 => KeyCode::Up, 0x50 => KeyCode::Down,
other => KeyCode::Unknown(other),
}
}

pub fn irq_keyboard_byte(byte: u8) -> bool {
match byte {
0xE0 => { KB_EXTENDED.store(true, Ordering::Relaxed); false }
0xF0 => { KB_BREAK.store(true, Ordering::Relaxed); false }
code => {
let extended = KB_EXTENDED.swap(false, Ordering::Relaxed);
let pressed = !KB_BREAK.swap(false, Ordering::Relaxed);
let code = if extended { code } else { code };
let mut encoded = code as u64;
if pressed { encoded |= 1 << 16; }
enqueue(encoded)
}
}
}

pub fn irq_mouse_byte(byte: u8) -> bool {
let index = MOUSE_INDEX.load(Ordering::Relaxed) as usize;
if index == 0 && byte & 0x08 == 0 { return false; }
match index {
0 => MOUSE_0.store(byte, Ordering::Relaxed),
1 => MOUSE_1.store(byte, Ordering::Relaxed),
2 => MOUSE_2.store(byte, Ordering::Relaxed),
_ => return false,
}
if index < 2 { MOUSE_INDEX.store((index + 1) as u8, Ordering::Relaxed); return false; }
MOUSE_INDEX.store(0, Ordering::Relaxed);
let flags = MOUSE_0.load(Ordering::Relaxed);
if flags & 0xC0 != 0 { return false; }
let raw_x = MOUSE_1.load(Ordering::Relaxed) as i16;
let raw_y = MOUSE_2.load(Ordering::Relaxed) as i16;
let dx = if flags & 0x10 != 0 { raw_x - 256 } else { raw_x };
let dy_raw = if flags & 0x20 != 0 { raw_y - 256 } else { raw_y };
let dy = -dy_raw;
let encoded = (dx as u16 as u64) | ((dy as u16 as u64) << 16) | (((flags & 7) as u64) << 32) | (1u64 << 63);
enqueue(encoded)
}

#[cfg(test)]
mod tests {
use super::*;
#[test]
fn keyboard_irq_generates_decoded_event() {
assert!(irq_keyboard_byte(0x1C));
assert_eq!(dequeue(), Some(Ps2Event::Key { code: KeyCode::Enter, pressed: true }));
irq_keyboard_byte(0xF0); irq_keyboard_byte(0x1C);
assert_eq!(dequeue(), Some(Ps2Event::Key { code: KeyCode::Enter, pressed: false }));
}
#[test]
fn mouse_irq_generates_signed_event() {
assert!(!irq_mouse_byte(0x09)); assert!(!irq_mouse_byte(0xFE)); assert!(irq_mouse_byte(0x02));
assert_eq!(dequeue(), Some(Ps2Event::Pointer { dx: -2, dy: -2, buttons: 1 }));
}
}
38 changes: 14 additions & 24 deletions kernel/src/arch/x86_64/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,36 @@
use super::idt::Idt;

pub const TIMER_VECTOR: u8 = 32;
pub const KEYBOARD_VECTOR: u8 = 33;
pub const MOUSE_VECTOR: u8 = 44;

/// Remaps the 8259 PIC so IRQs 0..15 land on IDT vectors 32..47.
pub unsafe fn init_pic() {
unsafe {
use super::{io_in8, io_out8};

// Save masks
let mask1 = io_in8(0x21);
let mask2 = io_in8(0xA1);

// ICW1: Start initialization in cascade mode
io_out8(0x20, 0x11);
io_out8(0xA0, 0x11);

// ICW2: Vector offsets (32 for master, 40 for slave)
io_out8(0x21, 0x20);
io_out8(0xA1, 0x28);

// ICW3: Cascade setup
io_out8(0x21, 0x04);
io_out8(0xA1, 0x02);

// ICW4: 8086 mode
io_out8(0x21, 0x01);
io_out8(0xA1, 0x01);

// Restore masks (or unmask IRQ0 timer & IRQ1 keyboard)
io_out8(0x21, mask1 & !0x01); // unmask IRQ0 (timer)
io_out8(0xA1, mask2);
// Enable IRQ0 timer, IRQ1 keyboard, and IRQ2 cascade for slave IRQ12 mouse.
io_out8(0x21, mask1 & !0x07);
io_out8(0xA1, mask2 & !0x10);
}
}

pub unsafe fn pic_send_eoi(irq: u8) {
unsafe {
use super::io_out8;
if irq >= 8 {
io_out8(0xA0, 0x20);
}
if irq >= 8 { io_out8(0xA0, 0x20); }
io_out8(0x20, 0x20);
}
}

/// Installs the minimal early interrupt surface. The timer handler remains an
/// explicit ABI boundary so scheduler code can be attached without changing
/// IDT construction.
pub fn install_early_interrupts(idt: &mut Idt, code_selector: u16, timer_handler: u64) {
idt.set_handler(TIMER_VECTOR, timer_handler, code_selector);
}
Expand All @@ -56,12 +41,17 @@ pub fn install_early_interrupts(idt: &mut Idt, code_selector: u16, timer_handler
mod tests {
use super::*;
extern "C" fn timer() {}

#[test]
fn vectors_match_pic_remap() {
assert_eq!(TIMER_VECTOR, 32);
assert_eq!(KEYBOARD_VECTOR, 33);
assert_eq!(MOUSE_VECTOR, 44);
}
#[test]
fn timer_vector_is_installed() {
let mut idt = Idt::new();
install_early_interrupts(&mut idt, 0x08, timer as *const () as usize as u64);
assert!(idt.is_present(TIMER_VECTOR));
assert!(!idt.is_present(33));
assert!(!idt.is_present(KEYBOARD_VECTOR));
}
}
}
Loading
Loading