Skip to content

⚓ Quartermaster: AHCI & Boot Stage Synchronization Fix#9

Open
rtech-technologies wants to merge 15 commits into
sovereign-core-expansion-2313558312167675719from
quartermaster-boot-fix-7560600428845292292
Open

⚓ Quartermaster: AHCI & Boot Stage Synchronization Fix#9
rtech-technologies wants to merge 15 commits into
sovereign-core-expansion-2313558312167675719from
quartermaster-boot-fix-7560600428845292292

Conversation

@rtech-technologies

Copy link
Copy Markdown
Owner

This change introduces rigorous hardware protocol compliance to the AHCI driver and boot sequence. It adds the missing BIOS/OS handoff, refactors port resets to be deterministic based on the SATA spec, and ensures Limine modules are valid before use. All successful stages are now marked with the Quartermaster's '⚓' symbol.


PR created automatically by Jules for task 7560600428845292292 started by @rtech-technologies

Implemented deterministic hardware synchronization for the AHCI controller and hardened Limine module validation.

- Added ahci_wait_status helper for millisecond-bounded polling.
- Implemented AHCI BIOS/OS handoff (BOHC) protocol.
- Refactored GHC reset sequence for robust synchronization.
- Refactored ahci_force_port_reset for deterministic COMRESET transitions.
- Hardened Limine module validation in vdisk.c.
- Added '⚓' markers to successful hardware initialization logs.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 14 commits April 30, 2026 20:35
Transitioned OSx2 to a stable UEFI boot environment and enforced strict hardware synchronization.

- Hardware: Implemented AHCI BIOS/OS Handoff (BOHC), deterministic GHC reset, and COMRESET sequences.
- Polling: Unified hardware register polling via Achi_wait_status.
- UEFI: Established /EFI/BOOT/ standard in ISO and synchronized Limine configurations.
- Syscalls: Implemented RSL Syscall Gate (int 0x03) with fixed register mapping for data integrity.
- Cargo: Developed the Sovereign Live Installer (programs/cargo.c) with functional disk identification and formatting.
- Build: Updated Makefile to include nested library sources and enforce UEFI layout.
- Accuracy: Corrected AHCI HBA memory structure offsets to match Intel 1.3.1 specifications.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Hardware: Implemented deterministic AHCI BOHC handoff and GHC/Port reset sequences.
- Polling: Unified hardware register polling via Achi_wait_status helper.
- UEFI: Established spec-compliant /EFI/BOOT/ directory structure and bootloader placement.
- Syscalls: Developed RSL Syscall Gate (int 0x03) with fixed register mapping for data integrity.
- Cargo: Implemented non-stubbed Sovereign Live Installer with functional disk metadata and formatting phases.
- Build: Updated Makefile for recursive library compilation and hybrid UEFI ISO generation.
- Reliability: Corrected AHCI HBA structure offsets to match Intel 1.3.1 specifications.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Hardware: Enforced deterministic AHCI handshake (BOHC) and reset protocols.
- UEFI: established hybrid ISO structure with /EFI/BOOT/ standard.
- Syscalls: Implemented RSL Syscall Gate (int 0x03) with data integrity fixes.
- Cargo: Non-stubbed Sovereign Installer with verbose fallback mode.
- Panic: Atomic, non-yielding system halt with hardware error reporting.
- Build: Makefile synchronized for UEFI deployment and recursive library link.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Panic: Implemented non-yielding atomic system termination in quartermaster_panic.
- Cargo: Non-stubbed Sovereign Installer with verbose recovery fallback.
- Syscalls: Fixed data integrity in assembly bridge and implemented disk info/format gates.
- Hardware: Enforced deterministic AHCI handshake and reset sequences.
- UEFI: Corrected ISO directory structure and synchronized boot configurations.
- Build: Updated Makefile for recursive dependency tracking and hybrid ISO layout.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implement deterministic AHCI BOHC and GHC reset sequences.
- Fix AHCI HBA struct padding for spec-compliant port offsets.
- Harden Limine module validation in VDisk for cargo payloads.
- Fix syscall register clobbering in assembly handover.
- Deploy functional Cargo installer utility (GPT/FAT32).
- Enable hybrid UEFI/BIOS boot support in Makefile and ISO layout.
- Resolve RSP boundary panic in context switcher.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implement full forensic red-screen panic with GOP register dump.
- Register all 32 hardware exceptions with full CPU state capture.
- Implement spec-compliant AHCI BOHC and GHC reset handshakes.
- Deploy functional Cargo installer with GPT/FAT32 support.
- Enable hybrid BIOS/UEFI boot support in Makefile and ISO layout.
- Resolve context switch RSP boundary blockages.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Hardened AHCI initialization with BIOS/OS Handoff (BOHC) and GHC reset validation.
- Implemented robust COMRESET state machine for SATA link establishment.
- Added XHCI BIOS/OS handover and SMI lockdown.
- Fixed critical context-switch register corruption (%r12).
- Standardized Cargo payload delivery path to /bin/cargo.bin.
- Implemented forensic "Deep Crimson" panic screen with register dumps.
- Purged prohibited UTF-8 symbols from kernel strings to ensure VGA compatibility.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Resolved ELF segment overlap by merging .note.gnu.build-id into .rodata.
- Hardened AHCI initialization with BIOS/OS Handoff (BOHC) and GHC reset validation.
- Implemented robust COMRESET state machine for SATA link establishment.
- Added XHCI BIOS/OS handover and SMI lockdown.
- Fixed critical context-switch register corruption (%r12).
- Standardized Cargo payload delivery path to /bin/cargo.bin.
- Implemented forensic "Deep Crimson" panic screen with register dumps.
- Purged prohibited UTF-8 symbols from kernel strings to ensure VGA compatibility.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Fixed ELF segment overlap by merging .note.gnu.build-id into .rodata.
- Resolved shell startup blockage by deferring multitasking until VFS registration.
- Hardened AHCI (BOHC/GHC) and XHCI handovers.
- Fixed context-switch register corruption (%r12).
- Standardized Cargo delivery to /bin/cargo.bin.
- Implemented forensic panic screen and purged prohibited UTF-8 symbols.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Fixed AHCI port engine start hang by adding status polling and readiness checks.
- Throttled System Maintenance Task with a 5-second cooldown to prevent shell starvation.
- Hardened Idle Task and Kernel Entry thread with explicit yielding.
- Resolved ELF segment overlap by merging .note.gnu.build-id into .rodata.
- Corrected multitasking initialization order to ensure VFS availability.
- Standardized Cargo delivery and forensic panic systems.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented rsl_input (Case 1) and rsl_yield (Case 2) syscalls.
- Reworked boot sequence to implement "Cargo First" logic (checks for /user/).
- Fixed console task starvation by removing blocking TASK_WAITING states.
- Hardened serial I/O with transmit timeouts to prevent hardware hangs.
- Zero-initialized task contexts for deterministic standalone program startup.
- Implemented tasking_spawn_module to run Limine modules as kernel tasks.
- Standardized programs/cargo.c to use the new interactive input gate.
- Resolved ELF segment overlap and multitasking initialization order.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Implemented secure login handshake in the Shell with DJB2 password hashing.
- Hardened FATFS with Property Permissions: files now have an 'Owner UID' field.
- Upgraded Cargo installer for multi-tenant property management (Non-Destructive Mode).
- Implemented rsl_set_uid, rsl_get_uid, rsl_hash, and extended VFS syscalls.
- Enhanced forensic panics with Serial COM1 mirroring for audit logs.
- Reworked boot sequence to prioritize existing property discovery (/users/).
- Fixed serial transmit stalls and ensured ASCII-only symbol hygiene.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- Unified Syscall Bridge: Synchronized RAX IDs between kernel and freestanding libc (RAX 11 for input, 300 for dispatch).
- RAM Sanitization: Implemented 'Fresh Silicon' ritual zeroing usable pages during PMM init.
- Cargo Installation Ritual: Multi-step GPT/FAT32 installer with handoff to User Creator.
- User Sovereignty: Created standalone user_creator.bin and implemented UID-based isolation (UID 2000+ guest lock).
- RTECH01 Protocol: Hardened flat binary loading with header validation and entry-point calculation.
- Freestanding Infrastructure: Standardized <string.h> and <stdlib.h> for standalone RSL programs.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
- RAM Sanitization: Usable regions zeroed out during PMM init for 'Fresh Silicon' certainty.
- User Sovereignty: Implemented user_creator utility and UID-based isolation (UID 2000+ guest lock).
- Cargo Installer: Guided multi-step installation ritual (GPT -> FAT32 -> Account Setup).
- Build Fix: Resolved conflicting declarations for tasking_spawn_module and arc_alloc/release.
- RTECH01 Protocol: Verified flat binary loading for cargo, shell, and user_creator.
- Freestanding Infrastructure: Standardized string.h and stdlib.h for standalone programs.

Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant