Skip to content

Integrate CherryUSB stack and fix 64-bit EHCI issues#7

Open
rtech-technologies wants to merge 2 commits into
feat/nuklear-cherry-usb-gui-4999408416309859725from
cherryusb-integration-16118039652747565131
Open

Integrate CherryUSB stack and fix 64-bit EHCI issues#7
rtech-technologies wants to merge 2 commits into
feat/nuklear-cherry-usb-gui-4999408416309859725from
cherryusb-integration-16118039652747565131

Conversation

@rtech-technologies

Copy link
Copy Markdown
Owner

This PR fully integrates the CherryUSB stack into the Sovereign RTC64 kernel.

Key changes:

  1. EHCI 64-bit Hardening: Modified external/CherryUSB/port/ehci/usb_hc_ehci.h and associated source files to handle high-half kernel virtual addresses (HHDM) correctly, preventing pointer truncation when communicating with hardware.
  2. Functional OSAL: Replaced skeleton stubs in kernel/usb_osal.c with functional bare-metal implementations for critical sections (interrupt-safe), semaphores, mutexes, and memory management using the kernel's TLSF allocator.
  3. Class Integration: Updated the Makefile and kernel/usb_config.h to include and configure USB Host classes for HID (keyboard/mouse), MSC (storage), CDC (network), Audio, and Video.
  4. Environment Pruning: Aggressively pruned the external/CherryUSB directory to maintain Git hygiene and ensure only required source files are present, as per architectural guidelines.
  5. Zero Warnings/Stubs: Fixed all unused parameter warnings in kernel/uac_policy.c and resolved missing dependencies like strtoul, strncpy, and roundf in the kernel's libc/math glue layers.

The resulting kernel compiles and links with 0 warnings and 0 errors.


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

- Implement functional USB OSAL for RTC64 kernel.
- Fix 64-bit pointer truncation in CherryUSB EHCI driver.
- Integrate HID, MSC, CDC, Audio, and Video classes into the kernel.
- Prune CherryUSB stack to essential components (class, common, core, port/ehci).
- Resolve all compiler warnings and implement missing libc/math dependencies.

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.

- Pruned external/CherryUSB to essential folders: class, common, core, port/ehci.
- Fixed 64-bit address translation in EHCI driver (HHDM support).
- Implemented functional, interrupt-safe USB OSAL in kernel/usb_osal.c.
- Integrated HID, MSC, and CDC Host classes into the build.
- Resolved all compiler warnings and implemented missing libc/math dependencies.
- Updated Makefile and usb_config.h for the integrated components.

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