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
This commit is contained in:
Corvin Köhne
2022-04-06 11:10:40 +02:00
parent 2fb0f352b9
commit b922cf4fe3
+9 -1
View File
@@ -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());