Skip to content

Conversation

@Inquisitor-201
Copy link
Contributor

This PR introduces RK3588 SoC support and enhances hypervisor reliability on Rockchip platforms:

  1. RK3588 Platform Integration
    - Board configs, memory maps, prebuilt DTs
    - UART base address handling
    - Platform-specific linker scripts

  2. Critical U-Boot Compatibility
    - Insert NOP at binary offset 10
    - Prevents Rockchip U-Boot relocation bug ([email protected]:670)

  3. Core Architecture Improvements
    - Unified mpidr_rockchip CPU identification
    - Explicit CPU core management via no_autodetect_ncpus
    - Removed legacy boot page table code

@Inquisitor-201 Inquisitor-201 added this to the hvisor-v0.1.2 milestone Apr 23, 2025
@Inquisitor-201 Inquisitor-201 added feature New feature or request aarch64 labels Apr 23, 2025
@enkerewpo enkerewpo requested a review from Copilot April 23, 2025 11:38
Copy link
Contributor

Copilot AI left a 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 adds support for the Rockchip RK3588 SoC and improves hypervisor compatibility across various platforms. Key changes include new board configurations with CPU counts and memory settings, updates to Cargo feature flags, and adjustments to linker and UART configurations.

Reviewed Changes

Copilot reviewed 30 out of 42 changed files in this pull request and generated no comments.

Show a summary per file
File Description
platform/aarch64/zcu102/board.rs Added BOARD_NCPUS constant for zcu102 board
platform/aarch64/rk3588/cargo/config.template.toml Added new target configuration for RK3588
platform/aarch64/rk3588/board.rs Added board definitions for RK3588 including memory regions and IRQ configurations
platform/aarch64/rk3568/board.rs Added BOARD_NCPUS constant for RK3568 board
platform/aarch64/qemu-gicv3/board.rs Added BOARD_NCPUS constant for QEMU board; note potential typo in board name
platform/aarch64/qemu-gicv2/board.rs Added BOARD_NCPUS constant for QEMU board
platform/aarch64/imx8mp/board.rs Added BOARD_NCPUS constant for imx8mp board
Cargo.toml Introduced new feature flags to support the updated board configurations
Files not reviewed (12)
  • Makefile: Language not supported
  • platform/aarch64/imx8mp/cargo/features: Language not supported
  • platform/aarch64/qemu-gicv2/cargo/features: Language not supported
  • platform/aarch64/qemu-gicv3/cargo/features: Language not supported
  • platform/aarch64/rk3568/cargo/features: Language not supported
  • platform/aarch64/rk3588/cargo/features: Language not supported
  • platform/aarch64/rk3588/configs/zone1-linux-virtio.json: Language not supported
  • platform/aarch64/rk3588/configs/zone1-linux.json: Language not supported
  • platform/aarch64/rk3588/image/Makefile: Language not supported
  • platform/aarch64/rk3588/image/zone1-linux.dts: Language not supported
  • platform/aarch64/rk3588/linker.ld: Language not supported
  • platform/aarch64/rk3588/platform.mk: Language not supported
Comments suppressed due to low confidence (1)

platform/aarch64/qemu-gicv3/board.rs:18

  • The board name appears to have a typo. Consider renaming 'qemu-givc3' to 'qemu-gicv3' for consistency with the file name and naming conventions.
pub const BOARD_NAME: &str = "qemu-givc3";

Copy link
Contributor

@KouweiLee KouweiLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested on rk3588, it runs well. I think if other boards are okay, this pr can be merged.

dallasxy
dallasxy previously approved these changes Apr 24, 2025
@dallasxy dallasxy self-requested a review April 24, 2025 03:56
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the latest dev still has some problems running rk3568, I am still sure that the modification of entry.rs does not work on rk3568. I tested this file separately on the branch that can run correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After resolving the issue with the dev branch code failing to start, a full test was conducted, and the RK3568 is now able to boot normally with pr149.

@dallasxy dallasxy dismissed their stale review April 24, 2025 04:07

rk3568 cannot correctly apply changes to entry.rs

@@ -1,3 +1,4 @@
use crate::arch::cpu;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should make sure that the copyright texts are at top

@enkerewpo
Copy link
Member

enkerewpo commented May 5, 2025

the PR labeler ci has been fixed: #153

@enkerewpo enkerewpo changed the title Add Rockchip RK3588 support feat. Add Rockchip RK3588 support May 5, 2025
@KouweiLee
Copy link
Contributor

the PR labeler ci has been fixed: #153

Why did ci still fail?

@enkerewpo
Copy link
Member

enkerewpo commented May 5, 2025

the PR labeler ci has been fixed: #153

Why did ci still fail?

It's still the old CI results (and workflow). We have to trigger the (new) CI by either : 1. update some commits (or just force-push) in the source branch (rk3588_dev). 2. close and reopen this PR

@enkerewpo enkerewpo closed this May 5, 2025
@enkerewpo enkerewpo reopened this May 5, 2025
@KouweiLee KouweiLee merged commit 86bb771 into dev May 5, 2025
36 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aarch64 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants