Page MenuHomeFreeBSD

bhyve: add helper to append a basl table without a header
ClosedPublic

Authored by corvink on Nov 16 2022, 12:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 8, 9:38 AM
Unknown Object (File)
Sat, Jun 8, 9:38 AM
Unknown Object (File)
Sat, Jun 8, 9:37 AM
Unknown Object (File)
Fri, Jun 7, 4:59 AM
Unknown Object (File)
May 6 2024, 3:27 PM
Unknown Object (File)
Apr 27 2024, 3:00 AM
Unknown Object (File)
Mar 19 2024, 11:43 AM
Unknown Object (File)
Mar 19 2024, 11:43 AM
Subscribers

Details

Summary

The common style for build an ACPI table will be:

  1. basl_table_create
  2. basl_table_append_header
  3. setup an ACPI_TABLE_* struct
  4. basl_table_append_bytes (without header)

Add a helper for the last step.

Diff Detail

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

Event Timeline

markj added inline comments.
usr.sbin/bhyve/basl.c
444

Assert len >= sizeof(ACPI_TABLE_HEADER)?

448

Missing parens around the return value.

usr.sbin/bhyve/basl.h
53
This revision is now accepted and ready to land.Nov 16 2022, 2:25 PM

Agree with @markj's feedback, but like the idea of a helper function for this.