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
F103256654: D36997.id112771.diff
Fri, Nov 22, 5:17 PM
Unknown Object (File)
Thu, Nov 21, 2:49 PM
Unknown Object (File)
Mon, Nov 18, 12:44 AM
Unknown Object (File)
Fri, Nov 15, 6:09 PM
Unknown Object (File)
Fri, Nov 15, 5:59 PM
Unknown Object (File)
Thu, Nov 14, 3:32 AM
Unknown Object (File)
Thu, Nov 7, 2:50 AM
Unknown Object (File)
Wed, Nov 6, 6:53 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 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.