Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M MyKernalingOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • 啊对对队
  • MyKernalingOS
  • Merge requests
  • !2

feat: add multi-core CPU parallel support (SMP up to 8 cores)

  • Review changes

  • Download
  • Patches
  • Plain diff
Closed 啊对对队 requested to merge feature/multi-core into main May 10, 2026
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 25

Implement per-CPU scheduling with work stealing and interrupt-safe synchronization primitives for RISC-V 64 (RV64GC, SV39).

Core changes:

  • sync/spin: SpinLock and SpinNoIrq (atomic + SIE disable)
  • cpu: hart detection, amoswap-based boot hart election, per-CPU processor array
  • entry.asm: multi-hart boot with per-CPU stacks and atomic boot flag
  • sbi: HSM (hart start/stop), IPI (send_ipi), RFENCE (tlb_shootdown) extensions
  • task: per-CPU ready queues, work stealing from boot hart, WFI idle
  • trap: kernel trap vector (timer/software interrupt handling)
  • secondary harts activate SV39 via shared kernel page table
  • kernel stack increased to 32KB for multi-core workloads
  • frame allocator: ppn=0 guard checks

Verified: SMP=1/2/4/8 all pass usertests and benchmark suites.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/multi-core