Skip to content

Add x2APIC detection and initialization support #183

Open

Description

@cellrishi-code

Summary

Detect whether the processor and platform support x2APIC, then provide a controlled initialization path alongside the existing interrupt-controller abstraction.

Scope

  • Check CPU feature availability before accessing x2APIC-specific MSRs.
  • Define the transition and fallback policy between xAPIC and x2APIC modes.
  • Validate APIC identifiers and preserve a consistent interface for interrupt routing.
  • Report unsupported or failed initialization without leaving the controller partially configured.

Acceptance criteria

  • Feature-detection logic is independently testable using synthetic CPU capability inputs.
  • Initialization refuses unsupported CPUs and documents required platform prerequisites.
  • Existing xAPIC/PIC behavior remains available as the configured fallback.
  • Document register/MSR access invariants and mode-selection policy.

Engineering constraints

  • Keep the kernel Rust-first, no_std, and x86_64-compatible.
  • Integrate with existing Rustalis subsystem interfaces; do not create a parallel implementation.
  • Document ownership, initialization order, failure behavior, and any architecture-specific unsafe invariants.
  • Add host-side tests for hardware-independent logic and QEMU coverage for hardware paths where practical.
  • Do not claim verification that has not actually been run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions