Skip to content

feat(aarch64): add Jetson Orin support and UEFI memory map virtualization - #366

Open
ForeverYolo wants to merge 16 commits into
devfrom
Orin
Open

feat(aarch64): add Jetson Orin support and UEFI memory map virtualization#366
ForeverYolo wants to merge 16 commits into
devfrom
Orin

Conversation

@ForeverYolo

Copy link
Copy Markdown
Contributor

Summary

Add NVIDIA Jetson Orin platform support and improve AArch64 virtualization for UEFI boot and platform-specific hardware behavior.

Changes

  • Add the Jetson Orin board configuration, linker script, DTS, build configuration, and runner
  • Add UEFI memory map virtualization for AArch64 guests
  • Add Kconfig options for AArch64 UEFI support and sequential UART output
  • Integrate Jetson Orin into the Kconfig build system and Jenkins build matrix
  • Improve GICv3 redistributor traversal for non-contiguous GICR layouts
  • Fix GICv2 interrupt loss
  • Extend trapped system-register handling
  • Add platform-specific cache hierarchy cleanup
  • Avoid serial-port contention during console output
  • Disable PAC interception
  • Remove obsolete Cargo feature files and FEATURES-based runner logic
  • Add Python 3.10 compatibility for the Kconfig tooling

Configuration

Jetson Orin uses the following Kconfig options:

CONFIG_ARCH_AARCH64=y
CONFIG_IRQ_GICV3=y
CONFIG_UART_16550=y
CONFIG_SEQUENTIAL_OUTPUT=y
CONFIG_AARCH64_UEFI_SUPPORT=y

## Verification

- make defconfig ARCH=aarch64 BOARD=jeston-orin
- make all ARCH=aarch64 BOARD=jeston-orin MODE=debug
- cargo fmt --all -- --check
- Shell syntax checks for the modified platform runners
- Hypervisor/root-zone memory overlap check

The Jetson Orin debug build completed successfully and generated the hvisor image.

Copilot AI review requested due to automatic review settings July 21, 2026 15:23
@ForeverYolo
ForeverYolo requested a review from agicy July 21, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds NVIDIA Jetson Orin (AArch64) board support and extends AArch64 virtualization features (UEFI-related config/plumbing, early cache handling, IRQ/GIC improvements, and UART output behavior), along with some tooling/build-matrix updates to integrate the new platform.

Changes:

  • Added Jetson Orin board definition and build/run assets (board config, linker script, DTS, runner, cargo config template).
  • Introduced AArch64 UEFI-related configuration types and a new aarch64::uefi module, and invoked arch-specific arg-based config from rust_main.
  • Updated UART/GIC handling (sequential UART gating, GICv3 redistributor layout handling, GICv2 inject fix) and build/test scripts (FEATURES removal, Jenkins matrix update).

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tools/kconfig/requirements.txt Adds tomli dependency for Python < 3.11 compatibility.
tools/kconfig/kconfig_cli.py Makes TOML parsing work on Python < 3.11 via tomli fallback.
src/main.rs Calls new arch_config_by_args() during primary init.
src/logging.rs Adds optional sequential UART output gating before printing.
src/device/uart/uart_16550.rs Adds console_free_check() for 16550 UART.
src/device/uart/pl011.rs Adds console_free_check() for PL011 UART.
src/device/uart/mod.rs Re-exports console_free_check() for supported AArch64 UARTs.
src/device/irqchip/gicv3/vgic.rs Registers handler for “unused” GICR redistributor regions.
src/device/irqchip/gicv3/mod.rs Refactors GICR base discovery to use a computed layout; exposes unused bases.
src/device/irqchip/gicv3/gicr.rs Implements GICR base layout discovery for non-contiguous redistributor frames.
src/device/irqchip/gicv2/gic.rs Adjusts LR programming to avoid SGI-related interrupt loss.
src/config.rs Bumps CONFIG_MAGIC_VERSION to reflect config struct layout changes.
src/arch/x86_64/mod.rs Adds no-op arch_config_by_args() for API parity.
src/arch/riscv64/mod.rs Adds no-op arch_config_by_args() for API parity.
src/arch/loongarch64/mod.rs Adds no-op arch_config_by_args() for API parity.
src/arch/aarch64/zone.rs Adds UEFI config types into AArch64 zone config; updates cache invalidation callsite.
src/arch/aarch64/uefi.rs New module for UEFI memory map virtualization logic.
src/arch/aarch64/trap.rs Adds sysreg decode and narrows trapped sysreg handling to ICC_SGI1R_EL1.
src/arch/aarch64/mod.rs Adds optional UEFI module and wires it into arch_config_by_args().
src/arch/aarch64/entry.rs Adds early cache invalidation mask support per CPU in boot asm.
src/arch/aarch64/cpu.rs Updates HCR_EL2 configuration (includes PAC-related bits).
src/arch/aarch64/cache.rs Moves cache-line-size detection into invalidate_dcache_range().
platform/riscv64/qemu-plic/test/runner.sh Removes FEATURES-based logging/handling in runner.
platform/riscv64/qemu-aia/test/runner.sh Removes FEATURES-based logging/handling in runner.
platform/aarch64/zcu102/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/sysoul_x3300/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/rk3588/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/rk3568/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/qemu-gicv3/test/runner.sh Removes FEATURES-based logic; standardizes runner behavior.
platform/aarch64/qemu-gicv3/board.rs Adds early cache invalidate masks, expands root CPUs, adds extra IO regions/IRQs, adds UefiConfig::NoUefi.
platform/aarch64/qemu-gicv2/test/runner.sh Removes FEATURES-based logic; fixes GIC version selection to v2.
platform/aarch64/qemu-gicv2/board.rs Adds early cache invalidate masks, expands root CPUs, adds IO regions, adds UefiConfig::NoUefi.
platform/aarch64/phytium-pi/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/ok6254-c/board.rs Extends board arch config with UefiConfig::NoUefi.
platform/aarch64/jeston-orin/test/runner.sh Adds a new runner for the Jetson Orin platform.
platform/aarch64/jeston-orin/platform.mk Adds make/QEMU integration for the Jetson Orin platform.
platform/aarch64/jeston-orin/linker.ld Adds a Jetson Orin-specific linker script.
platform/aarch64/jeston-orin/kconfig/defconfig Adds a defconfig for Jetson Orin (AArch64 + GICv3 + sequential output + UEFI support).
platform/aarch64/jeston-orin/image/dts/zone0.dts Adds a Jetson Orin zone0 DT source including UEFI-related /chosen properties.
platform/aarch64/jeston-orin/image/dts/Makefile Adds DTB build rules for the Orin DTS.
platform/aarch64/jeston-orin/cargo/config.template.toml Adds per-board cargo runner/rustflags template for Orin.
platform/aarch64/jeston-orin/board.rs Adds Jetson Orin board definition, memory regions, IRQ bitmap, and UEFI config values.
platform/aarch64/imx8mp/board.rs Extends board arch config with UefiConfig::NoUefi.
kconfig/Kconfig Adds Kconfig options for AArch64 UEFI support and sequential output.
kconfig/cfg_map.toml Maps new Kconfig symbols to Rust cfg flags.
Jenkinsfile Adds Jetson Orin to the Jenkins build matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/device/uart/pl011.rs
Comment thread src/arch/aarch64/entry.rs
Comment thread platform/aarch64/qemu-gicv2/board.rs Outdated
Comment thread src/arch/aarch64/trap.rs Outdated
Comment thread src/arch/aarch64/trap.rs
Comment thread src/arch/aarch64/cpu.rs
Comment thread src/logging.rs
Comment thread src/arch/aarch64/uefi.rs
Comment thread src/arch/aarch64/uefi.rs
Comment thread src/arch/aarch64/trap.rs
Define cache invalidation masks for all AArch64 boards, complete the Dayu200 zone configuration, and fix the qemu-gicv2 fw-cfg mapping. Correct UART idle checks and safely decode trapped system-register accesses, including XZR operands.
@ForeverYolo

ForeverYolo commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

In d6b4b50
To pass the CI, we temporarily synced version_magic. But this PR actually makes changes to the data structure, so when it's officially merged, we also need to bump the Magic version of both Hvisor-tool and Hvisor.

@agicy agicy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants