Skip to content

arm64: instance DTB synthesis (ACPI host) and filtering (DT host) #13

Description

@congwang-mk

Part of the arm64 port.

On arm64 the instance DTB replaces boot_params + E820 + the SETUP_MULTIKERNEL manifest. kernel/multikernel/manifest.c already produces an FDT and its comment anticipates a /chosen property for non-x86.

Content generated by the host on every exec:

  • /memory@... nodes = the current memory grant (replaces mk_e820_fill()).
  • /reserved-memory: ctrl block and shared IPI area (no-map for the ctrl block).
  • /cpus: every pool CPU the instance may ever own (so hot-add works later; x86 does the same via mk_arch_register_cpu()), enable-method = "psci", reg = MPIDR. Only initially granted CPUs are present at boot: hook the existing "restrict the present mask" logic (instance_dt.c:320) into smp_init_cpus() so the others stay possible-but-not-present.
  • /psci (method = smc/hvc, copied from the host), /timer (arch timer, PPIs), the GIC node (with the tenant property and granted SPI ranges, see GIC issue), an assigned or shared UART for earlycon, pci-host-ecam-generic per granted PCIe segment.
  • /chosen: bootargs, linux,multikernel-fdt (or embed the manifest subtree directly) so mk_manifest_populate() runs from setup_arch() after early_init_dt_scan().

Two host cases, do in this order:

  1. ACPI host (SBSA servers): synthesize from scratch. SBSA guarantees the generic drivers, so the result looks like a QEMU-virt DT describing a physical subset. Sources: MADT for MPIDRs and GIC/ITS addresses, GTDT for timer PPIs, MCFG for ECAM, SPCR for the UART.
  2. DT host: filter the host DTB down to granted nodes. Out of scope here: devices whose clock/reset/power-domain/pinctrl providers are host-owned (embedded SoCs); file separately if needed.

Spawn side: run DT-only regardless of how the host booted (mirror of disable_acpi() in arch/x86/kernel/platform-quirks.c).

Metadata

Metadata

Assignees

No one assigned

    Labels

    arm64arm64 port

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions