Page MenuHomeFreeBSD

[PATCH 12/19] bhyve: build MCFG table by basl
ClosedPublic

Authored by corvink on Oct 14 2022, 9:22 AM.
Tags
Referenced Files
Unknown Object (File)
Wed, Sep 25, 9:24 PM
Unknown Object (File)
Wed, Sep 25, 12:19 PM
Unknown Object (File)
Wed, Sep 25, 7:11 AM
Unknown Object (File)
Wed, Sep 25, 2:11 AM
Unknown Object (File)
Tue, Sep 24, 7:37 PM
Unknown Object (File)
Sat, Sep 21, 8:37 PM
Unknown Object (File)
Sat, Sep 21, 12:05 PM
Unknown Object (File)
Sat, Sep 21, 3:21 AM
Subscribers

Details

Summary

Building the MCFG table by basl will allow it to be loaded by qemu's
ACPI table loader.

This is the 12. patch required to merge D36983

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 48384
Build 45270: arc lint + arc unit

Event Timeline

corvink retitled this revision from [acpi-table part 12] bhyve: build MCFG table by basl to [PATCH 12/19] bhyve: build MCFG table by basl.Oct 14 2022, 9:44 AM
This revision is now accepted and ready to land.Oct 26 2022, 2:32 PM
usr.sbin/bhyve/basl.h
27 ↗(On Diff #111794)

I wonder if we want #define's for these values that are only used once vs just using them inline in the one place they are used? Shared values like BASL_OEM_ID make sense to be shared. It also looks like so far the OEM table ID is following the pattern "BV" + <ACPI SIG> + " " which could perhaps be hardcoded in the build table header function avoiding the need for specifying it at all.

usr.sbin/bhyve/basl.h
27 ↗(On Diff #111794)

I've created the defines to have a place where you can find a short overview of our tables and revisions etc. I can inline them if you want.

Regarding OEM table ID: The only usecase for different id's that I'm aware of are multiple SSDT tables (https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#secondary-system-description-table-ssdt). Not sure if it could make sense for bhyve to use SSDT tables.

usr.sbin/bhyve/basl.h
27 ↗(On Diff #111794)

We aren't likely to need SSDTs, no. I do think generating the table ID's using a pattern in the helper function might be nice as it would shrink the code slightly in all the functions building tables.

usr.sbin/bhyve/basl.h
27 ↗(On Diff #111794)

I'm going to remove it. What do you think about the oem revision field? We could hard code it to 1 to remove another parameter from basl_table_append_header but it might be helpful to bump the version for debugging purposes when we fix a table (e.g. https://reviews.freebsd.org/D36998#inline-228535)

This revision now requires review to proceed.Nov 15 2022, 9:52 AM
usr.sbin/bhyve/basl.h
27 ↗(On Diff #111794)

I think keeping the revision as an argument to basl_table_append_header makes sense.

This revision is now accepted and ready to land.Nov 15 2022, 6:29 PM
  • use ACPI_TABLE_* structs for building
This revision now requires review to proceed.Nov 16 2022, 12:50 PM

Thanks, I find this much more readable.

This revision is now accepted and ready to land.Nov 17 2022, 5:55 PM
This revision was automatically updated to reflect the committed changes.