Page MenuHomeFreeBSD

[PATCH 11/19] bhyve: build FACS table by basl
ClosedPublic

Authored by corvink on Oct 14 2022, 9:21 AM.
Tags
Referenced Files
Unknown Object (File)
Tue, Nov 19, 4:02 AM
Unknown Object (File)
Sun, Nov 17, 10:50 PM
Unknown Object (File)
Fri, Nov 15, 4:04 AM
Unknown Object (File)
Fri, Nov 15, 3:48 AM
Unknown Object (File)
Fri, Nov 15, 3:41 AM
Unknown Object (File)
Fri, Nov 15, 3:36 AM
Unknown Object (File)
Fri, Nov 15, 12:56 AM
Unknown Object (File)
Thu, Nov 14, 8:13 PM
Subscribers

Details

Summary

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

This is the 11. patch required to merge D36983

Diff Detail

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

Event Timeline

corvink retitled this revision from [acpi-table part 11] bhyve: build FACS table by basl to [PATCH 11/19] bhyve: build FACS table by basl.Oct 14 2022, 9:44 AM
This revision is now accepted and ready to land.Oct 26 2022, 2:27 PM
jhb added inline comments.
usr.sbin/bhyve/acpi.c
943

Note that an alternative could be using an existing structure from an ACPI-CA header and populating the fields using htoleXX() when needed, e.g. something like:

ACPI_TABLE_FACS facs;

memset(&facs, 0, sizeof(facs));
/* Populate fields */

BASL_EXEC(basl_table_append_bytes(facts_table, facs, sizeof(facs));

Note that actbl.h explicitly notes that the FACS does not use the common ACPI table header (ACPI_TABLE_HEADER).

usr.sbin/bhyve/acpi.c
943

I went back and noticed you took the approach I suggested for ACPI_TABLE_HEADER, and I do think it would be more readable to do that here as well.

corvink marked 2 inline comments as done.
  • use ACPI_TABLE_FACS struct to build facs
This revision now requires review to proceed.Nov 11 2022, 9:57 AM
This revision is now accepted and ready to land.Nov 11 2022, 6:33 PM
This revision now requires review to proceed.Nov 15 2022, 10:33 AM
This revision is now accepted and ready to land.Nov 15 2022, 6:15 PM
  • use ACPI_TABLE_FACS to build the FACS
This revision now requires review to proceed.Nov 16 2022, 12:49 PM
This revision is now accepted and ready to land.Nov 17 2022, 5:53 PM
This revision was automatically updated to reflect the committed changes.