Skip to content

openvmm_core/loaders: load linux on arm64 based on memory layout#3416

Open
chris-oo wants to merge 1 commit intomicrosoft:mainfrom
chris-oo:load-linux-ram-start
Open

openvmm_core/loaders: load linux on arm64 based on memory layout#3416
chris-oo wants to merge 1 commit intomicrosoft:mainfrom
chris-oo:load-linux-ram-start

Conversation

@chris-oo
Copy link
Copy Markdown
Member

@chris-oo chris-oo commented May 1, 2026

Load the direct linux kernel based on the smallest address in the memory layout, to account for memory layouts which do not start at address 0.

Tested via private changes that start the memory layout at 1GB.

Copilot AI review requested due to automatic review settings May 1, 2026 23:02
@chris-oo chris-oo requested a review from a team as a code owner May 1, 2026 23:02
Copy link
Copy Markdown
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

Updates the ARM64 Linux direct-boot loader in openvmm_core to place the initrd/EFI/ACPI structures relative to the start of guest RAM (from the configured MemoryLayout), instead of assuming RAM begins at GPA 0. This makes ARM64 direct kernel boot work with memory layouts whose first RAM range starts at a higher address (e.g. 1 GB).

Changes:

  • Compute mem_start from cfg.mem_layout.ram()[0].range.start() and place the initrd at mem_start + 16MB.
  • In ACPI mode, place EFI + ACPI tables at mem_start + 8MB (and derive rsdp_addr from that), rather than fixed addresses from 0.
  • Keep the kernel minimum load address above the initrd and aligned to 2 MB.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants