edk2/OvmfPkg/Microvm
maouai233 66820c9ace OvmfPkg: FSBClock moved to FixedAtBuild for platforms except Xen
Xen platform moved the PCD from FixedAtBuild to DynamicDefault for
flexibility. But DebugTimer.c in DebugAgentLib needs it to initialize
the debug timer in SEC phase probably. Given that only Xen uses it as
a dynamic PCD and the Xen platform has created a independent dsc file,
revert it here.

Packages need fixed FSBClock are all changed.
  - AmdSev/AmdSevX64.dsc
  - CloudHv/CloudHvX64.dsc
  - IntelTdx/IntelTdxX64.dsc
  - Microvm/MicrovmX64.dsc
  - OvmfPkgIa32X64.dsc
  - OvmfPkgX64.dsc

Signed-off-by: maouai233 <maouai233@outlook.com>
2026-05-01 02:54:07 +00:00
..
MicrovmX64.dsc OvmfPkg: FSBClock moved to FixedAtBuild for platforms except Xen 2026-05-01 02:54:07 +00:00
MicrovmX64.fdf OvmfPkg/Microvm: add memory debug log support 2026-01-31 11:23:12 +00:00
README OvmfPkg/Microvm/pcie: add pcie support 2022-06-03 09:06:44 +00:00

This is an *experimental* port of OVMF for the QEMU microvm
machine type.

microvm background info
-----------------------

microvm is designed for modern, virtio-based workloads.  Most legacy
lpc/isa devices like pit and pic can be turned off.  virtio-mmio
(i.e. '-device virtio-{blk,net,scsi,...}-device') is used for
storage/network/etc.

Optional pcie support is available and any pcie device supported by
QEMU can be plugged in (including virtio-pci if you prefer that over
virtio-mmio).

https://qemu.readthedocs.io/en/latest/system/i386/microvm.html
https://www.kraxel.org/blog/2020/10/qemu-microvm-acpi/

design issues
-------------

Not fully clear yet how to do hardware detection best.  Right now
using device tree to find virtio-mmio devices and pcie host bridge,
can reuse existing ArmVirtPkg code that way.  Needs patched QEMU.

features
--------
 [working] serial console
 [working] direct kernel boot
 [working] virtio-mmio support
 [working] pcie support

known limitations
-----------------
 * rtc=on is required for now.
 * can't use separate code/vars (actually an microvm limitation,
   there is no pflash support).
 * transitional virtio-pci devices do not work.  microvm doesn't
   support ioports on pcie, and ovmf doesn't initialize pcie devices
   with ioports if there is no address space for them (even though
   pcie devices are required to be functional without ioports).

usage
-----
qemu-system-x86_64 \
    -nographic \
    -machine microvm,acpi=on,pit=off,pic=off,rtc=on \
    -bios /path/to/MICROVM.fd \
    [ ... more args here ... ]