AHCI Poll-only Bootstrap Implementation#1
Conversation
- Added ahci_wait_status() for robust register polling in ahci.c. - Updated AHCI and SATAPI drivers to use poll-only handshake during boot. - Added volatile qualifiers to HBA/Port structure members. - Implemented 1,000,000-iteration safety timeout with forensic_panic. - Added handoff log message in main.c and fixed vga_print declaration. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…Features - AHCI: Implemented robust `ahci_wait_status` for interrupt-independent boot. - FatFS: Implemented 'Buffer Shield' (heap allocation) and mandatory Read-Only checks. - VDISK: Implemented `is_sovereign_disk` with heap-safe sector verification. - RSL: Centralized command dispatcher in `rsl_commands.c` with script support. - Documentation: Consolidated all manuals into `docs/` with new Kernel and Hardware guides. - Build System: Updated `fat_tool.py` to inject `install.rsl` and `boot.rsl` into the ramdisk. - Kernels: Fixed stack overflow in `vdisk.c` and memory leak in `ff.c`. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Added all system manuals in docs/ and consolidated architecture guides. - Restored and finalized the Makefile for complete project building. - Hardened AHCI polling and FatFS write protection. - Implemented robust script execution for install.rsl and boot.rsl. - Standardized AHCI hardware structures in include/ahci_hw.h. - Fixed command parser to handle various line endings in RSL scripts. - Verified system build and ramdisk injection logic. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- AHCI: Implemented robust dual-register polling with 10M iteration timeouts. - Hardening: Verified physical address usage for all hardware base registers. - Scheduling: Ensured correct init order and explicitly added shell handover logs. - Features: Consolidated all RSL commands and manuals into the docs/ directory. - Build: Restored and verified the Makefile for complete project integration. - Fixes: Resolved stack overflow and memory leak issues in disk/filesystem layers. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…ell Launch - AHCI: Enforced raw physical addresses for PxCLB and PxFB using vmm_get_phys. - AHCI: Implemented 10M-iteration timeouts for all hardware polling loops. - Tasking: Added tasking_create_process() for explicit shell registration. - Main: Updated Loader Phase ritual to explicitly launch shell and log handoff. - Hardening: Moved large buffers to heap in FatFS and improved memory alignment. - Scripts: Updated fat_tool.py to correctly inject RSL scripts into FAT32 ramdisk. - Documentation: Consolidated all system manuals in the docs/ directory. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `ahci_wait_status` with manual register polling and 1M loop timeout. - Replaced interrupt-based logic in AHCI/SATAPI read/write operations with polling during EVENT_INIT. - Verified physical address mapping (DMA) for PxCLB, PxFB, and PxCTBA registers. - Updated kernel entry point in `main.c` to handle volume discovery and log polling success. - Hardened AHCI memory allocation with strict 1KB/256B alignment requirements. - Added forensic panic trigger for AHCI hardware timeouts. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `ahci_wait_status` with manual register polling and 1M loop timeout. - Replaced interrupt-based logic in AHCI/SATAPI read/write operations with polling during EVENT_INIT. - Verified physical address mapping (DMA) for PxCLB, PxFB, and PxCTBA registers. - Updated kernel entry point in `main.c` to handle volume discovery and log polling success. - Hardened AHCI memory allocation with strict 1KB (CLB) and 256B (FB) alignment. - Created `include/panic.h` with `PANIC_ON` and `ASSERT` macros. - Integrated global panic checks into Memory (Slab) and Tasking initialization paths. - Replaced manual `forensic_panic` calls with unified macro-based checking. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…f operations - Hard-coded task registration in `tasking_init()` for Idle (Slab 0), System (Slab 1), and Shell (Slab 2). - Delayed scheduler ignition by moving `unice64_scheduler_init()` to the end of `tasking_init()`. - Stripped `ahci_hardware_audit` from `system_task` to prevent race conditions during boot. - Refactored `tasking_create_process` to remove dynamic string operations for boot stability. - Aligned boot sequence in `main.c` by calling `tasking_create_process` before `tasking_init`. - Enforced `cli` until the scheduler is ready for system ticks. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Created `docs/startup.md` detailing the OSx2 bootstrapper and AHCI polling bootstrap. - Integrated `startup.md` into the documentation index. - Hard-wired task registration in `tasking.c` for Idle, System, and Shell tasks. - Moved `BOOT.RSL` execution from `main.c` to `shell_main`. - Implemented `kernel_scanning` lock in `sys_yield` to ensure boot log atomicity. - Verified 16-byte stack alignment in `scheduler.c` for SysV ABI compliance. - Refactored `main.c` to align with the Sovereign Order of Operations. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Rewrote AHCI read/write functions with manual bit-shifting and strict `port->ci` polling. - Refined AHCI hardware structures in `include/ahci_hw.h` for deterministic MMIO access. - Implemented `serial_print_hex32` for high-resolution register debugging. - Created `docs/startup.md` and integrated it into the system index. - Hard-wired tasking engine with linear registration (Idle, System, Shell). - Delegated `BOOT.RSL` execution to the Shell and implemented yield-lock for boot atomicity. - Integrated global panic checks via `PANIC_ON` and `PANIC_ON_ERR` macros. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented "Transient Slab Execution" for `print()` using micro-slabs (3-15). - Introduced "RDI-Passing Protocol" for safe argument passing to transient tasks. - Hardened tasking engine with `in_use` bitmask for reliable slot reclamation. - Refactored `print()` to use heap-allocated request structures from Slab 0, ensuring re-entrancy. - Replaced AHCI initialization panics with "Degraded Mode" fallback. - Exhaustively updated `docs/startup.md` with descriptive code snippets for all boot phases. - Enforced strict linear task registration (Idle, System, Shell) for boot stability. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implement poll-only AHCI bootstrap with silicon rejection halting. - Add "Degraded Mode" fallback for systems without AHCI hardware. - Introduce bitmask-based task reclamation and RDI-passing protocol. - Refactor `print()` for transient slab execution and re-entrancy. - Harden FatFS with persistent Sovereign Slab buffers (No-Bet Logic). - Provide exhaustive Startup Manual with code snippets in `docs/startup.md`. - Stabilize tasking initialization with linear registration. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Transitioned all hardware loops (AHCI, Serial) to 100ms time-based timeouts using PIT. - Implemented robust bitmask-based task management and reaper in Unice64 scheduler. - Enforced RDI-Passing Protocol for transient tasks to ensure thread-safe re-entrancy. - Hard-wired synchronous `print()` fallback during boot/scanning to prevent init-stalls. - Hardened FatFS by removing dynamic allocations and using persistent Sovereign Slabs. - Added exhaustive Startup Manual documentation with technical code snippets. - Implemented graceful Degraded Mode fallback for systems without AHCI hardware. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Refactored AHCI driver to use 1,000,000 iteration polling loops during initialization, removing interrupt dependencies.
- Implemented `ahci_wait_status` with `panic("AHCI_POLL_TIMEOUT")` for hardware safety.
- Transitioned kernel memory model from High-Half (-2GB) to 2MB physical base in `boot/linker.ld`.
- Verified that `shell_main` is correctly mapped to physical RAM.
- Ensured all AHCI DMA structures utilize raw physical addresses via `vmm_get_phys`.
- Updated kernel documentation to reflect the new Physical Memory Model.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Refactored AHCI driver to use 1,000,000 iteration polling loops during initialization, removing interrupt dependencies.
- Implemented `ahci_wait_status` with `panic("AHCI_POLL_TIMEOUT")` for hardware safety.
- Restored kernel memory model to High-Half (-2GB) in `boot/linker.ld` for Limine compliance.
- Verified that `shell_main` is correctly mapped to the High-Half virtual address (0xffffffff8000b96b).
- Ensured all AHCI DMA structures utilize raw physical addresses via `vmm_get_phys` accounting for high-half offsets.
- Updated kernel documentation to reflect the High-Half Memory Model architecture.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Restored High-Half Memory Model (-2GB) for Limine compatibility. - Fixed AHCI Command Header struct alignment (CTBA at offset 0x08). - Implemented 'Buffer Shield' in FatFS using `slab_alloc_persistent` to prevent heap exhaustion. - Refined AHCI polling with 'Degraded Mode' fallbacks instead of immediate panics. - Hardened transient task RDI protocol for safe system logging. - Updated documentation and verified earthly physical addressing for all DMA. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Refactored `forensic_panic` in `kernel/libs/core/panic.c` to use a single `print` call for VGA console output and a single `serial_write_str` call for serial output. - Implemented an atomic report builder using a static 2048-byte buffer to avoid interleaved logs during system failure. - Inlined hexadecimal formatting for USB registers to maintain the atomicity of the panic report. - Enforced `tasking_set_scanning(true)` and `cli()` at the start of the panic sequence for synchronous, uninterrupted logging. - Verified that the system builds and the logic is architecturally sound. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Refactored `forensic_panic` in `kernel/libs/core/panic.c` to use single atomic `print` and `serial_write_str` calls via a static 2048-byte buffer. - Implemented capture and display of full CPU register state: RAX-R15, RIP, RSP, RBP, RFLAGS, CS, and SS. - Added capture and display of Control Registers: CR0, CR2, CR3, and CR4. - Included system telemetry in the panic report: System Ticks, Active Task ID, and HHDM offset. - Removed USB register scanning per updated requirements. - Utilized inlined hex formatting to ensure atomic reporting during system failure. - Enforced synchronous logging by disabling interrupts and setting `tasking_set_scanning(true)`. - Verified the build and verified earthly physical addressing for High-Half compliance. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…d DRAWtest - Enhanced `forensic_panic` with comprehensive CPU (RAX-R15, RIP, flags) and system (CR3, ticks, Task ID) telemetry in an atomic burst. - Hardened `unice64_context_switch` RSP validation to support HHDM-mapped transient task stacks. - Implemented `DRAWtest` command in RSL Shell: draws an Emerald square with a 2-second delay before clearing the screen. - Reinforced FatFS with a 'Buffer Shield' (`slab_alloc_persistent`) to prevent stack smashing and Slab 0 exhaustion. - Verified High-Half mapping and successful kernel build. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Resolved all compiler warnings in `usb_xhci.c` by removing unused variables and casting unused parameters to void. - Enhanced `DRAWtest` command with a visual verification signal label. - Audited `boot/linker.ld` and enforced 8-byte alignment for the `.limine_requests` section. - Fixed redundant transient task reaper logic in `unice64_schedule`. - Optimized `DRAWtest` to include a 2-second delay for manual verification. - Verified final kernel build and source artifact consistency. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…Wtest - Refactored `forensic_panic` to capture comprehensive CPU registers (RAX-R15, RIP, flags), Control Registers (CR0-CR4), and system telemetry. - Hardened `unice64_context_switch` with dynamic RSP validation using `g_hhdm_offset` to support transient task stacks. - Refined AHCI polling to use a precise 100ms time-based timeout via `pit_wait_ms(1)`. - Implemented `DRAWtest` command in RSL Shell for visual verification with a 2-second throttled display. - Enforced 8-byte alignment for Limine requests in `boot/linker.ld`. - Resolved all compiler warnings in hardware drivers and verified the build. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…& HHDM Stability - Refactored `print` in `console.c` to use "Transient Slab Execution" and the "RDI-Passing Protocol" for thread-safe console logging. - Hardened `unice64_context_switch` with dynamic RSP validation using `g_hhdm_offset`. - Refined AHCI polling to use a precise 100ms PIT-based timeout. - Implemented `DRAWtest` visual verification command in RSL Shell. - Enhanced `forensic_panic` with comprehensive CPU and system telemetry. - Enforced 8-byte alignment for Limine protocol requests in the linker script. - Purged redundant scheduler cleanup logic for optimal performance. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Created an exhaustive list of all RSL API calls in `docs/rsl_api.md`. - Documented ARC memory management, String API, Console I/O, and VFS wrappers. - Added a complete reference for all RSL Shell commands, including `DRAWtest` and `scan`. - Verified all documented calls against `include/rsl.h` and the command dispatcher. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…test - Replaced transient print tasks with an asynchronous `print_service_task` for maximum stability. - Implemented a robust stack-based context switch model in `context_switch.s`. - Hardened forensic panic with full CPU state, control registers, and telemetry via direct hardware writes. - Enhanced `DRAWtest` with a visual verification signal and throttled display. - Restored High-Half Memory Model compliance and resolved build warnings. - Documented all RSL API calls and Shell commands in `docs/rsl_api.md`. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `ahci_wait_status` for non-blocking hardware polling during EVENT_INIT. - Stabilized multitasking with a centralized Sovereign Service Orchestrator. - Hardened context switching with forensic RSP validation against HHDM bounds. - Implemented 'Buffer Shield' in FatFS to prevent stack exhaustion in high-half. - Finalized RSL Shell API including DRAWtest, stamp, and hardware busy checks. - Synchronized documentation in docs/rsl_api.md and docs/startup.md. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Enforced non-blocking AHCI polling during boot registration. - Stabilized the Active-Relay multitasking engine with a centralized Service Orchestrator. - Hardened the context switcher with forensic RSP bounds checking. - Integrated the full RSL command set with hardware-sync logic. - Verified High-Half linker stability and memory segment alignment. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `scheduler_force_task` for prioritized worker handoffs. - Refactored `services.c` and `console.c` to spawn transient worker tasks per request. - Enforced a 3-task minimum (Idle, System, Shell) for scheduler stability. - Aligned `slab_header_t` to 32 bytes for robust recycling. - Hardened worker stack frame layout for correct RDI argument passing. - Verified poll-only AHCI bootstrap reaches the RSL Shell. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented circular request queue in `services.c` for sequential hardware access. - Implemented print queue in `console.c` to prevent output clobbering and task exhaustion. - Refactored workers to process queues until empty before transitioning to zombie. - Hardened queue safety with overflow signals and non-blocking enqueuing. - Integrated `scheduler_force_task` for immediate worker execution. - Verified system stability and ordered execution under load. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…eues - Implemented Timer-Gated Yielding: `sys_yield()` signals intent, APIC timer triggers switch. - Implemented circular request queue in `services.c` for sequential I/O. - Implemented circular print queue in `console.c` with overflow signals. - Refactored `irq_timer_handler` to enforce the yield-timer gate. - Hardened task registration and transient worker stack frames. - Verified system stability and ordered execution in High-Half model. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented Timer-Gated Yielding: `sys_yield()` signals intent, APIC timer triggers switch. - Implemented circular request queue in `services.c` for sequential I/O. - Implemented circular print queue in `console.c` with overflow signals. - Enforced 16-byte stack alignment for x86_64 ABI compliance during task initialization. - Refactored `irq_timer_handler` to enforce the yield-timer gate. - Isolated worker tasks into dedicated Slabs (3 for Print, 4 for Service) for memory stability. - Verified system stability and ordered execution in High-Half model. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `tasking_spawn_app` for dynamic binary loading from VFS. - Refined `unice64_schedule` to strictly skip tasks in `TASK_WAITING` state. - Implemented `rsl_exit()` API to allow clean task self-termination (Zombie state). - Extended Sovereign Orchestrator with `REQ_APP_SPAWN` request type. - Added `exec` command to RSL Shell for dynamic application execution. - Added `shutdown` command and updated `help` menu for better system control. - Verified system stability and High-Half memory model integrity. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Added `parent_id` to `task_t` for lineage tracking. - Implemented Priority Selection in `unice64_schedule`: always check apps (1-15) before falling back to Idle (0). - Implemented "Wake-on-Exit" in `rsl_exit()`: immediately sets parent to `TASK_READY` and forces a switch. - Hardened `unice64_schedule` with a "Last Second Audit" to avoid unnecessary idling. - Reserved Slabs 0-4 for core components and isolated transient tasks to Slab 5+. - Verified High-Half build stability and successful RSL Shell boot. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented "Instant Relay" (Wake-on-Exit): Tasks now wake their parents immediately upon completion. - Refactored AHCI driver to be silent on VGA (logging moved to COM1 Serial). - Implemented "Live Check" in AHCI audit: Skip busy ports to avoid collision. - Implemented Non-Blocking AHCI Polling: `ahci_wait_status` now yields during I/O. - Optimized Scheduler: Application tasks (1-15) are prioritized over Idle (0). - Reserved Slabs 0-4 for core services and isolated transient tasks to Slab 5+. - Enforced 16-byte stack alignment and hardened `iretq` frame initialization. - Added `exec`, `exit`, and `shutdown` commands to RSL Shell. - Resolved all implicit function warnings and verified High-Half build stability. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Added `TASK_INPUT_WAIT` state to allow waiting tasks to remain runnable for input polling. - Refactored `input()` to utilize `TASK_INPUT_WAIT` instead of `TASK_WAITING`. - Updated `unice64_schedule` to prioritize and run tasks in `TASK_INPUT_WAIT` state. - Enhanced Sovereign Telemetry Monitor to display "INPUT_WAIT" tag for active tasks. - Hardened scheduler selection and fallback logic to include interactive tasks. - Verified build stability and High-Half integrity. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Reduced APIC timer count from 1,000,000 to 500,000 in `main.c`, `scheduler.c`, and `interrupts.s`. - Doubled the timer interrupt frequency for improved interactive responsiveness. - Reduced yielding overhead in the clock-synchronous multitasking model. - Verified build stability and consistent value application. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented XHCI controller initialization (Reset, Rings, Contexts). - Implemented USB HID-to-ASCII scancode mapping. - Implemented `usb_keyboard_poll` to process XHCI Transfer Events. - Integrated USB keyboard polling into `get_char()` alongside PS/2 and Serial. - Added BIOS-to-OS handover and disabled legacy PS/2 emulation. - Enforced High-Half physical address translation for all USB DMA structures. - Verified build stability and resolved compiler warnings. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…hancements - Implemented dynamic Alias Router in `vfs.c`: `BOOT:/`, `DISKx:/`, and `x:/` now map to physical drives automatically. - Refactored `main.c` boot discovery to utilize dynamic aliasing, removing redundant VFS nodes. - Added `TASK_INPUT_WAIT` state to ensure interactive tasks remain runnable during input polling. - Integrated XHCI USB Keyboard support into `get_char()` alongside PS/2 and Serial. - Upgraded APIC timer to 500,000 counts for higher interrupt frequency and better responsiveness. - Implemented sequential worker queues for Service and Print requests to maintain 'Mechanical Truth'. - Silenced AHCI driver VGA output, redirecting diagnostic logs to Serial COM1. - Hardened scheduler with prioritized application selection and "Wake-on-Exit" logic. - Enforced strict 16-byte stack alignment and forensic RSP validation for High-Half stability. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented PS/2 Mouse/Trackpad driver with standard packet parsing. - Extended XHCI driver to support USB mice via HID report routing. - Integrated mouse telemetry into the Sovereign console monitor. - Added hardware interface selection (USB/PS2/All) to `make menuconfig`. - Refactored `get_char` to prioritize PS/2, USB, and Serial input sources. - Hardened AHCI driver with silent serial logging and non-blocking polling. - Optimized multitasking with `TASK_INPUT_WAIT` for interactive tasks. - Verified build stability and High-Half compliance. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Updated `Makefile` to include `-device qemu-xhci,id=xhci`. - Attached `usb-kbd` and `usb-mouse` to the XHCI bus in QEMU. - Verified build stability and High-Frequency APIC timer integration. - Finalized interactive peripheral suite (PS/2 + USB). Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented XHCI Command Ring with Link TRBs and Doorbell ringing. - Implemented persistent XHCI monitor task for device hot-plugging. - Implemented full "State Machine" for USB device initialization (Reset, Enable Slot, Address Device). - Implemented unified PS/2 Mouse and Trackpad driver in `mouse.c`. - Refactored XHCI event handler to route HID Mouse and Keyboard reports. - Added hardware interface toggles (USB/PS2) to `make menuconfig`. - Updated Sovereign Telemetry Monitor to display real-time mouse [X,Y] data. - Verified High-Half build stability and successful QEMU USB integration. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Created `docs/USB.md` detailing the Sovereign USB stack. - Documented the initialization ritual and BIOS-to-OS handover. - Explained the XHCI Device State Machine (Reset -> Enable Slot -> Address Device). - Linked architecture components to core implementation files. - Verified build and documentation integrity. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented `xhci_alloc_ring` for 64-byte aligned transfer rings. - Hardened `xhci_setup_device` with full Input Context (Slot + EP0) support. - Implemented `xhci_send_command` with Link TRB and Doorbell ringing. - Established the `ADDRESS_DEVICE` handshake for Slot configuration. - Integrated XHCI device initialization state machine (Reset -> Enable Slot -> Address Device). - Verified build stability and High-Half segment integrity. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Documented the `ADDRESS_DEVICE` handshake and `xhci_input_ctx_t` structure. - Explained Command Ring wraparound with Link TRBs and Doorbell kicks. - Detailed the role of the persistent `xhci_monitor_task` in device lifecycle. - Updated HID routing section to include unified Keyboard/Mouse processing. - Verified build stability and High-Half segment alignment. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Introduced xhci_handle_events to process Transfer, Command Completion, and Port Status events in a single stream. - Hardened port reset logic and device initialization state machine. - Implemented usb_main_task as a persistent system task in Slab 6 for hot-plug monitoring. - Added CONFIG_INTERFACE profiles for flexible legacy/modern input support. - Refined memory mapping for input reports using HHDM. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Enabled -O2 optimization and -fno-omit-frame-pointer for performance and stack traces. - Hardened QEMU environment with -nodefaults and -vga std to ensure clean XHCI/AHCI handshakes. - Increased QEMU memory to 1G to accommodate modern driver stacks and slab isolation. - Verified Higher-Half linker compliance at 0xffffffff80000000. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented hardware presence validation (0xFFFFFFFF check) and ProgIF logging during PCI scan. - Enforced strict 64-byte alignment for all XHCI contexts and rings. - Added support for Scratchpad Buffers as required by modern controllers. - Silenced scheduler serial diagnostics to eliminate I/O bottlenecks. - Optimized kernel build with -O2 and hardened QEMU runtime flags. - Confirmed Higher-Half linker compliance at 0xffffffff80000000. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Enforced strict 64-byte alignment and fully zeroed Input Context for XHCI. - Set Slot Context Max Exit Latency to 0 for modern controller compatibility. - Corrected Root Port Number mapping in Slot Context Info 1. - Updated shell boot menu to loop until a valid choice is provided. - Optimized kernel build with -O2 and silenced scheduler serial spam. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…ize AHCI. - Implemented full XHCI device enumeration and configuration state machine. - Added USB HID support for Keyboards and Mice with Interrupt In polling. - Implemented shift state tracking for USB keyboards using a modifier-aware map. - Added USB Mass Storage Class (MSC) support via Bulk-Only Transport (BOT). - Registered USB sticks as Sovereign Physical Volumes (USB_STICK). - Hardened XHCI ADDRESS_DEVICE handshake with 64-byte alignment and zero latency. - Optimized kernel build with -O2 and removed serial I/O bottlenecks. - Refined shell boot menu for robust choice-gate handling. - Integrated AHCI poll-only bootstrap to prevent Init-Stall. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Added support for Backspace, Escape, Delete, and Grave keys to USB keyboard. - Implemented auto-repeat logic (500ms delay, 50ms rate) for USB keyboards. - Improved serial backspace handling by transmitting the erase sequence (\b \b). - Implemented explicit CSW signature and status verification for USB MSC operations. - Optimized USB HID report processing to handle multi-key events and state tracking. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Updated menuconfig to allow forcing USB-only interface mode. - Enhanced docs/USB.md to explain Telemetry Monitor symbols (M for Mouse, INPUT_WAIT). - Refined USB HID event handling to use per-device state tracking. - Verified build stability with CONFIG_INTERFACE_USB enabled. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
This change addresses the "Init-Stall" during boot by implementing a poll-only handshake for AHCI disk registration. It also fixes a data interpretation bug in the xHCI driver's event handler.
Key changes:
- In `ahci.c`, implemented `ahci_wait_status` with a 1,000,000 iteration timeout and non-blocking poll.
- Enforced physical address mapping for all AHCI/xHCI DMA structures using a new `virtual_to_physical` macro.
- Fixed `xhci_handle_events` in `usb_xhci.c` to correctly dereference the completed TRB pointer to access HID report data.
- Added a `panic("AHCI_POLL_TIMEOUT")` for hardware safety.
- Verified kernel and ISO build success.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…t selection Key changes: 1. AHCI: Implemented poll-only bootstrap in `ahci.c` to break the Init-Stall. Enforced physical address mapping for DMA registers using `virtual_to_physical`. 2. xHCI: Fixed HID data interpretation in `xhci_handle_events` to correctly dereference TRB pointers via HHDM. 3. VGA: Added a 2D terminal buffer (`terminal_buffer`) to store console state for selection. 4. Mouse: Implemented a visible white arrow cursor with background saving/restoring in `vga_serial.c`. Added coordinate clamping in `mouse.c` and `usb_xhci.c`. 5. Selection: Implemented Ctrl+C selection logic in `console.c`. Mouse drags define a region, and Ctrl+C copies the corresponding text from the terminal buffer to the system clipboard (`rsl_copy`). 6. UI: Refined the text cursor to be a full Emerald Green flashing block, distinct from the mouse cursor. This completes the Sovereign "Mechanical Truth" bootstrap and enhances interactive console capabilities. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
…ive console selection - AHCI: Implemented poll-only bootstrap and physical address mapping. - xHCI: Corrected DCI/Doorbell logic and added HID Ctrl+C support. - Input: Unified Serial, PS/2, and USB input into a single router (`console_push_char`). - VGA: Implemented a 2D terminal buffer, visual selection highlighting, and independent mouse/text cursors. - UI: Added a white arrow mouse cursor and a solid Emerald flashing text cursor. - Interaction: Implemented Ctrl+C to copy selected text from the terminal buffer to the system clipboard. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- AHCI: Implemented robust poll-only bootstrap and physical DMA mapping to break Init-Stall. - xHCI: Completed full driver stack with BIOS handover, DCI-aligned transfers, and stall recovery. - Input: Unified Serial, PS/2, and USB (Keyboard/Mouse) input routing via `console_push_char`. - Mouse: Implemented 16-bit white arrow cursor with artifact-free rendering and absolute scaling for usb-tablet. - UI: Refined text cursor to solid Emerald block and implemented visual text selection with Ctrl+C clipboard support. - Stability: Optimized multitasking with bitmask reaping and transient worker isolation. - Documentation: Updated manuals in docs/ for API, USB, and boot ritual. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
This change introduces the RTC64 Windowing Engine and a functional Text Editor application. Key updates include: - Separate Keyboard/Mouse Tasks: Refactored `usb_xhci.c` to handle keyboard and mouse input as distinct tasks, improving system concurrency. - RTC64 Engine: Developed a core windowing engine in `kernel/libs/rtc64/` that manages window lifecycle, Z-order, and event routing. - GUI Primitives: Implemented title bars, window frames, buttons, and menus in `gui.c`. - Text Editor: Created `programs/text_editor.c`, a functional application with a text buffer and a VFS-integrated "Save" button. - Mouse Support: Enhanced xHCI to support both relative mouse and absolute tablet devices with correct coordinate scaling. - UI Refinements: Implemented precise pixel-based text rendering (`draw_char_pixel`) and a robust white arrow cursor. - Tasking: Updated kernel initialization to register and launch the new GUI and peripheral components. - Build System: Updated the Makefile to include the RTC64 library and the text editor source. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- xHCI: Added support for both relative mouse and absolute tablet devices with coordinate scaling. - VGA: Changed mouse cursor to Hot Pink (0xFF00FF) for visibility and refined the text cursor. - RTC64: Enhanced the windowing engine with title bars, menu bars, and buttons. Improved event routing and hit testing. - Text Editor: Updated the application with a "File" menu and "Save" button wired to VFS. - Tasking: Improved input routing from the global console buffer to the focused window. - Stability: Fixed linker errors and addressed compiler warnings. Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
This change implements a non-blocking, poll-based hardware handshake for the AHCI driver during the kernel's initial disk registration (Loader Phase). By enforcing a poll-only mode and manually checking PxTFD/PxIS status registers with a safety timeout, we ensure the boot sequence proceeds even if interrupts are not yet "wired" by the Orchestrator. This breaks the Init-Stall observed after SATA_HDD registration.
Key technical updates include:
PR created automatically by Jules for task 6831981006734885298 started by @rtech-technologies