bhyve: add helper to fill a ACPI_GENERIC_ADDRESS
Reviewed by: jhb Approved by: manu (mentor) MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D37407
This commit is contained in:
parent
2c2bd15532
commit
60277ad75e
@ -121,6 +121,20 @@ basl_dump(const bool mem)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
basl_fill_gas(ACPI_GENERIC_ADDRESS *const gas, const uint8_t space_id,
|
||||
const uint8_t bit_width, const uint8_t bit_offset,
|
||||
const uint8_t access_width, const uint64_t address)
|
||||
{
|
||||
assert(gas != NULL);
|
||||
|
||||
gas->SpaceId = space_id;
|
||||
gas->BitWidth = bit_width;
|
||||
gas->BitOffset = bit_offset;
|
||||
gas->AccessWidth = access_width;
|
||||
gas->Address = htole64(address);
|
||||
}
|
||||
|
||||
static int
|
||||
basl_finish_install_guest_tables(struct basl_table *const table)
|
||||
{
|
||||
|
@ -40,6 +40,9 @@
|
||||
|
||||
struct basl_table;
|
||||
|
||||
void basl_fill_gas(ACPI_GENERIC_ADDRESS *gas, uint8_t space_id,
|
||||
uint8_t bit_width, uint8_t bit_offset, uint8_t access_width,
|
||||
uint64_t address);
|
||||
int basl_finish(void);
|
||||
int basl_init(void);
|
||||
int basl_table_add_checksum(struct basl_table *const table, const uint32_t off,
|
||||
|
Loading…
Reference in New Issue
Block a user