Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142545018
D39320.id119609.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39320.id119609.diff
View Options
diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c
--- a/usr.sbin/bhyve/acpi.c
+++ b/usr.sbin/bhyve/acpi.c
@@ -810,6 +810,13 @@
BASL_EXEC(build_mcfg(ctx));
BASL_EXEC(build_facs(ctx));
BASL_EXEC(build_spcr(ctx));
+
+ /* build acpi device specific tables like a TPM2 table */
+ const struct acpi_device_list_entry *entry;
+ SLIST_FOREACH(entry, &acpi_devices, chain) {
+ BASL_EXEC(acpi_device_build_table(entry->dev));
+ }
+
BASL_EXEC(build_dsdt(ctx));
BASL_EXEC(basl_finish());
diff --git a/usr.sbin/bhyve/acpi_device.h b/usr.sbin/bhyve/acpi_device.h
--- a/usr.sbin/bhyve/acpi_device.h
+++ b/usr.sbin/bhyve/acpi_device.h
@@ -19,6 +19,8 @@
struct acpi_device_emul {
const char *name;
const char *hid;
+
+ int (*build_table)(const struct acpi_device *dev);
};
/**
@@ -39,4 +41,5 @@
int acpi_device_add_res_fixed_memory32(struct acpi_device *dev,
UINT8 write_protected, UINT32 address, UINT32 length);
+int acpi_device_build_table(const struct acpi_device *dev);
void acpi_device_write_dsdt(const struct acpi_device *dev);
diff --git a/usr.sbin/bhyve/acpi_device.c b/usr.sbin/bhyve/acpi_device.c
--- a/usr.sbin/bhyve/acpi_device.c
+++ b/usr.sbin/bhyve/acpi_device.c
@@ -141,6 +141,20 @@
return (0);
}
+int
+acpi_device_build_table(const struct acpi_device *const dev)
+{
+ if (dev == NULL) {
+ return (EINVAL);
+ }
+
+ if (dev->emul->build_table == NULL) {
+ return (0);
+ }
+
+ return (dev->emul->build_table(dev));
+}
+
static void
acpi_device_write_dsdt_crs(const struct acpi_device *const dev)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 8:24 PM (3 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27818871
Default Alt Text
D39320.id119609.diff (1 KB)
Attached To
Mode
D39320: bhyve: allow building device specific ACPI tables
Attached
Detach File
Event Timeline
Log In to Comment