Skip to content

feat(arm-qemu-virt): add initial support for ARM QEMU platform#32

Open
luodeb wants to merge 29 commits intoarceos-org:mainfrom
luodeb:arm32
Open

feat(arm-qemu-virt): add initial support for ARM QEMU platform#32
luodeb wants to merge 29 commits intoarceos-org:mainfrom
luodeb:arm32

Conversation

@luodeb
Copy link
Contributor

@luodeb luodeb commented Dec 18, 2025

No description provided.

@aarkegz
Copy link
Contributor

aarkegz commented Dec 20, 2025

Please rebase it first.

@equation314
Copy link
Member

equation314 commented Jan 11, 2026

Cloud you also update the examples for the arm platform?

Copy link

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

Adds an initial ARM (armv7a) QEMU virt platform crate and wires it into the workspace, examples, and CI so the existing example kernels can be built for armv7a-none-eabi.

Changes:

  • Introduces platforms/axplat-arm-qemu-virt with boot/MMU setup, memory translation, init, timer, and power interfaces.
  • Updates example kernels (hello/irq/smp) to support ARCH=arm builds and QEMU invocation.
  • Extends workspace membership and CI target matrices to include armv7a-none-eabi.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
platforms/axplat-arm-qemu-virt/src/power.rs PSCI-based power + SMP boot hook for ARM QEMU virt
platforms/axplat-arm-qemu-virt/src/mem.rs Physical/virtual translation + RAM/MMIO ranges for the platform
platforms/axplat-arm-qemu-virt/src/lib.rs Platform crate root + config include + interface wiring
platforms/axplat-arm-qemu-virt/src/init.rs Early/later init (UART, PSCI, GIC, timer IRQ enable)
platforms/axplat-arm-qemu-virt/src/generic_timer.rs ARM timer-backed TimeIf implementation + oneshot timer
platforms/axplat-arm-qemu-virt/src/boot.rs ARM32 boot entry + page table setup + MMU enable trampoline
platforms/axplat-arm-qemu-virt/build.rs Rebuild triggers for config path env var
platforms/axplat-arm-qemu-virt/axconfig.toml Default platform configuration for ARM QEMU virt
platforms/axplat-arm-qemu-virt/Cargo.toml New platform crate manifest + dependencies/features
examples/smp-kernel/src/main.rs Adds cfg(target_arch="arm") platform selection
examples/smp-kernel/linker.lds.S Discards .ARM.exidx* in linker script
examples/smp-kernel/build.rs Adds ARM kernel base selection for linker script generation
examples/smp-kernel/README.md Documents arm as supported ARCH
examples/smp-kernel/Makefile Adds ARCH=arm target triple and QEMU args
examples/smp-kernel/Cargo.toml Adds ARM-specific platform dependency
examples/irq-kernel/src/main.rs Adds cfg(target_arch="arm") platform selection
examples/irq-kernel/linker.lds.S Discards .ARM.exidx* in linker script
examples/irq-kernel/build.rs Adds ARM kernel base selection for linker script generation
examples/irq-kernel/README.md Documents arm as supported ARCH
examples/irq-kernel/Makefile Adds ARCH=arm target triple and QEMU args
examples/irq-kernel/Cargo.toml Adds ARM-specific platform dependency
examples/hello-kernel/src/main.rs Adds cfg(target_arch="arm") platform selection
examples/hello-kernel/linker.lds.S Discards .ARM.exidx* in linker script
examples/hello-kernel/build.rs Adds ARM kernel base selection for linker script generation
examples/hello-kernel/README.md Documents arm as supported ARCH
examples/hello-kernel/Makefile Adds ARCH=arm target triple and QEMU args
examples/hello-kernel/Cargo.toml Adds ARM-specific platform dependency
Cargo.toml Adds the new platform crate to workspace members
Cargo.lock Locks new/updated dependencies pulled in by ARM support
.github/workflows/ci.yml Adds armv7a-none-eabi to CI build/clippy matrices
Comments suppressed due to low confidence (1)

platforms/axplat-arm-qemu-virt/Cargo.toml:25

  • This crate depends on axplat-aarch64-peripherals, whose generic_timer implementation uses AArch64 system registers (CNTFRQ_EL0, CNTP_*_EL0, etc.). That dependency may not compile for target_arch = "arm" (and even if it compiles, parts of it are AArch64-specific). Consider splitting peripherals into arch-neutral vs arch-specific modules (or introducing an axplat-arm-peripherals crate) so the ARMv7 build doesn’t pull in AArch64-only code.
axplat = { workspace = true }
axplat-aarch64-peripherals = { path = "../axplat-aarch64-peripherals" }


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

@luodeb luodeb requested a review from equation314 March 11, 2026 06:02
equation314 and others added 6 commits March 12, 2026 16:38
Enables symmetric multiprocessing by introducing secondary CPU boot sequence,
updates dependencies, and clarifies memory mapping for QEMU ARM virt.
Improves IRQ initialization and exposes configurable CPU count for better
scalability and maintainability.
Streamlines code by cleaning up unused commented imports,
reducing clutter and improving maintainability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants