Page MenuHomeFreeBSD

[PATCH 14/19] bhyve: build MADT table by basl
ClosedPublic

Authored by corvink on Oct 14 2022, 9:25 AM.
Tags
Referenced Files
Unknown Object (File)
Mon, Jun 24, 12:43 PM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Sat, Jun 8, 9:29 AM
Unknown Object (File)
Fri, Jun 7, 4:59 AM
Subscribers

Details

Summary

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

This is the 14. patch required to merge D36983

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 48229
Build 45115: arc lint + arc unit

Event Timeline

corvink retitled this revision from [acpi-table part 14] bhyve: build MADT table by basl to [PATCH 14/19] bhyve: build MADT table by basl.Oct 14 2022, 9:45 AM
usr.sbin/bhyve/acpi.c
899

This was ACTIVE_HIGH and TRIGGER_EDGE in the old version.

usr.sbin/bhyve/acpi.c
899

Good catch. Thank you.

  • I've compared the ACPI output before and after this commit and fixed wrong entries
This revision is now accepted and ready to land.Nov 8 2022, 2:31 PM
This revision now requires review to proceed.Nov 15 2022, 9:56 AM
usr.sbin/bhyve/acpi.c
854

For these I think it would be nicer to use the structures from actbl2.h such as ACPI_MADT_LOCAL_APIC. For example:

for (int i = 0; i < basl_ncpu; ++i) {
    ACPI_MADT_LOCAL_APIC local_apic;

    local_apic.Header.Type = ACPI_MADT_TYPE_LOCAL_APIC;
    local_apic.Header.Length = sizeof(local_apic);
    local_apic.ProcessorId = i;
    local_apic.Id = i;
    local_apic.LapicFlags = htole32(ACPI_MADT_ENABLED);

    BASL_EXEC(basl_table_append_bytes(madt, &local_apic, sizeof(local_apic));
}
  • use ACPI_TABLE_* structs for building
This revision is now accepted and ready to land.Nov 17 2022, 5:58 PM
This revision was automatically updated to reflect the committed changes.