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)
Thu, Nov 14, 3:32 AM
Unknown Object (File)
Thu, Nov 7, 2:50 AM
Unknown Object (File)
Wed, Nov 6, 6:53 AM
Unknown Object (File)
Sat, Oct 26, 8:13 PM
Unknown Object (File)
Thu, Oct 17, 12:55 AM
Unknown Object (File)
Oct 14 2024, 7:03 PM
Unknown Object (File)
Oct 14 2024, 4:13 AM
Unknown Object (File)
Oct 12 2024, 4:21 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48387
Build 45273: 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
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.