Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142478873
D39422.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
D39422.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
@@ -245,7 +245,7 @@
const struct acpi_device_list_entry *entry;
SLIST_FOREACH(entry, &acpi_devices, chain) {
- acpi_device_write_dsdt(entry->dev);
+ BASL_EXEC(acpi_device_write_dsdt(entry->dev));
}
dsdt_line("}");
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
@@ -50,4 +50,4 @@
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);
+int 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
@@ -17,6 +17,7 @@
#include "acpi.h"
#include "acpi_device.h"
+#include "basl.h"
/**
* List entry to enumerate all resources used by an ACPI device.
@@ -148,7 +149,7 @@
return (0);
}
-static void
+static int
acpi_device_write_dsdt_crs(const struct acpi_device *const dev)
{
const struct acpi_resource_list_entry *res;
@@ -167,14 +168,14 @@
break;
}
}
+
+ return (0);
}
-void
+int
acpi_device_write_dsdt(const struct acpi_device *const dev)
{
- if (dev == NULL) {
- return;
- }
+ assert(dev != NULL);
dsdt_line("");
dsdt_line(" Scope (\\_SB)");
@@ -186,9 +187,11 @@
dsdt_line(" Name (_CRS, ResourceTemplate ()");
dsdt_line(" {");
dsdt_indent(4);
- acpi_device_write_dsdt_crs(dev);
+ BASL_EXEC(acpi_device_write_dsdt_crs(dev));
dsdt_unindent(4);
dsdt_line(" })");
dsdt_line(" }");
dsdt_line(" }");
+
+ return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 7:00 AM (9 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27795702
Default Alt Text
D39422.diff (1 KB)
Attached To
Mode
D39422: bhyve: check for errors when writing device specific DSDT entries
Attached
Detach File
Event Timeline
Log In to Comment