-
Notifications
You must be signed in to change notification settings - Fork 43
support rk3588 smp #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support rk3588 smp #121
Conversation
f62070c
to
c7724fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should create a arch-independent invalidate_dcache
functions, and provide stub implementations for x86_64 and riscv?
If x86 and riscv also need to be refreshed, then such an interface is indeed needed. |
arceos主线曾提起过cache相关功能,但未合并,且没给出未合并原因,与这个PR功能重复 arceos-org/arceos#210 @aarkegz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small fixes and changes are necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables support for RK3588 SMP on aarch64 by revising how virtual CPUs are activated and integrating new cache management functions along with updated configuration and build scripts.
- Update vCPU activation logic to map physical CPU IDs to vCPU IDs from the configuration
- Introduce a new cache module (with assembly routines) and integrate cache cleaning in image loading
- Update Makefile and platform configuration files to support GICv3 and RK3588-specific naming
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/vmm/vcpus.rs | Adjusts vCPU activation to use configuration mapping instead of direct physical IDs |
src/vmm/mod.rs | Conditionally includes the new cache module for aarch64 |
src/vmm/images.rs | Invokes cache cleaning for memory regions on aarch64 |
src/vmm/cache.rs & src/vmm/cache.S | Introduces new cache management routines via assembly |
scripts/make/qemu.mk, features.mk, Makefile | Updates build scripts for GICv3 support and RK3588 platform identification |
configs/*.toml | Updates configuration files for the RK3588 SMP and related platforms |
Comments suppressed due to low confidence (2)
src/vmm/vcpus.rs:298
- Consider enhancing the error message with additional context or instructions to help diagnose misconfiguration issues if the physical CPU ID is missing from the mapping.
.expect(&format!("Physical CPU ID {} not found in VM configuration", target_cpu));
Makefile:158
- [nitpick] Ensure that the platform name 'aarch64-rk3588j-hv' is consistently used across all related configuration and documentation files to avoid confusion.
else ifeq ($(PLAT_NAME), aarch64-rk3588j-hv)
…e vCPU startup logic - Add phys_cpu_ids configuration item in linux-rk3588-aarch64-smp.toml - Modify vcpu_run function to start corresponding vCPU according to configured physical CPU ID mapping - Optimize vCPU startup logic to improve system startup efficiency and stability
* move cache invalidators into `utils::arch` mod * formatted * fixed missing `pub` vis * fix two missing commas in `qemu.mk`, which caused `make ARCH=aarch64 run` failed to start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Remote CI cannot run with PR from another repo. I've tested this PR on another local branch, so it's safe to do a manual config override.
Since the feature of dtb parsing has not yet been merged into the mainline, the address in the toml configuration is still used to refresh the dcache