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, Sep 21, 2:21 AM
Unknown Object (File)
Sun, Sep 15, 8:56 PM
Unknown Object (File)
Wed, Sep 11, 5:04 PM
Unknown Object (File)
Wed, Sep 11, 8:19 AM
Unknown Object (File)
Thu, Sep 5, 10:32 PM
Unknown Object (File)
Wed, Sep 4, 10:31 PM
Unknown Object (File)
Tue, Sep 3, 3:31 PM
Unknown Object (File)
Aug 21 2024, 12:26 PM
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 Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

Assert len >= sizeof(ACPI_TABLE_HEADER)?

447

Missing parens around the return value.

usr.sbin/bhyve/basl.h
56
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.