Skip to content

arm64 port tracking issue #21

Description

@congwang-mk

Tracking issue for porting multikernel to arm64.

Evaluation summary

On x86, arch/x86/multikernel/ (~2,800 lines) is almost entirely a software CPU lifecycle: relocate/secondary trampolines, an MMU-on park loop with private GDT/IDT, identity page tables, head_64.S scrubbing inherited CR4/EFER/GS state, and the repark/confirm-parked bookkeeping. It exists because x86 has no firmware-mediated CPU control after boot, and it is where the hardest bugs have lived.

On arm64 EL3 firmware owns CPU state through PSCI, and Linux already wraps it (cpu_psci_ops):

  • The pool is the PSCI OFF state: a parked CPU executes nothing.
  • The boot trampoline is CPU_ON(mpidr, entry, dtb): it produces exactly the entry state head.S requires. No arm64 direct_boot.S, no head_64.S.
  • Spawn secondaries come up through stock cpu_psci_cpu_boot(); halt returns them with cpu_off(); confirm-parked is AFFINITY_INFO == OFF.
  • Timer calibration handoff disappears (CNTFRQ_EL0 is firmware-set, CNTPCT is global).

The difficulty moves to the interrupt controller: GICv3 has one distributor (stock gic_dist_init() would reset host SPIs) and one ITS command queue per ITS (a spawn cannot map its own MSIs). Those two, plus synthesizing the instance DTB on ACPI hosts, are the bulk of the work and the only places a port can break the host.

Tasks, in dependency order

Foundation

CPU lifecycle (small, low risk)

Boot data and messaging

Milestone A: device-less spawn boots on its own CPUs and memory, exchanges ring messages with the host, halts gracefully, re-spawns.

Interrupts (highest risk)

Milestone B: a PCIe device (virtio-pci on QEMU, NIC/NVMe on hardware) works in a spawn.

Robustness and isolation

Optional

Infrastructure

First target: QEMU virt with TF-A (secure=on,gic-version=3,its=on), then an SBSA server (Neoverse: PSCI + GICv3 + ITS + ECAM + TF-A/SDEI).

Metadata

Metadata

Assignees

No one assigned

    Labels

    arm64arm64 portepictracking issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions