RE: [PATCH] OvmfPkg/Bhyve: install bhyve's ACPI tables

From: Corvin Köhne <>
Date: Thu, 21 Oct 2021 12:48:52 UTC
Hi Peter,

thanks for your feedback.

>   There will be some issues with the use of this that may have to be
> addressed at some point
>   - the PCI mmio/io windows are created assuming that bhyve has done PCI
> enumeration. If EFI is doing enumeration, these will be incorrect

Does EFI modify the DSDT at the moment or does it use fixed values for it?

>   - the SPCR isn't generated by bhyve, but is by EFI. There are Windows
> users who rely on having a serial console, so this should be added to
> bhyve. Fortunately the table is trivial.

I can create a patch for it.

>   - the space used by bhyve ACPI tables (the area just below 1MB
> physical) is quite small and has little room for expansion. Qemu gets
> around this by providing ACPI tables (or just the DSDT) by a fw_cfg
> interface, and doesn't place the tables into RAM.

It's an existing issue not a specific for this patch. Nevertheless, it could
be done by bhyve too. Either by using BhyveFwCtl or QemuFwCfg.

>   There are other more general issues with bhyve ACPI. Fork/exec of iasl
> is convenient, and guarantees tables are syntactically correct, but is
> expensive in startup time. It would be preferable for tables to be
> generated without iasl. This is simple for static tables, but for
> DSDT/SSDT, something like EDK2's dynamic table generation could be used
> (
>   I also feel that table generation in EFI is still a viable approach,
> though it requires additional information to be pass from the
> hypervisor, and dynamic table generation, to get to feature parity with
> bhyve's generated tables.

What about reusing Qemu's ACPI table generation? Implementing
QemuFwCfg should be no problem (
Qemu's ACPI table generation seems to be a bit more complicated,
but we don't need to reinvent a new interface. So, we don't need
to patch EDK2.

Best regards

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075