aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorvin Köhne <corvink@FreeBSD.org>2022-04-06 09:10:40 +0000
committerCorvin Köhne <corvink@FreeBSD.org>2022-11-16 11:43:41 +0000
commitb922cf4fe340bc48355fdde8823dc472841445b3 (patch)
tree8c8ad82fa878f18cb7a329462f90c73b292230b6
parent2fb0f352b977aeb34650081e51454b0b637c5ace (diff)
bhyve: build DSDT table by basl
Building the DSDT table by basl will allow it to be loaded by qemu's ACPI table loader. Building the DSDT is complex and basl doesn't support it yet. For that reason, it's still compiled by iasl. It's just a bit restructured. Upcoming commits will restructure the builds of all other ACPI tables in a similar way. So, this commit is done for consistency reasons. We're starting with DSDT because it doesn't point to any other tables and it's the last one in our current build list. Reviewed by: jhb, markj (older version) Approved by: manu (mentor) MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D36993
-rw-r--r--usr.sbin/bhyve/acpi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c
index e823d2d41357..35420c42fde0 100644
--- a/usr.sbin/bhyve/acpi.c
+++ b/usr.sbin/bhyve/acpi.c
@@ -952,6 +952,14 @@ basl_make_templates(void)
return (err);
}
+static int
+build_dsdt(struct vmctx *const ctx)
+{
+ BASL_EXEC(basl_compile(ctx, basl_fwrite_dsdt, DSDT_OFFSET));
+
+ return (0);
+}
+
int
acpi_build(struct vmctx *ctx, int ncpu)
{
@@ -993,7 +1001,7 @@ acpi_build(struct vmctx *ctx, int ncpu)
BASL_EXEC(basl_compile(ctx, basl_fwrite_hpet, HPET_OFFSET));
BASL_EXEC(basl_compile(ctx, basl_fwrite_mcfg, MCFG_OFFSET));
BASL_EXEC(basl_compile(ctx, basl_fwrite_facs, FACS_OFFSET));
- BASL_EXEC(basl_compile(ctx, basl_fwrite_dsdt, DSDT_OFFSET));
+ BASL_EXEC(build_dsdt(ctx));
BASL_EXEC(basl_finish());