rust-osdev / rust-osdev/bootloader

PVH header + chain load a custom stage 2.5?

Open
#371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.7k
Forks
240
PR merge metrics
No merged PRs in 30d

Description

Hello!

As OS kernels are quite often particular about memory layout, GDT, IRQs, etc., they often choose to set these things up themselves and not rely on the bootloader. In addition, using PVH start_info [1] is now kind of an industry standard when booting guest images in VMS (e.g. [2]).

Would it be in scope of this project to support this "PVH header + chain load a realmode next stage" loading flow? I.e. load initrd, prepare PVH start_info (basically, the memory map, initrd address/len, rsdp address), and jump into the next stage? If so, I'll hack together a prototype PR... (for MBR/BIOS only, I see no use for UEFI in a VM, sorry).

Thanks,
U.L.

[1] https://github.com/Xilinx/xen/blob/master/xen/include/public/arch-x86/hvm/start_info.h
[2] https://www.cloudhypervisor.org/docs/prologue/quick-start/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the PVH start_info definition linked in the issue and the project's existing MBR/BIOS loading flow. Determine the scope of preparing the memory map, initrd address and length, and RSDP address before chain-loading a real-mode next stage. Done would mean a defined and tested PVH-header loading path for the proposed VM use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.