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
F96877148: D36997.id.diff
Fri, Sep 27, 1:06 AM
Unknown Object (File)
Wed, Sep 25, 4:10 PM
Unknown Object (File)
Fri, Sep 20, 12:49 PM
Unknown Object (File)
Thu, Sep 19, 1:04 PM
Unknown Object (File)
Wed, Sep 18, 7:42 PM
Unknown Object (File)
Tue, Sep 17, 6:23 PM
Unknown Object (File)
Tue, Sep 3, 4:04 PM
Unknown Object (File)
Tue, Sep 3, 1:30 PM
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 Not Applicable
Unit
Tests Not Applicable

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
873

This was ACTIVE_HIGH and TRIGGER_EDGE in the old version.

usr.sbin/bhyve/acpi.c
873

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
828

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.