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)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 19 2024, 11:34 AM
Unknown Object (File)
Mar 17 2024, 8:12 PM
Unknown Object (File)
Feb 25 2024, 6:43 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 Not Applicable
Unit
Tests Not Applicable

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.